| 50 | } |
| 51 | |
| 52 | void MakeColumnParser(std::vector<std::string> items, std::shared_ptr<BlockParser>* out) { |
| 53 | auto options = ParseOptions::Defaults(); |
| 54 | // Need this to test for null (empty) values |
| 55 | options.ignore_empty_lines = false; |
| 56 | std::vector<std::string> lines; |
| 57 | for (const auto& item : items) { |
| 58 | lines.push_back(item + '\n'); |
| 59 | } |
| 60 | MakeCSVParser(lines, options, 1, default_memory_pool(), out); |
| 61 | ASSERT_EQ((*out)->num_cols(), 1) << "Should have seen only 1 CSV column"; |
| 62 | ASSERT_EQ((*out)->num_rows(), items.size()); |
| 63 | } |
| 64 | |
| 65 | namespace { |
| 66 |
no test coverage detected