github.com/MontFerret/ferret@v0.18.0/pkg/stdlib/testing/false.go (about) 1 package testing 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/MontFerret/ferret/pkg/runtime/core" 8 "github.com/MontFerret/ferret/pkg/runtime/values" 9 "github.com/MontFerret/ferret/pkg/stdlib/testing/base" 10 ) 11 12 // FALSE asserts that value is false. 13 // @param {Any}actual - Value to test. 14 // @param {String} [message] - Message to display on error. 15 var False = base.Assertion{ 16 DefaultMessage: func(args []core.Value) string { 17 return fmt.Sprintf("be %s", base.FormatValue(values.False)) 18 }, 19 MinArgs: 1, 20 MaxArgs: 2, 21 Fn: func(ctx context.Context, args []core.Value) (bool, error) { 22 return args[0] == values.False, nil 23 }, 24 }