(t *testing.T, filename string)
| 13 | ) |
| 14 | |
| 15 | func readExample(t *testing.T, filename string) string { |
| 16 | // Try reading relative to current directory (for standard go test) |
| 17 | content, err := os.ReadFile(filename) |
| 18 | if err == nil { |
| 19 | return string(content) |
| 20 | } |
| 21 | |
| 22 | // Fallback: Try full path for Bazel/Google3 runfiles |
| 23 | fullPath := "third_party/mangle/examples/" + filename |
| 24 | content, err = os.ReadFile(fullPath) |
| 25 | if err != nil { |
| 26 | t.Fatalf("Failed to read example file %s (also tried %s): %v", filename, fullPath, err) |
| 27 | } |
| 28 | return string(content) |
| 29 | } |
| 30 | |
| 31 | func TestTemporalGraphIntervals(t *testing.T) { |
| 32 | program := readExample(t, "temporal_graph_intervals.mg") |
no outgoing calls
no test coverage detected