Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: core/fxcrt/fx_basic_bstring_unittest.cpp

Issue 2382723003: Move core/fxcrt/include to core/fxcrt (Closed)
Patch Set: Rebase to master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxcrt/fx_basic_bstring.cpp ('k') | core/fxcrt/fx_basic_buffer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium 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 "core/fxcrt/include/fx_string.h" 5 #include "core/fxcrt/fx_string.h"
6 #include "testing/fx_string_testhelpers.h" 6 #include "testing/fx_string_testhelpers.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 TEST(fxcrt, ByteStringOperatorSubscript) { 9 TEST(fxcrt, ByteStringOperatorSubscript) {
10 // CFX_ByteString includes the NUL terminator for non-empty strings. 10 // CFX_ByteString includes the NUL terminator for non-empty strings.
11 CFX_ByteString abc("abc"); 11 CFX_ByteString abc("abc");
12 EXPECT_EQ('a', abc[0]); 12 EXPECT_EQ('a', abc[0]);
13 EXPECT_EQ('b', abc[1]); 13 EXPECT_EQ('b', abc[1]);
14 EXPECT_EQ('c', abc[2]); 14 EXPECT_EQ('c', abc[2]);
15 EXPECT_EQ(0, abc[3]); 15 EXPECT_EQ(0, abc[3]);
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 } 1091 }
1092 } 1092 }
1093 1093
1094 TEST(fxcrt, EmptyByteString) { 1094 TEST(fxcrt, EmptyByteString) {
1095 CFX_ByteString empty_str; 1095 CFX_ByteString empty_str;
1096 EXPECT_TRUE(empty_str.IsEmpty()); 1096 EXPECT_TRUE(empty_str.IsEmpty());
1097 EXPECT_EQ(0, empty_str.GetLength()); 1097 EXPECT_EQ(0, empty_str.GetLength());
1098 const FX_CHAR* cstr = empty_str.c_str(); 1098 const FX_CHAR* cstr = empty_str.c_str();
1099 EXPECT_EQ(0, FXSYS_strlen(cstr)); 1099 EXPECT_EQ(0, FXSYS_strlen(cstr));
1100 } 1100 }
OLDNEW
« no previous file with comments | « core/fxcrt/fx_basic_bstring.cpp ('k') | core/fxcrt/fx_basic_buffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698