summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-15 04:56:58 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-15 04:56:58 (GMT)
commit345d9ebf30ccc2747c4e4c224b95fd8406093e29 (patch)
tree661b65a6a11d7f955b9888d8125f68e91a782cba /test
parentdac3e879c56a50696a36f53e1e5e353e48fa665f (diff)
downloadgoogletest-345d9ebf30ccc2747c4e4c224b95fd8406093e29.zip
googletest-345d9ebf30ccc2747c4e4c224b95fd8406093e29.tar.gz
googletest-345d9ebf30ccc2747c4e4c224b95fd8406093e29.tar.bz2
Implements GTEST_ASSERT_XY as alias of ASSERT_XY.
Diffstat (limited to 'test')
-rw-r--r--test/gtest_unittest.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
index 5eaa2af..8e3e7e6 100644
--- a/test/gtest_unittest.cc
+++ b/test/gtest_unittest.cc
@@ -6866,6 +6866,41 @@ GTEST_TEST(AlternativeNameTest, Works) { // GTEST_TEST is the same as TEST.
// GTEST_FAIL is the same as FAIL.
EXPECT_FATAL_FAILURE(GTEST_FAIL() << "An expected failure",
"An expected failure");
+
+ // GTEST_ASSERT_XY is the same as ASSERT_XY.
+
+ GTEST_ASSERT_EQ(0, 0);
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_EQ(0, 1) << "An expected failure",
+ "An expected failure");
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_EQ(1, 0) << "An expected failure",
+ "An expected failure");
+
+ GTEST_ASSERT_NE(0, 1);
+ GTEST_ASSERT_NE(1, 0);
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_NE(0, 0) << "An expected failure",
+ "An expected failure");
+
+ GTEST_ASSERT_LE(0, 0);
+ GTEST_ASSERT_LE(0, 1);
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_LE(1, 0) << "An expected failure",
+ "An expected failure");
+
+ GTEST_ASSERT_LT(0, 1);
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_LT(0, 0) << "An expected failure",
+ "An expected failure");
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_LT(1, 0) << "An expected failure",
+ "An expected failure");
+
+ GTEST_ASSERT_GE(0, 0);
+ GTEST_ASSERT_GE(1, 0);
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_GE(0, 1) << "An expected failure",
+ "An expected failure");
+
+ GTEST_ASSERT_GT(1, 0);
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_GT(0, 1) << "An expected failure",
+ "An expected failure");
+ EXPECT_FATAL_FAILURE(GTEST_ASSERT_GT(1, 1) << "An expected failure",
+ "An expected failure");
}
// Tests for internal utilities necessary for implementation of the universal