ASSERT_THAT_ERROR looks like the intended helper for use in tests.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
This comment was removed by plotfi.
Comment Actions
plotfi@grendel:/mnt/nvme0/llvm-project$ build/tools/clang/unittests/DirectoryWatcher/./DirectoryWatcherTests --gtest_filter=DirectoryWatcherTest.AddFilesNote: Google Test filter = DirectoryWatcherTest.AddFiles [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from DirectoryWatcherTest [ RUN ] DirectoryWatcherTest.AddFiles /mnt/nvme0/llvm-project/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:344: Failure Value of: llvm::detail::TakeError(DW.takeError()) Expected: succeeded Actual: failed (inotify_init1() error: Illegal seek) [ FAILED ] DirectoryWatcherTest.AddFiles (3 ms) [----------] 1 test from DirectoryWatcherTest (3 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (3 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] DirectoryWatcherTest.AddFiles 1 FAILED TEST
Is the output in the failure case. This seems fine to me.