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

Side by Side Diff: core/fpdftext/fpdf_text_int_unittest.cpp

Issue 1796303002: Tidy fpdftext/ directory (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 9 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/fpdftext/fpdf_text_int.cpp ('k') | core/fpdftext/text_int.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 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 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/fpdftext/fpdf_text_int.h"
6
5 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
6 8
7 #include "core/fpdftext/text_int.h"
8
9 // Class to help test functions in CPDF_LinkExtract class. 9 // Class to help test functions in CPDF_LinkExtract class.
10 class CPDF_TestLinkExtract : public CPDF_LinkExtract { 10 class CPDF_TestLinkExtract : public CPDF_LinkExtract {
11 private: 11 private:
12 // Add test cases as friends to access protected member functions. 12 // Add test cases as friends to access protected member functions.
13 // Access CheckMailLink. 13 // Access CheckMailLink.
14 FRIEND_TEST(fpdf_text_int, CheckMailLink); 14 FRIEND_TEST(fpdf_text_int, CheckMailLink);
15 }; 15 };
16 16
17 TEST(fpdf_text_int, CheckMailLink) { 17 TEST(fpdf_text_int, CheckMailLink) {
18 CPDF_TestLinkExtract extractor; 18 CPDF_TestLinkExtract extractor;
(...skipping 28 matching lines...) Expand all
47 {L"CAP.cap@Gmail.Com", L"CAP.cap@Gmail.Com"}, // Keep the original case. 47 {L"CAP.cap@Gmail.Com", L"CAP.cap@Gmail.Com"}, // Keep the original case.
48 }; 48 };
49 for (int i = 0; i < FX_ArraySize(valid_strs); ++i) { 49 for (int i = 0; i < FX_ArraySize(valid_strs); ++i) {
50 CFX_WideString text_str(valid_strs[i][0]); 50 CFX_WideString text_str(valid_strs[i][0]);
51 CFX_WideString expected_str(L"mailto:"); 51 CFX_WideString expected_str(L"mailto:");
52 expected_str += valid_strs[i][1]; 52 expected_str += valid_strs[i][1];
53 EXPECT_TRUE(extractor.CheckMailLink(text_str)); 53 EXPECT_TRUE(extractor.CheckMailLink(text_str));
54 EXPECT_STREQ(text_str.c_str(), expected_str.c_str()); 54 EXPECT_STREQ(text_str.c_str(), expected_str.c_str());
55 } 55 }
56 } 56 }
OLDNEW
« no previous file with comments | « core/fpdftext/fpdf_text_int.cpp ('k') | core/fpdftext/text_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698