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 <sstream> | 5 #include <sstream> |
6 | 6 |
| 7 #include "gtest/gtest.h" |
7 #include "mojo/public/cpp/bindings/string.h" | 8 #include "mojo/public/cpp/bindings/string.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | |
9 | 9 |
10 namespace mojo { | 10 namespace mojo { |
11 namespace test { | 11 namespace test { |
12 | 12 |
13 TEST(StringTest, DefaultIsNull) { | 13 TEST(StringTest, DefaultIsNull) { |
14 String s; | 14 String s; |
15 EXPECT_TRUE(s.is_null()); | 15 EXPECT_TRUE(s.is_null()); |
16 } | 16 } |
17 | 17 |
18 TEST(StringTest, ConstructedWithNull) { | 18 TEST(StringTest, ConstructedWithNull) { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 String s("abc"); | 122 String s("abc"); |
123 String null; | 123 String null; |
124 | 124 |
125 std::ostringstream so; | 125 std::ostringstream so; |
126 so << "s=" << s << ", null=" << null; | 126 so << "s=" << s << ", null=" << null; |
127 EXPECT_EQ("s=abc, null=", so.str()); | 127 EXPECT_EQ("s=abc, null=", so.str()); |
128 } | 128 } |
129 | 129 |
130 } // namespace test | 130 } // namespace test |
131 } // namespace mojo | 131 } // namespace mojo |
OLD | NEW |