MCPcopy
hub / github.com/google/mangle / readExample

Function readExample

examples/examples_test.go:15–29  ·  view source on GitHub ↗
(t *testing.T, filename string)

Source from the content-addressed store, hash-verified

13)
14
15func 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
31func TestTemporalGraphIntervals(t *testing.T) {
32 program := readExample(t, "temporal_graph_intervals.mg")

Callers 3

TestTemporalGraphPointsFunction · 0.85
TestTemporalSequenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected