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

Unified Diff: testing/gtest_mac_unittest.mm

Issue 4697004: [Mac] Better handling of nil for testing macros. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment about unable to test EXPECT_NSNE(nil, nil). Created 10 years, 1 month 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 c5bc47fb806afc1e2d9db5d1ccd58c9755d3fb2e..1376ed1eb2a908e8526b039f5699f7179ad62a14 100644
--- a/testing/gtest_mac_unittest.mm
+++ b/testing/gtest_mac_unittest.mm
@@ -45,3 +45,13 @@ TEST(GTestMac, AssertNSNE) {
ASSERT_NSNE(@"a", @"b");
}
+
+TEST(GTestMac, ExpectNSNil) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ EXPECT_NSEQ(nil, nil);
+ EXPECT_NSNE(nil, @"a");
+ EXPECT_NSNE(@"a", nil);
+
+ // TODO(shess): Test that EXPECT_NSNE(nil, nil) fails.
+}
« 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