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

Side by Side Diff: core/fxcrt/fx_basic_wstring_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_wstring.cpp ('k') | core/fxcrt/fx_bidi.h » ('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_basic.h" 5 #include "core/fxcrt/fx_basic.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, WideStringOperatorSubscript) { 9 TEST(fxcrt, WideStringOperatorSubscript) {
10 // CFX_WideString includes the NUL terminator for non-empty strings. 10 // CFX_WideString includes the NUL terminator for non-empty strings.
11 CFX_WideString abc(L"abc"); 11 CFX_WideString abc(L"abc");
12 EXPECT_EQ(L'a', abc[0]); 12 EXPECT_EQ(L'a', abc[0]);
13 EXPECT_EQ(L'b', abc[1]); 13 EXPECT_EQ(L'b', abc[1]);
14 EXPECT_EQ(L'c', abc[2]); 14 EXPECT_EQ(L'c', abc[2]);
15 EXPECT_EQ(L'\0', abc[3]); 15 EXPECT_EQ(L'\0', abc[3]);
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 } 932 }
933 } 933 }
934 934
935 TEST(fxcrt, EmptyWideString) { 935 TEST(fxcrt, EmptyWideString) {
936 CFX_WideString empty_str; 936 CFX_WideString empty_str;
937 EXPECT_TRUE(empty_str.IsEmpty()); 937 EXPECT_TRUE(empty_str.IsEmpty());
938 EXPECT_EQ(0, empty_str.GetLength()); 938 EXPECT_EQ(0, empty_str.GetLength());
939 const FX_WCHAR* cstr = empty_str.c_str(); 939 const FX_WCHAR* cstr = empty_str.c_str();
940 EXPECT_EQ(0, FXSYS_wcslen(cstr)); 940 EXPECT_EQ(0, FXSYS_wcslen(cstr));
941 } 941 }
OLDNEW
« no previous file with comments | « core/fxcrt/fx_basic_wstring.cpp ('k') | core/fxcrt/fx_bidi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698