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

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

Issue 1171733003: Remove typdefs for pointer types in fx_system.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual fixes. Created 5 years, 6 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/src/fxcrt/fx_basic_bstring.cpp ('k') | core/src/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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "../../../testing/fx_string_testhelpers.h" 6 #include "../../../testing/fx_string_testhelpers.h"
7 #include "../../include/fxcrt/fx_basic.h" 7 #include "../../include/fxcrt/fx_basic.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.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 EXPECT_EQ(null_string, empty_string); 271 EXPECT_EQ(null_string, empty_string);
272 272
273 CFX_ByteStringC assigned_null_string("initially not NULL"); 273 CFX_ByteStringC assigned_null_string("initially not NULL");
274 assigned_null_string = null_string; 274 assigned_null_string = null_string;
275 EXPECT_EQ(assigned_null_string.GetPtr(), nullptr); 275 EXPECT_EQ(assigned_null_string.GetPtr(), nullptr);
276 EXPECT_EQ(assigned_null_string.GetLength(), 0); 276 EXPECT_EQ(assigned_null_string.GetLength(), 0);
277 EXPECT_TRUE(assigned_null_string.IsEmpty()); 277 EXPECT_TRUE(assigned_null_string.IsEmpty());
278 EXPECT_EQ(null_string, assigned_null_string); 278 EXPECT_EQ(null_string, assigned_null_string);
279 279
280 CFX_ByteStringC assigned_nullptr_string("initially not NULL"); 280 CFX_ByteStringC assigned_nullptr_string("initially not NULL");
281 assigned_nullptr_string = (FX_LPCSTR)nullptr; 281 assigned_nullptr_string = (const FX_CHAR*)nullptr;
282 EXPECT_EQ(assigned_nullptr_string.GetPtr(), nullptr); 282 EXPECT_EQ(assigned_nullptr_string.GetPtr(), nullptr);
283 EXPECT_EQ(assigned_nullptr_string.GetLength(), 0); 283 EXPECT_EQ(assigned_nullptr_string.GetLength(), 0);
284 EXPECT_TRUE(assigned_nullptr_string.IsEmpty()); 284 EXPECT_TRUE(assigned_nullptr_string.IsEmpty());
285 EXPECT_EQ(null_string, assigned_nullptr_string); 285 EXPECT_EQ(null_string, assigned_nullptr_string);
286 286
287 CFX_ByteStringC non_null_string("a"); 287 CFX_ByteStringC non_null_string("a");
288 EXPECT_NE(null_string, non_null_string); 288 EXPECT_NE(null_string, non_null_string);
289 } 289 }
290 290
291 TEST(fxcrt, ByteStringConcatInPlace) { 291 TEST(fxcrt, ByteStringConcatInPlace) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 const char* c_string2 = "hellp"; 596 const char* c_string2 = "hellp";
597 const char* c_string3 = "hellod"; 597 const char* c_string3 = "hellod";
598 EXPECT_TRUE(byte_string_c != c_string1); 598 EXPECT_TRUE(byte_string_c != c_string1);
599 EXPECT_TRUE(byte_string_c != c_string2); 599 EXPECT_TRUE(byte_string_c != c_string2);
600 EXPECT_TRUE(byte_string_c != c_string3); 600 EXPECT_TRUE(byte_string_c != c_string3);
601 601
602 EXPECT_TRUE(c_string1 != byte_string_c); 602 EXPECT_TRUE(c_string1 != byte_string_c);
603 EXPECT_TRUE(c_string2 != byte_string_c); 603 EXPECT_TRUE(c_string2 != byte_string_c);
604 EXPECT_TRUE(c_string3 != byte_string_c); 604 EXPECT_TRUE(c_string3 != byte_string_c);
605 } 605 }
OLDNEW
« no previous file with comments | « core/src/fxcrt/fx_basic_bstring.cpp ('k') | core/src/fxcrt/fx_basic_buffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698