MCPcopy
hub / github.com/google/mangle / TestNumberToStringFailure

Function TestNumberToStringFailure

functional/functional_test.go:626–638  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

624}
625
626func TestNumberToStringFailure(t *testing.T) {
627 tests := [][]ast.BaseTerm{
628 []ast.BaseTerm{ast.Float64(3.14)},
629 []ast.BaseTerm{ast.String("abc")},
630 }
631 for _, test := range tests {
632 term := ast.ApplyFn{symbols.NumberToString, test}
633 got, err := EvalExpr(term, ast.ConstSubstMap{})
634 if err == nil {
635 t.Errorf("EvalExpr(%v)=%v want error.", term, got)
636 }
637 }
638}
639
640func TestFloat64ToString(t *testing.T) {
641 tests := []struct {

Callers

nothing calls this directly

Calls 3

Float64Function · 0.92
StringFunction · 0.92
EvalExprFunction · 0.85

Tested by

no test coverage detected