more FileReader tests
This commit is contained in:
parent
1d10771048
commit
f360077f04
0
test/files/empty.txt
Normal file
0
test/files/empty.txt
Normal file
@ -9,6 +9,19 @@ TEST(FileReaderTest, num_lines_defaults_to_0)
|
||||
EXPECT_EQ(0, fr.num_lines());
|
||||
}
|
||||
|
||||
TEST(FileReaderTest, load_returns_false_for_nonexistent_file)
|
||||
{
|
||||
FileReader fr;
|
||||
EXPECT_FALSE(fr.load("this/file/does/not/exist.txt"));
|
||||
}
|
||||
|
||||
TEST(FileReaderTest, loading_empty_file)
|
||||
{
|
||||
FileReader fr;
|
||||
EXPECT_TRUE(fr.load("test/files/empty.txt"));
|
||||
EXPECT_EQ(0, fr.num_lines());
|
||||
}
|
||||
|
||||
TEST(FileReaderTest, reads_lf_format_file)
|
||||
{
|
||||
FileReader fr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user