Increase test coverage

This commit is contained in:
TheAssassin
2018-11-09 00:54:32 +01:00
parent aa2e8b9105
commit b4efb2bc56
2 changed files with 5 additions and 7 deletions

View File

@@ -21,8 +21,9 @@ TEST_F(DesktopFileReaderFixture, testPathConstructor) {
bf::path path = "/dev/null";
DesktopFileReader reader(path);
EXPECT_FALSE(reader.isEmpty());
ASSERT_THROW(DesktopFileReader("/no/such/file/or/directory"), std::invalid_argument);
}
TEST_F(DesktopFileReaderFixture, testStreamConstructor) {
@@ -37,7 +38,7 @@ TEST_F(DesktopFileReaderFixture, testPathConstructorWithEmptyPath) {
}
TEST_F(DesktopFileReaderFixture, testPathConstructorWithNonExistingPath) {
ASSERT_THROW(DesktopFileReader("/no/such/path/42"), std::runtime_error);
ASSERT_THROW(DesktopFileReader("/no/such/path/42"), std::invalid_argument);
}
TEST_F(DesktopFileReaderFixture, testEqualityAndInequalityOperators) {