Adds ADD_FAILURE_AT (by Zhanyong Wan); disables -Wswitch-default (by Vlad Losev).
This commit is contained in:
@@ -1627,6 +1627,12 @@ const T* TestWithParam<T>::parameter_ = NULL;
|
||||
// Generates a nonfatal failure with a generic message.
|
||||
#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
|
||||
|
||||
// Generates a nonfatal failure at the given source file location with
|
||||
// a generic message.
|
||||
#define ADD_FAILURE_AT(file, line) \
|
||||
GTEST_MESSAGE_AT_(file, line, "Failed", \
|
||||
::testing::TestPartResult::kNonFatalFailure)
|
||||
|
||||
// Generates a fatal failure with a generic message.
|
||||
#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")
|
||||
|
||||
|
||||
@@ -1064,10 +1064,13 @@ class NativeArray {
|
||||
} // namespace internal
|
||||
} // namespace testing
|
||||
|
||||
#define GTEST_MESSAGE_(message, result_type) \
|
||||
::testing::internal::AssertHelper(result_type, __FILE__, __LINE__, message) \
|
||||
#define GTEST_MESSAGE_AT_(file, line, message, result_type) \
|
||||
::testing::internal::AssertHelper(result_type, file, line, message) \
|
||||
= ::testing::Message()
|
||||
|
||||
#define GTEST_MESSAGE_(message, result_type) \
|
||||
GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
|
||||
|
||||
#define GTEST_FATAL_FAILURE_(message) \
|
||||
return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user