mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
5cdf6b0e88
The 'NoError' function was meant to be used as the input to ASSERT/EXPECT_TRUE, but it is easy to forget this (it could be annotated with nodiscard to help this) so many sites that look like they're checked are not (& silently discard the failure). Only one site actually has an Error sneaking out this way and I've replaced that one with a FIXME+consumeError. The rest of the code has been modified to use the EXPECT_THAT_ERROR macros Zach introduced a while back. Between the options available this seems OK/good/something to standardize on - though it's difficult to build a matcher that could handle checking for a specific llvm::Error result, so those remain using the custom ErrorEquals (& the nodiscard added to ensure it is not misused as it was previous to this patch). It could still be generalized a bit further (even not as far as a matcher, but at least support multiple kinds of Error, etc) & added to the general Error utility header. llvm-svn: 307440
15 lines
238 B
CMake
15 lines
238 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
Core
|
|
Coverage
|
|
ProfileData
|
|
Support
|
|
)
|
|
|
|
add_llvm_unittest(ProfileDataTests
|
|
CoverageMappingTest.cpp
|
|
InstrProfTest.cpp
|
|
SampleProfTest.cpp
|
|
)
|
|
|
|
target_link_libraries(ProfileDataTests LLVMTestingSupport)
|