| 36 | namespace csv { |
| 37 | |
| 38 | void CheckSkipRows(const std::string& rows, int32_t num_rows, |
| 39 | int32_t expected_skipped_rows, int32_t expected_skipped_bytes) { |
| 40 | const uint8_t* start = reinterpret_cast<const uint8_t*>(rows.data()); |
| 41 | const uint8_t* data; |
| 42 | int32_t skipped_rows = |
| 43 | SkipRows(start, static_cast<int32_t>(rows.size()), num_rows, &data); |
| 44 | ASSERT_EQ(skipped_rows, expected_skipped_rows); |
| 45 | ASSERT_EQ(data - start, expected_skipped_bytes); |
| 46 | } |
| 47 | |
| 48 | TEST(SkipRows, Basics) { |
| 49 | CheckSkipRows("", 0, 0, 0); |