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

Side by Side Diff: core/fxcrt/cfx_string_pool_template_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/cfx_string_pool_template.h ('k') | core/fxcrt/cfx_weak_ptr.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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/cfx_string_pool_template.h" 5 #include "core/fxcrt/cfx_string_pool_template.h"
6 #include "core/fxcrt/include/fx_string.h" 6 #include "core/fxcrt/fx_string.h"
7 #include "testing/fx_string_testhelpers.h" 7 #include "testing/fx_string_testhelpers.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 TEST(fxcrt, ByteStringPool) { 10 TEST(fxcrt, ByteStringPool) {
11 CFX_ByteStringPool pool; 11 CFX_ByteStringPool pool;
12 12
13 CFX_ByteString null1; 13 CFX_ByteString null1;
14 CFX_ByteString null2; 14 CFX_ByteString null2;
15 CFX_ByteString goats1("goats"); 15 CFX_ByteString goats1("goats");
16 CFX_ByteString goats2("goats"); 16 CFX_ByteString goats2("goats");
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 CFX_WideString reinterned_null1 = pool.Intern(null2); 85 CFX_WideString reinterned_null1 = pool.Intern(null2);
86 CFX_WideString reinterned_goats2 = pool.Intern(goats2); 86 CFX_WideString reinterned_goats2 = pool.Intern(goats2);
87 CFX_WideString reinterned_goats1 = pool.Intern(goats2); 87 CFX_WideString reinterned_goats1 = pool.Intern(goats2);
88 88
89 // After clearing pool, storage was re-interned using second strings. 89 // After clearing pool, storage was re-interned using second strings.
90 EXPECT_EQ(nullptr, interned_null1.m_pData.Get()); 90 EXPECT_EQ(nullptr, interned_null1.m_pData.Get());
91 EXPECT_EQ(nullptr, interned_null2.m_pData.Get()); 91 EXPECT_EQ(nullptr, interned_null2.m_pData.Get());
92 EXPECT_EQ(goats2.m_pData, reinterned_goats1.m_pData); 92 EXPECT_EQ(goats2.m_pData, reinterned_goats1.m_pData);
93 EXPECT_EQ(goats2.m_pData, reinterned_goats2.m_pData); 93 EXPECT_EQ(goats2.m_pData, reinterned_goats2.m_pData);
94 } 94 }
OLDNEW
« no previous file with comments | « core/fxcrt/cfx_string_pool_template.h ('k') | core/fxcrt/cfx_weak_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698