asrt

package module
Version: v0.0.0-...-7d67607 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2021 License: MIT Imports: 3 Imported by: 0

README

asrt

Assertation for Go.

For now, this package is very simple, but just for now.

Getting Started

Install

go get "github.com/i0Ek3/asrt"

Usage
package main

import (
    "github.com/i0Ek3/asrt"
)

func main() {
    //...
    asrt.Asrt(t, got, want)
    asrt.Equal(got, want)
    asrt.NotEqual(got, want)
    asrt.NotNil(value)
    asrt.Neg(prevalue, neg)
}

TODO

  • error showing

Contributing

PRs and Issues are also welcome.

License

MIT.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asrt

func Asrt(t *testing.T, got, want T)

Asrt outputs error message when got not equal with want

func AssertType

func AssertType(v T)

AssertType asserts the value type

func Equal

func Equal(got, want T) bool

Equal checks if the give value is equal

func Neg

func Neg(prepare, neg T) bool

Neg checks if prevalue equals given value neg

func NotEqual

func NotEqual(got, want T) bool

NotEqual checks if the given value is not equal

func NotNil

func NotNil(value T) bool

NotNil checks if the given value is nil

Types

type T

type T interface{}

T ready for generic

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL