mirror of
https://github.com/MontFerret/ferret.git
synced 2025-03-19 21:28:32 +02:00
25 lines
624 B
Go
25 lines
624 B
Go
|
package testing
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||
|
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||
|
"github.com/MontFerret/ferret/pkg/stdlib/testing/base"
|
||
|
)
|
||
|
|
||
|
// False asserts that value is false.
|
||
|
// @params actual (Mixed) - Value to test.
|
||
|
// @params message (String) - Message to display on error.
|
||
|
var False = base.Assertion{
|
||
|
DefaultMessage: func(args []core.Value) string {
|
||
|
return fmt.Sprintf("be %s", base.FormatValue(values.False))
|
||
|
},
|
||
|
MinArgs: 1,
|
||
|
MaxArgs: 2,
|
||
|
Fn: func(ctx context.Context, args []core.Value) (bool, error) {
|
||
|
return args[0] == values.False, nil
|
||
|
},
|
||
|
}
|