| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "wtf/text/StringImpl.h" | 27 #include "wtf/text/StringImpl.h" |
| 28 | 28 |
| 29 #include "wtf/text/WTFString.h" | 29 #include "wtf/text/WTFString.h" |
| 30 #include <gtest/gtest.h> | 30 #include <gtest/gtest.h> |
| 31 | 31 |
| 32 namespace WTF { | 32 namespace WTF { |
| 33 | 33 |
| 34 TEST(StringImplTest, Create8Bit) | 34 TEST(StringImplTest, Create8Bit) { |
| 35 { | 35 RefPtr<StringImpl> testStringImpl = StringImpl::create("1224"); |
| 36 RefPtr<StringImpl> testStringImpl = StringImpl::create("1224"); | 36 EXPECT_TRUE(testStringImpl->is8Bit()); |
| 37 EXPECT_TRUE(testStringImpl->is8Bit()); | |
| 38 } | 37 } |
| 39 | 38 |
| 40 TEST(StringImplTest, Latin1CaseFoldTable) | 39 TEST(StringImplTest, Latin1CaseFoldTable) { |
| 41 { | 40 LChar symbol = 0xff; |
| 42 LChar symbol = 0xff; | 41 while (symbol--) { |
| 43 while (symbol--) { | 42 EXPECT_EQ(Unicode::foldCase(symbol), StringImpl::latin1CaseFoldTable[symbol]
); |
| 44 EXPECT_EQ(Unicode::foldCase(symbol), StringImpl::latin1CaseFoldTable[sym
bol]); | 43 } |
| 45 } | |
| 46 } | 44 } |
| 47 | 45 |
| 48 } // namespace WTF | 46 } // namespace WTF |
| OLD | NEW |