| 62 | // ========================================================================= |
| 63 | |
| 64 | TEST(QueryTest, RangeQuerySpanningTwoChunks) { |
| 65 | auto chunks = makeStandardChunks(); |
| 66 | auto cursor = rangeQuery(chunks, 150, 250); |
| 67 | |
| 68 | std::vector<Timestamp> timestamps; |
| 69 | while (cursor.valid()) { |
| 70 | timestamps.push_back(cursor.current().timestamp); |
| 71 | cursor.advance(); |
| 72 | } |
| 73 | |
| 74 | // Expected: 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250 |
| 75 | ASSERT_EQ(timestamps.size(), 11u); |
| 76 | EXPECT_EQ(timestamps.front(), 150); |
| 77 | EXPECT_EQ(timestamps.back(), 250); |
| 78 | for (std::size_t i = 1; i < timestamps.size(); ++i) { |
| 79 | EXPECT_EQ(timestamps[i] - timestamps[i - 1], 10); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | TEST(QueryTest, RangeQueryWithinSingleChunk) { |
| 84 | auto chunks = makeStandardChunks(); |
nothing calls this directly
no test coverage detected