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

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: 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
« testing/gtest_mac.h ('K') | « 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..0ebac1430e3d7f4be50b2228da88fb9bcb1f81b6 100644
--- a/testing/gtest_mac_unittest.mm
+++ b/testing/gtest_mac_unittest.mm
@@ -55,3 +55,27 @@ TEST(GTestMac, ExpectNSNil) {
// TODO(shess): Test that EXPECT_NSNE(nil, nil) fails.
}
+
+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));
+}
« testing/gtest_mac.h ('K') | « testing/gtest_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698