Add test case with valid junk.

Use eps to explicitly match empty string and not consume input
This commit is contained in:
Daniel Patterson
2017-08-31 17:49:06 -07:00
parent 40b5045a0a
commit acb7916996
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -33,10 +33,11 @@ namespace csv
{
SegmentLookupTable readSegmentValues(const std::vector<std::string> &paths)
{
static const auto value_if_blank = std::numeric_limits<double>::quiet_NaN();
CSVFilesParser<Segment, SpeedSource> parser(
1,
qi::ulong_long >> ',' >> qi::ulong_long,
qi::uint_ >> -(',' >> (qi::double_ | qi::attr(std::numeric_limits<double>::quiet_NaN()))));
qi::uint_ >> -(',' >> (qi::double_ | qi::attr(value_if_blank))));
// Check consistency of keys in the result lookup table
auto result = parser(paths);