| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "wtf/text/StringView.h" | 5 #include "platform/wtf/text/StringView.h" |
| 6 | 6 |
| 7 #include "platform/wtf/text/AtomicString.h" |
| 8 #include "platform/wtf/text/StringImpl.h" |
| 9 #include "platform/wtf/text/WTFString.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "wtf/text/AtomicString.h" | |
| 9 #include "wtf/text/StringImpl.h" | |
| 10 #include "wtf/text/WTFString.h" | |
| 11 | 11 |
| 12 namespace WTF { | 12 namespace WTF { |
| 13 | 13 |
| 14 const char* kChars = "12345"; | 14 const char* kChars = "12345"; |
| 15 const LChar* kChars8 = reinterpret_cast<const LChar*>(kChars); | 15 const LChar* kChars8 = reinterpret_cast<const LChar*>(kChars); |
| 16 const UChar* kChars16 = reinterpret_cast<const UChar*>(u"12345"); | 16 const UChar* kChars16 = reinterpret_cast<const UChar*>(u"12345"); |
| 17 | 17 |
| 18 TEST(StringViewTest, ConstructionStringImpl8) { | 18 TEST(StringViewTest, ConstructionStringImpl8) { |
| 19 RefPtr<StringImpl> impl8Bit = StringImpl::create(kChars8, 5); | 19 RefPtr<StringImpl> impl8Bit = StringImpl::create(kChars8, 5); |
| 20 | 20 |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 EXPECT_FALSE(equalIgnoringASCIICase(StringView("link"), "INKL")); | 449 EXPECT_FALSE(equalIgnoringASCIICase(StringView("link"), "INKL")); |
| 450 EXPECT_FALSE( | 450 EXPECT_FALSE( |
| 451 equalIgnoringASCIICase(StringView("link"), "link different length")); | 451 equalIgnoringASCIICase(StringView("link"), "link different length")); |
| 452 EXPECT_FALSE( | 452 EXPECT_FALSE( |
| 453 equalIgnoringASCIICase(StringView("link different length"), "link")); | 453 equalIgnoringASCIICase(StringView("link different length"), "link")); |
| 454 | 454 |
| 455 EXPECT_TRUE(equalIgnoringASCIICase(StringView(""), "")); | 455 EXPECT_TRUE(equalIgnoringASCIICase(StringView(""), "")); |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace WTF | 458 } // namespace WTF |
| OLD | NEW |