(t *testing.T, facts []factstore.TemporalFact, prefix, startStr, endStr string)
| 141 | } |
| 142 | |
| 143 | func verifyInterval(t *testing.T, facts []factstore.TemporalFact, prefix, startStr, endStr string) { |
| 144 | found := false |
| 145 | for _, f := range facts { |
| 146 | if strings.Contains(f.Atom.String(), prefix) { |
| 147 | start := f.Interval.Start.Time().UTC() |
| 148 | end := f.Interval.End.Time().UTC() |
| 149 | // Basic date check YYYY-MM-DD |
| 150 | s := start.Format("2006-01-02") |
| 151 | e := end.Format("2006-01-02") |
| 152 | if s == startStr && e == endStr { |
| 153 | found = true |
| 154 | break |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | if !found { |
| 159 | t.Errorf("Expected fact %s with interval [%s, %s], not found", prefix, startStr, endStr) |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | func verifyPoint(t *testing.T, facts []factstore.TemporalFact, prefix, pointStr string) { |
| 164 | // Point interval has Start == End (or close enough for this check) |
no test coverage detected