[Lldb-commits] [lldb] 1497066 - [lldb/Test] Add unittest for FileSpec::operator bool()
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 18 15:08:53 PDT 2020
Author: Jonas Devlieghere
Date: 2020-03-18T15:08:23-07:00
New Revision: 14970669ddedb07b68518ae708889e54e6d6eeb9
URL: https://github.com/llvm/llvm-project/commit/14970669ddedb07b68518ae708889e54e6d6eeb9
DIFF: https://github.com/llvm/llvm-project/commit/14970669ddedb07b68518ae708889e54e6d6eeb9.diff
LOG: [lldb/Test] Add unittest for FileSpec::operator bool()
Added:
Modified:
lldb/unittests/Utility/FileSpecTest.cpp
Removed:
################################################################################
diff --git a/lldb/unittests/Utility/FileSpecTest.cpp b/lldb/unittests/Utility/FileSpecTest.cpp
index c66edc444797..690c5ae331ee 100644
--- a/lldb/unittests/Utility/FileSpecTest.cpp
+++ b/lldb/unittests/Utility/FileSpecTest.cpp
@@ -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"));
+}
More information about the lldb-commits
mailing list