| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/string_piece.h" | 7 #include "base/string_piece.h" |
| 8 | 8 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 531 |
| 532 TEST(StringPieceTest, StringCompareNotAmbiguous) { | 532 TEST(StringPieceTest, StringCompareNotAmbiguous) { |
| 533 ASSERT_TRUE("hello" == std::string("hello")); | 533 ASSERT_TRUE("hello" == std::string("hello")); |
| 534 ASSERT_TRUE("hello" < std::string("world")); | 534 ASSERT_TRUE("hello" < std::string("world")); |
| 535 } | 535 } |
| 536 | 536 |
| 537 TEST(StringPieceTest, HeterogenousStringPieceEquals) { | 537 TEST(StringPieceTest, HeterogenousStringPieceEquals) { |
| 538 ASSERT_TRUE(StringPiece("hello") == std::string("hello")); | 538 ASSERT_TRUE(StringPiece("hello") == std::string("hello")); |
| 539 ASSERT_TRUE("hello" == StringPiece("hello")); | 539 ASSERT_TRUE("hello" == StringPiece("hello")); |
| 540 } | 540 } |
| 541 | |
| OLD | NEW |