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

Unified Diff: chrome/browser/cocoa/location_bar/autocomplete_text_field_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/location_bar/autocomplete_text_field_unittest.mm
diff --git a/chrome/browser/cocoa/location_bar/autocomplete_text_field_unittest.mm b/chrome/browser/cocoa/location_bar/autocomplete_text_field_unittest.mm
index 29beb38e71947a4ab16d9d8ff1c69f9ad772038d..f39400ebfbfc6643f4a3b7e15382f00ffa8f8381 100644
--- a/chrome/browser/cocoa/location_bar/autocomplete_text_field_unittest.mm
+++ b/chrome/browser/cocoa/location_bar/autocomplete_text_field_unittest.mm
@@ -16,6 +16,7 @@
#include "grit/theme_resources.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
using ::testing::InSequence;
@@ -654,11 +655,11 @@ TEST_F(AutocompleteTextFieldTest, SetAttributedStringBaseline) {
attributes:attributes]);
// Check that what we get back looks like what we put in.
- EXPECT_FALSE([[field_ stringValue] isEqualToString:kString]);
+ EXPECT_NSNE(kString, [field_ stringValue]);
[field_ setAttributedStringValue:attributedString];
EXPECT_TRUE([[field_ attributedStringValue]
isEqualToAttributedString:attributedString]);
- EXPECT_TRUE([[field_ stringValue] isEqualToString:kString]);
+ EXPECT_NSEQ(kString, [field_ stringValue]);
// Try that again with focus.
[test_window() makePretendKeyWindowAndSetFirstResponder:field_];
@@ -667,11 +668,11 @@ TEST_F(AutocompleteTextFieldTest, SetAttributedStringBaseline) {
// Check that what we get back looks like what we put in.
[field_ setStringValue:@""];
- EXPECT_FALSE([[field_ stringValue] isEqualToString:kString]);
+ EXPECT_NSNE(kString, [field_ stringValue]);
[field_ setAttributedStringValue:attributedString];
EXPECT_TRUE([[field_ attributedStringValue]
isEqualToAttributedString:attributedString]);
- EXPECT_TRUE([[field_ stringValue] isEqualToString:kString]);
+ EXPECT_NSEQ(kString, [field_ stringValue]);
}
// -setAttributedStringValue: shouldn't reset the undo state if things

Powered by Google App Engine
This is Rietveld 408576698