[lldb/Test] Add unittest for FileSpec::operator bool()

This commit is contained in:
Jonas Devlieghere 2020-03-18 14:59:54 -07:00
parent f951b0f82d
commit 14970669dd
1 changed files with 6 additions and 0 deletions

View File

@ -441,3 +441,9 @@ TEST(FileSpecTest, Yaml) {
EXPECT_EQ(deserialized.GetDirectory(), fs_windows.GetDirectory());
EXPECT_EQ(deserialized, fs_windows);
}
TEST(FileSpecTest, OperatorBool) {
EXPECT_FALSE(FileSpec());
EXPECT_FALSE(FileSpec(""));
EXPECT_TRUE(FileSpec("/foo/bar"));
}