v0.0.171
This commit is contained in:
@@ -2,6 +2,7 @@ package tst
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"runtime/debug"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -54,12 +55,18 @@ func AssertHexEqual(t *testing.T, expected string, actual []byte) {
|
||||
|
||||
func AssertTrue(t *testing.T, value bool) {
|
||||
if !value {
|
||||
t.Error("value should be true")
|
||||
t.Error("value should be true\n" + string(debug.Stack()))
|
||||
}
|
||||
}
|
||||
|
||||
func AssertFalse(t *testing.T, value bool) {
|
||||
if value {
|
||||
t.Error("value should be false")
|
||||
t.Error("value should be false\n" + string(debug.Stack()))
|
||||
}
|
||||
}
|
||||
|
||||
func AssertNoErr(t *testing.T, anerr error) {
|
||||
if anerr != nil {
|
||||
t.Error("Function returned an error: " + anerr.Error() + "\n" + string(debug.Stack()))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user