(t *testing.T)
| 291 | } |
| 292 | |
| 293 | func TestSingletonBinaryBinding(t *testing.T) { |
| 294 | _, err := NewCustomEnv( |
| 295 | Function("right", |
| 296 | Overload("right_int_int", []*Type{IntType, IntType}, IntType), |
| 297 | Overload("right_double_double", []*Type{DoubleType, DoubleType}, DoubleType), |
| 298 | Overload("right_string_string", []*Type{StringType, StringType}, StringType), |
| 299 | SingletonBinaryBinding(func(arg1, arg2 ref.Val) ref.Val { |
| 300 | return arg2 |
| 301 | }, traits.ComparerType), |
| 302 | ), |
| 303 | ) |
| 304 | if err != nil { |
| 305 | t.Errorf("NewCustomEnv() failed: %v", err) |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | func TestSingletonFunctionBinding(t *testing.T) { |
| 310 | env, err := NewCustomEnv( |
nothing calls this directly
no test coverage detected