(t *testing.T)
| 1387 | } |
| 1388 | |
| 1389 | func TestNilProgram(t *testing.T) { |
| 1390 | var prg Program = (*prog)(nil) |
| 1391 | |
| 1392 | if _, _, err := prg.Eval(NoVars()); err == nil || !strings.Contains(err.Error(), "program is nil") { |
| 1393 | t.Errorf("prg.Eval() got error %v, wanted error containing 'program is nil'", err) |
| 1394 | } |
| 1395 | |
| 1396 | if _, _, err := prg.ContextEval(context.Background(), NoVars()); err == nil || !strings.Contains(err.Error(), "program is nil") { |
| 1397 | t.Errorf("prg.ContextEval() got error %v, wanted error containing 'program is nil'", err) |
| 1398 | } |
| 1399 | |
| 1400 | res := <-prg.ConcurrentEval(context.Background(), NoVars()) |
| 1401 | if res.Err == nil || !strings.Contains(res.Err.Error(), "program is nil") { |
| 1402 | t.Errorf("prg.ConcurrentEval() got error %v, wanted error containing 'program is nil'", res.Err) |
| 1403 | } |
| 1404 | } |
| 1405 | |
| 1406 | func TestResidualAst(t *testing.T) { |
| 1407 | env := testEnv(t, |
nothing calls this directly
no test coverage detected