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

Unified Diff: chrome/browser/cocoa/about_window_controller_unittest.mm

Issue 3095004: [Mac] Use the new {EXPECT,ASSERT}_NS{EQ,NE} macros where possible. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fix compile Created 10 years, 4 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
Index: chrome/browser/cocoa/about_window_controller_unittest.mm
diff --git a/chrome/browser/cocoa/about_window_controller_unittest.mm b/chrome/browser/cocoa/about_window_controller_unittest.mm
index 64a4f6ded98a64209473e9ada5ef295f6d47f3be..3538ddaaa6fc0465393eb44db70e566ecce83837 100644
--- a/chrome/browser/cocoa/about_window_controller_unittest.mm
+++ b/chrome/browser/cocoa/about_window_controller_unittest.mm
@@ -10,6 +10,7 @@
#include "chrome/browser/cocoa/cocoa_test_helper.h"
#import "chrome/browser/cocoa/keystone_glue.h"
#include "testing/gtest/include/gtest/gtest.h"
+#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
namespace {
@@ -95,28 +96,23 @@ TEST_F(AboutWindowControllerTest, TestCallbacks) {
NSString *lastText = [[about_window_controller_ updateText]
stringValue];
PostAutoupdateStatusNotification(kAutoupdateCurrent, @"foo");
- ASSERT_FALSE([lastText isEqual:[[about_window_controller_ updateText]
- stringValue]]);
+ ASSERT_NSNE(lastText, [[about_window_controller_ updateText] stringValue]);
lastText = [[about_window_controller_ updateText] stringValue];
PostAutoupdateStatusNotification(kAutoupdateCurrent, @"foo");
- ASSERT_TRUE([lastText isEqual:[[about_window_controller_ updateText]
- stringValue]]);
+ ASSERT_NSEQ(lastText, [[about_window_controller_ updateText] stringValue]);
lastText = [[about_window_controller_ updateText] stringValue];
PostAutoupdateStatusNotification(kAutoupdateCurrent, @"bar");
- ASSERT_FALSE([lastText isEqual:[[about_window_controller_ updateText]
- stringValue]]);
+ ASSERT_NSNE(lastText, [[about_window_controller_ updateText] stringValue]);
lastText = [[about_window_controller_ updateText] stringValue];
PostAutoupdateStatusNotification(kAutoupdateAvailable, nil);
- ASSERT_FALSE([lastText isEqual:[[about_window_controller_ updateText]
- stringValue]]);
+ ASSERT_NSNE(lastText, [[about_window_controller_ updateText] stringValue]);
lastText = [[about_window_controller_ updateText] stringValue];
PostAutoupdateStatusNotification(kAutoupdateCheckFailed, nil);
- ASSERT_FALSE([lastText isEqual:[[about_window_controller_ updateText]
- stringValue]]);
+ ASSERT_NSNE(lastText, [[about_window_controller_ updateText] stringValue]);
#if 0
// TODO(mark): The kAutoupdateInstalled portion of the test is disabled
@@ -126,19 +122,16 @@ TEST_F(AboutWindowControllerTest, TestCallbacks) {
lastText = [[about_window_controller_ updateText] stringValue];
PostAutoupdateStatusNotification(kAutoupdateInstalled, @"ver");
- ASSERT_FALSE([lastText isEqual:[[about_window_controller_ updateText]
- stringValue]]);
+ ASSERT_NSNE(lastText, [[about_window_controller_ updateText] stringValue]);
lastText = [[about_window_controller_ updateText] stringValue];
PostAutoupdateStatusNotification(kAutoupdateInstalled, nil);
- ASSERT_FALSE([lastText isEqual:[[about_window_controller_ updateText]
- stringValue]]);
+ ASSERT_NSNE(lastText, [[about_window_controller_ updateText] stringValue]);
#endif
lastText = [[about_window_controller_ updateText] stringValue];
PostAutoupdateStatusNotification(kAutoupdateInstallFailed, nil);
- ASSERT_FALSE([lastText isEqual:[[about_window_controller_
- updateText] stringValue]]);
+ ASSERT_NSNE(lastText, [[about_window_controller_ updateText] stringValue]);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698