diff options
Diffstat (limited to 'unittests/DebugInfo/CodeView/ErrorChecking.h')
| -rw-r--r-- | unittests/DebugInfo/CodeView/ErrorChecking.h | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/DebugInfo/CodeView/ErrorChecking.h b/unittests/DebugInfo/CodeView/ErrorChecking.h index 09310883bf58..4ca74c487b3e 100644 --- a/unittests/DebugInfo/CodeView/ErrorChecking.h +++ b/unittests/DebugInfo/CodeView/ErrorChecking.h @@ -26,6 +26,15 @@        consumeError(std::move(E));                                              \    } +#define ASSERT_EXPECTED(Exp)                                                   \ +  {                                                                            \ +    auto E = Exp.takeError();                                                  \ +    bool Success = static_cast<bool>(E);                                       \ +    if (!Success)                                                              \ +      consumeError(std::move(E));                                              \ +    ASSERT_FALSE(Success);                                                     \ +  } +  #define EXPECT_EXPECTED(Exp)                                                   \    {                                                                            \      auto E = Exp.takeError();                                                  \  | 
