| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |