Skip to content

Commit

Permalink
Increase coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Mar 27, 2024
1 parent 165927d commit 25c493b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions io/src/CSVStreams_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,27 @@ TEST(CSVStreams, CanIterateValidCSV)
CSVIStreamIterator(ss), CSVIStreamIterator());
EXPECT_EQ(expectedRows, rows);
}

{
std::stringstream ss;
ss << "foo,bar" << std::endl
<< "bar," << std::endl
<< ",foo" << std::endl
<< "," << std::endl
<< "baz,baz";
auto it = CSVIStreamIterator(ss);
// Copy constructor for coverage
auto it_copy = it;

auto row0 = *it_copy;
EXPECT_EQ(row0[0], "foo");
EXPECT_EQ(row0[1], "bar");
it_copy++;

auto row1 = *it_copy;
EXPECT_EQ(row1[0], "bar");
EXPECT_EQ(row1[1], "");
}
}

/////////////////////////////////////////////////
Expand Down

0 comments on commit 25c493b

Please sign in to comment.