(t *testing.T)
| 965 | } |
| 966 | |
| 967 | func TestBoundsAnalyzerWithNamesNegative(t *testing.T) { |
| 968 | test := newBoundsTestCaseWithNameTrie(t, []ast.Clause{ |
| 969 | clause("a(X) :- b(X)."), |
| 970 | }, []ast.Decl{ |
| 971 | makeSimpleDecl(atom("a(X)"), name("/foo")), |
| 972 | }, |
| 973 | symbols.NewNameTrie().Add([]string{"foo"}), |
| 974 | ) |
| 975 | bc, err := newBoundsAnalyzer(&test.programInfo, test.nameTrie, nil, test.rulesMap) |
| 976 | if err != nil { |
| 977 | t.Fatal(err) |
| 978 | } |
| 979 | if err := bc.BoundsCheck(); err == nil { |
| 980 | t.Errorf("BoundsCheck(%v, %v) should have returned error but did not", test.programInfo, test.rulesMap) |
| 981 | } |
| 982 | } |
| 983 | func TestBoundOfArgTimeDuration(t *testing.T) { |
| 984 | // Setup a minimal analyzer/context if needed, or just test boundOfArg directly if possible. |
| 985 | // boundOfArg is private, so we need to test it via exported function or be in the same package. |
nothing calls this directly
no test coverage detected