(t *testing.T)
| 743 | } |
| 744 | |
| 745 | func TestNameToStringFailure(t *testing.T) { |
| 746 | tests := [][]ast.BaseTerm{ |
| 747 | []ast.BaseTerm{ast.Float64(3.14)}, |
| 748 | []ast.BaseTerm{ast.String("abc")}, |
| 749 | } |
| 750 | for _, test := range tests { |
| 751 | term := ast.ApplyFn{symbols.NameToString, test} |
| 752 | got, err := EvalExpr(term, ast.ConstSubstMap{}) |
| 753 | if err == nil { |
| 754 | t.Errorf("EvalExpr(%v)=%v want error.", term, got) |
| 755 | } |
| 756 | } |
| 757 | } |
| 758 | |
| 759 | func TestStringConcatenate(t *testing.T) { |
| 760 | tests := []struct { |