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

Side by Side Diff: base/strings/nullable_string16_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « base/stl_util_unittest.cc ('k') | base/strings/pattern_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/strings/nullable_string16.h" 5 #include "base/strings/nullable_string16.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/googletest/include/gtest/gtest.h"
8 8
9 namespace base { 9 namespace base {
10 10
11 TEST(NullableString16Test, DefaultConstructor) { 11 TEST(NullableString16Test, DefaultConstructor) {
12 NullableString16 s; 12 NullableString16 s;
13 EXPECT_TRUE(s.is_null()); 13 EXPECT_TRUE(s.is_null());
14 EXPECT_EQ(string16(), s.string()); 14 EXPECT_EQ(string16(), s.string());
15 } 15 }
16 16
17 TEST(NullableString16Test, Equals) { 17 TEST(NullableString16Test, Equals) {
18 NullableString16 a(ASCIIToUTF16("hello"), false); 18 NullableString16 a(ASCIIToUTF16("hello"), false);
19 NullableString16 b(ASCIIToUTF16("hello"), false); 19 NullableString16 b(ASCIIToUTF16("hello"), false);
20 EXPECT_EQ(a, b); 20 EXPECT_EQ(a, b);
21 } 21 }
22 22
23 TEST(NullableString16Test, NotEquals) { 23 TEST(NullableString16Test, NotEquals) {
24 NullableString16 a(ASCIIToUTF16("hello"), false); 24 NullableString16 a(ASCIIToUTF16("hello"), false);
25 NullableString16 b(ASCIIToUTF16("world"), false); 25 NullableString16 b(ASCIIToUTF16("world"), false);
26 EXPECT_NE(a, b); 26 EXPECT_NE(a, b);
27 } 27 }
28 28
29 TEST(NullableString16Test, NotEqualsNull) { 29 TEST(NullableString16Test, NotEqualsNull) {
30 NullableString16 a(ASCIIToUTF16("hello"), false); 30 NullableString16 a(ASCIIToUTF16("hello"), false);
31 NullableString16 b; 31 NullableString16 b;
32 EXPECT_NE(a, b); 32 EXPECT_NE(a, b);
33 } 33 }
34 34
35 } // namespace base 35 } // namespace base
OLDNEW
« no previous file with comments | « base/stl_util_unittest.cc ('k') | base/strings/pattern_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698