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

Side by Side Diff: mojo/public/cpp/bindings/tests/string_unittest.cc

Issue 611633002: mojom: Add associative arrays to the mojom language. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved test classes to their own shared file. Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « mojo/public/cpp/bindings/tests/map_unittest.cc ('k') | mojo/public/mojo_public.gyp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/public/cpp/bindings/string.h" 5 #include "mojo/public/cpp/bindings/string.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace mojo { 8 namespace mojo {
9 namespace test { 9 namespace test {
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 String s("hello world"); 54 String s("hello world");
55 String t("hello world"); 55 String t("hello world");
56 EXPECT_EQ(s, t); 56 EXPECT_EQ(s, t);
57 EXPECT_TRUE(s == t); 57 EXPECT_TRUE(s == t);
58 EXPECT_TRUE("hello world" == s); 58 EXPECT_TRUE("hello world" == s);
59 EXPECT_TRUE(s == "hello world"); 59 EXPECT_TRUE(s == "hello world");
60 EXPECT_TRUE("not" != s); 60 EXPECT_TRUE("not" != s);
61 EXPECT_TRUE(s != "not"); 61 EXPECT_TRUE(s != "not");
62 } 62 }
63 63
64 TEST(StringTest, LessThanNullness) {
65 String null;
66 String null2;
67 EXPECT_FALSE(null < null2);
68 EXPECT_FALSE(null2 < null);
69
70 String real("real");
71 EXPECT_TRUE(null < real);
72 EXPECT_FALSE(real < null);
73 }
74
64 } // namespace test 75 } // namespace test
65 } // namespace mojo 76 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/map_unittest.cc ('k') | mojo/public/mojo_public.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698