package
0.0.0-20240819164739-f47aed85de5a
Repository: https://github.com/unix-world/smartgo.git
Documentation: pkg.go.dev

# README

Assert

GoDoc

This package provides an assert function for Go. It's designed to work like assert in C.

Example

package my_test

import "github.com/tidwall/assert"

func TestMyThing(t *testing.T) {
    assert.Assert("hello" == "jello")
}

This will print the following message and abort the program.

Assertion failed: ("hello" == "jello"), function TestMyThing, file my_test.go, line 6.

# Functions

Assert aborts the program if assertion is false.