Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: testing/gtest_mac_unittest.mm

Issue 1211283003: Overload EXPECT_NSEQ to handle NSRect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also handle NSPoint. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/gtest_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/gtest_mac_unittest.mm
diff --git a/testing/gtest_mac_unittest.mm b/testing/gtest_mac_unittest.mm
index 01f14979fefc33262adc18e8fe893bd2cfe54412..2dfa24e8d8b224f0d22031943acfd41e6e1391e8 100644
--- a/testing/gtest_mac_unittest.mm
+++ b/testing/gtest_mac_unittest.mm
@@ -55,3 +55,55 @@ TEST(GTestMac, ExpectNSNil) {
// TODO(shess): Test that EXPECT_NSNE(nil, nil) fails.
}
+
+#if !defined(GTEST_OS_IOS)
+
+TEST(GTestMac, ExpectNSEQRect) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ EXPECT_NSEQ(NSMakeRect(1, 2, 3, 4), NSMakeRect(1, 2, 3, 4));
+}
+
+TEST(GTestMac, AssertNSEQRect) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ ASSERT_NSEQ(NSMakeRect(1, 2, 3, 4), NSMakeRect(1, 2, 3, 4));
+}
+
+TEST(GTestMac, ExpectNSNERect) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ EXPECT_NSNE(NSMakeRect(1, 2, 3, 4), NSMakeRect(5, 6, 7, 8));
+}
+
+TEST(GTestMac, AssertNSNERect) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ ASSERT_NSNE(NSMakeRect(1, 2, 3, 4), NSMakeRect(5, 6, 7, 8));
+}
+
+TEST(GTestMac, ExpectNSEQPoint) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ EXPECT_NSEQ(NSMakePoint(1, 2), NSMakePoint(1, 2));
+}
+
+TEST(GTestMac, AssertNSEQPoint) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ ASSERT_NSEQ(NSMakePoint(1, 2), NSMakePoint(1, 2));
+}
+
+TEST(GTestMac, ExpectNSNEPoint) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ EXPECT_NSNE(NSMakePoint(1, 2), NSMakePoint(3, 4));
+}
+
+TEST(GTestMac, AssertNSNEPoint) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ ASSERT_NSNE(NSMakePoint(1, 2), NSMakePoint(3, 4));
+}
+
+#endif // !GTEST_OS_IOS
« no previous file with comments | « testing/gtest_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698