aego/testingmodule
Equalfunction
func Equal(got int, want int)
Equal fails the test when two ints differ.
Example
testing.Equal(score(), 100)
EqualFloatfunction
func EqualFloat(got float, want float, eps float)
EqualFloat fails the test when got is further than eps from want, or is NaN.
Example
testing.EqualFloat(math.Sqrt(2), 1.4142, 0.001)
EqualStringfunction
func EqualString(got string, want string)
EqualString fails the test when two strings differ.
Example
testing.EqualString(name(), "Player")
Failfunction
func Fail(msg string)
Fail stops the test and reports msg.
Example
testing.Fail("unreachable")
Falsefunction
func False(v bool, msg string)
False fails the test with msg when v is true.
Example
testing.False(dead, "player should be alive")
Truefunction
func True(v bool, msg string)
True fails the test with msg when v is false.
Example
testing.True(hp > 0, "player should be alive")