MCPcopy Index your code
hub / github.com/google/mangle / TestTimeInterval

Function TestTimeInterval

ast/temporal_test.go:548–560  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

546}
547
548func TestTimeInterval(t *testing.T) {
549 start := time.Date(2024, 1, 1, 10, 0, 0, 0, time.UTC)
550 end := time.Date(2024, 1, 1, 18, 0, 0, 0, time.UTC)
551
552 interval := TimeInterval(start, end)
553
554 if !interval.Start.Time().Equal(start) {
555 t.Errorf("TimeInterval start = %v, want %v", interval.Start.Time(), start)
556 }
557 if !interval.End.Time().Equal(end) {
558 t.Errorf("TimeInterval end = %v, want %v", interval.End.Time(), end)
559 }
560}

Callers

nothing calls this directly

Calls 2

TimeIntervalFunction · 0.85
TimeMethod · 0.80

Tested by

no test coverage detected