summaryrefslogtreecommitdiff
path: root/include/gtest/gtest.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-07-26 21:59:50 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-07-26 21:59:50 +0000
commitd5ad2ca82051c34b19af628a3c81131ca65010c2 (patch)
treea393db9c0cebf32d9a62a2a95e8ade4f5750c62c /include/gtest/gtest.h
parent87b89d907bc1b5032581439d7de5028c824fa05b (diff)
downloadgoogletest-d5ad2ca82051c34b19af628a3c81131ca65010c2.tar.gz
Adds ADD_FAILURE_AT (by Zhanyong Wan); disables -Wswitch-default (by Vlad Losev).
git-svn-id: http://googletest.googlecode.com/svn/trunk@451 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'include/gtest/gtest.h')
-rw-r--r--include/gtest/gtest.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h
index 90dde38..af9d9e7 100644
--- a/include/gtest/gtest.h
+++ b/include/gtest/gtest.h
@@ -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")