| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "wtf/text/StringBuffer.h" | 7 #include "platform/wtf/text/StringBuffer.h" |
| 8 | 8 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace WTF { | 11 namespace WTF { |
| 12 | 12 |
| 13 TEST(StringBufferTest, Initial) { | 13 TEST(StringBufferTest, Initial) { |
| 14 StringBuffer<LChar> buf1; | 14 StringBuffer<LChar> buf1; |
| 15 EXPECT_EQ(0u, buf1.length()); | 15 EXPECT_EQ(0u, buf1.length()); |
| 16 EXPECT_FALSE(buf1.characters()); | 16 EXPECT_FALSE(buf1.characters()); |
| 17 | 17 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 buf.shrink(1); | 33 buf.shrink(1); |
| 34 EXPECT_EQ(1u, buf.length()); | 34 EXPECT_EQ(1u, buf.length()); |
| 35 EXPECT_EQ('a', buf[0]); | 35 EXPECT_EQ('a', buf[0]); |
| 36 | 36 |
| 37 buf.shrink(0); | 37 buf.shrink(0); |
| 38 EXPECT_EQ(0u, buf.length()); | 38 EXPECT_EQ(0u, buf.length()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // namespace WTF | 41 } // namespace WTF |
| OLD | NEW |