(t *testing.T)
| 650 | } |
| 651 | |
| 652 | func TestResolveHeadTime_TimestampBounds(t *testing.T) { |
| 653 | evalTime := ast.Date(2024, 1, 15) |
| 654 | subst := unionfind.New() |
| 655 | |
| 656 | // Create an interval with timestamp bounds |
| 657 | start := ast.Date(2024, 1, 1) |
| 658 | end := ast.Date(2024, 6, 30) |
| 659 | headTime := ast.NewInterval( |
| 660 | ast.NewTimestampBound(start), |
| 661 | ast.NewTimestampBound(end), |
| 662 | ) |
| 663 | |
| 664 | result, err := ResolveHeadTime(&headTime, subst, evalTime) |
| 665 | if err != nil { |
| 666 | t.Fatalf("ResolveHeadTime returned error: %v", err) |
| 667 | } |
| 668 | if result == nil { |
| 669 | t.Fatal("ResolveHeadTime returned nil") |
| 670 | } |
| 671 | if !result.Equals(headTime) { |
| 672 | t.Errorf("ResolveHeadTime = %v, want %v", result, headTime) |
| 673 | } |
| 674 | } |
| 675 | |
| 676 | func TestResolveHeadTime_NowBound(t *testing.T) { |
| 677 | evalTime := time.Date(2024, 1, 15, 12, 0, 0, 0, time.UTC) |
nothing calls this directly
no test coverage detected