Generate test data with the given number of columns.
| 825 | |
| 826 | // Generate test data with the given number of columns. |
| 827 | std::string MakeLotsOfCsvColumns(int32_t num_columns) { |
| 828 | std::string values, header; |
| 829 | header.reserve(num_columns * 10); |
| 830 | values.reserve(num_columns * 10); |
| 831 | for (int x = 0; x < num_columns; x++) { |
| 832 | if (x != 0) { |
| 833 | header += ","; |
| 834 | values += ","; |
| 835 | } |
| 836 | header += "c" + std::to_string(x); |
| 837 | values += std::to_string(x); |
| 838 | } |
| 839 | |
| 840 | header += "\n"; |
| 841 | values += "\n"; |
| 842 | return MakeCSVData({header, values}); |
| 843 | } |
| 844 | |
| 845 | TEST(BlockParser, LotsOfColumns) { |
| 846 | auto options = ParseOptions::Defaults(); |
no test coverage detected