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

Unified Diff: testing/gtest_mac.h

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 | « no previous file | testing/gtest_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/gtest_mac.h
diff --git a/testing/gtest_mac.h b/testing/gtest_mac.h
index aa48c945431c8995889103eed8ee861cec1b9f81..0a9af4323af5fc630e69b82e7241cc240ee4b9ea 100644
--- a/testing/gtest_mac.h
+++ b/testing/gtest_mac.h
@@ -16,19 +16,51 @@ namespace testing {
namespace internal {
// This overloaded version allows comparison between ObjC objects that conform
-// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_EQ().
+// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NSEQ().
GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression,
const char* actual_expression,
id<NSObject> expected,
id<NSObject> actual);
// This overloaded version allows comparison between ObjC objects that conform
-// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NE().
+// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NSNE().
GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression,
const char* actual_expression,
id<NSObject> expected,
id<NSObject> actual);
+#if !defined(GTEST_OS_IOS)
+
+// This overloaded version allows comparison between NSRect objects using
+// NSEqualRects. Used to implement {ASSERT|EXPECT}_NSEQ().
+GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression,
+ const char* actual_expression,
+ const NSRect& expected,
+ const NSRect& actual);
+
+// This overloaded version allows comparison between NSRect objects using
+// NSEqualRects. Used to implement {ASSERT|EXPECT}_NSNE().
+GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression,
+ const char* actual_expression,
+ const NSRect& expected,
+ const NSRect& actual);
+
+// This overloaded version allows comparison between NSPoint objects using
+// NSEqualPoints. Used to implement {ASSERT|EXPECT}_NSEQ().
+GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression,
+ const char* actual_expression,
+ const NSPoint& expected,
+ const NSPoint& actual);
+
+// This overloaded version allows comparison between NSPoint objects using
+// NSEqualPoints. Used to implement {ASSERT|EXPECT}_NSNE().
+GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression,
+ const char* actual_expression,
+ const NSPoint& expected,
+ const NSPoint& actual);
+
+#endif // !GTEST_OS_IOS
+
} // namespace internal
} // namespace testing
« no previous file with comments | « no previous file | testing/gtest_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698