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")); +} _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits