(t *testing.T)
| 464 | } |
| 465 | |
| 466 | func TestIntegration_IntervalFunctions(t *testing.T) { |
| 467 | // Test the interval extraction functions |
| 468 | program := ` |
| 469 | # Extract interval components |
| 470 | Decl status(X) temporal. |
| 471 | ` |
| 472 | |
| 473 | _, err := parse.Unit(strings.NewReader(program)) |
| 474 | if err != nil { |
| 475 | t.Fatalf("Failed to parse program: %v", err) |
| 476 | } |
| 477 | |
| 478 | // Test interval to constant conversion |
| 479 | interval := ast.TimeInterval( |
| 480 | ast.Date(2024, 1, 1), |
| 481 | ast.Date(2024, 12, 31), |
| 482 | ) |
| 483 | |
| 484 | intervalConst := intervalToConstant(interval) |
| 485 | |
| 486 | // Verify it's a pair |
| 487 | if intervalConst.Type != ast.PairShape { |
| 488 | t.Errorf("intervalToConstant returned type %v, want PairShape", intervalConst.Type) |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | func TestIntegration_BackwardCompatibility(t *testing.T) { |
| 493 | // These programs should parse and run correctly without temporal features |
nothing calls this directly
no test coverage detected