Refactor csv_reader_unittest.cc

The file was a long collection of two types of test: successful and
failing parsing of a CSV. Within each TEST macro, boilerplate was
repeated. Through copy-paste errors ASSERT_FALSE were used where
EXPECT_FALSE were more appropriate.

This CL modifies the file so that it only has two TEST instances, one
for all the positive and one for negative cases. The particular inputs
and expectations are wrapped in test-case structs, where the test
values are not lost among boilerplate. Copy-paste errors are limited
because there is not much to copy-paste anymore when adding a new
test.

Bug: 921383
Change-Id: I124adaac97f1986549d4766209db6564a92126b4
Reviewed-on: https://chromium-review.googlesource.com/c/1415297
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623814}
1 file changed