proxygen
ExceptionTest.cpp File Reference
#include <folly/Exception.h>
#include <folly/experimental/TestUtil.h>
#include <folly/portability/GTest.h>
#include <cstdio>
#include <memory>

Go to the source code of this file.

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 
 folly::test
 

Macros

#define EXPECT_SYSTEM_ERROR(statement, err, msg)
 

Functions

 folly::test::TEST (ExceptionTest, Simple)
 
 folly::test::TEST (ExceptionTest, makeSystemError)
 

Macro Definition Documentation

#define EXPECT_SYSTEM_ERROR (   statement,
  err,
  msg 
)
Value:
try { \
statement; \
ADD_FAILURE() << "Didn't throw"; \
} catch (const std::system_error& e) { \
std::system_error expected(err, std::system_category(), msg); \
EXPECT_STREQ(expected.what(), e.what()); \
} catch (...) { \
ADD_FAILURE() << "Threw a different type"; \
}
#define EXPECT_STREQ(s1, s2)
Definition: gtest.h:1995
#define ADD_FAILURE()
Definition: gtest.h:1808

Definition at line 28 of file ExceptionTest.cpp.

Referenced by folly::test::TEST().