| 203 | } |
| 204 | |
| 205 | void TestCustomNulls() { |
| 206 | auto type = this->type(); |
| 207 | auto options = ConvertOptions::Defaults(); |
| 208 | options.null_values = {"xxx", "zzz"}; |
| 209 | AssertConversion<T, std::string>(type, {"ab,N/A\n", "xxx,\"zzz\"\n"}, |
| 210 | {{"ab", "xxx"}, {"N/A", "zzz"}}, |
| 211 | {{true, true}, {true, true}}, options); |
| 212 | |
| 213 | options.strings_can_be_null = true; |
| 214 | AssertConversion<T, std::string>(type, {"ab,N/A\n", "xxx,\"zzz\"\n"}, |
| 215 | {{"ab", ""}, {"N/A", ""}}, |
| 216 | {{true, false}, {true, false}}, options); |
| 217 | options.quoted_strings_can_be_null = false; |
| 218 | AssertConversion<T, std::string>(type, {"ab,N/A\n", "xxx,\"zzz\"\n"}, |
| 219 | {{"ab", ""}, {"N/A", "zzz"}}, |
| 220 | {{true, false}, {true, true}}, options); |
| 221 | } |
| 222 | }; |
| 223 | |
| 224 | template <typename T> |
no test coverage detected