diff options
author | Nicolas Pena <npm@chromium.org> | 2017-05-26 14:38:03 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-26 18:52:27 +0000 |
commit | 169b30187bf5798a6106b5ab16288c9d86861f8b (patch) | |
tree | 19aa282b55c43eda4f8ebf1a8fd70acf6296aad0 /core/fpdfapi/font/fpdf_font_unittest.cpp | |
parent | f677e18c985646c4ae1c5ec36445cdbf6bf78a6a (diff) | |
download | pdfium-169b30187bf5798a6106b5ab16288c9d86861f8b.tar.xz |
Use proper file names in core/fpdfapi/font
This CL splits up font_int.h into files by classes. It also renames the
unittests to match the class being tested. Finally, it renames the ttgsubtable
files to match the class name.
Change-Id: I6187caa9e82d12b9a66e955113fe327d52042ae0
Reviewed-on: https://pdfium-review.googlesource.com/6090
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/fpdf_font_unittest.cpp')
-rw-r--r-- | core/fpdfapi/font/fpdf_font_unittest.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/core/fpdfapi/font/fpdf_font_unittest.cpp b/core/fpdfapi/font/fpdf_font_unittest.cpp deleted file mode 100644 index 977ae8a3bb..0000000000 --- a/core/fpdfapi/font/fpdf_font_unittest.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2015 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "core/fpdfapi/font/font_int.h" -#include "testing/gtest/include/gtest/gtest.h" - -TEST(fpdf_font, StringToCode) { - EXPECT_EQ(0u, CPDF_ToUnicodeMap::StringToCode("")); - EXPECT_EQ(194u, CPDF_ToUnicodeMap::StringToCode("<c2")); - EXPECT_EQ(162u, CPDF_ToUnicodeMap::StringToCode("<A2")); - EXPECT_EQ(2802u, CPDF_ToUnicodeMap::StringToCode("<Af2")); - EXPECT_EQ(12u, CPDF_ToUnicodeMap::StringToCode("12")); - EXPECT_EQ(128u, CPDF_ToUnicodeMap::StringToCode("128")); -} - -TEST(fpdf_font, StringToWideString) { - EXPECT_EQ(L"", CPDF_ToUnicodeMap::StringToWideString("")); - EXPECT_EQ(L"", CPDF_ToUnicodeMap::StringToWideString("1234")); - - EXPECT_EQ(L"", CPDF_ToUnicodeMap::StringToWideString("<c2")); - - CFX_WideString res = L"\xc2ab"; - EXPECT_EQ(res, CPDF_ToUnicodeMap::StringToWideString("<c2ab")); - EXPECT_EQ(res, CPDF_ToUnicodeMap::StringToWideString("<c2abab")); - EXPECT_EQ(res, CPDF_ToUnicodeMap::StringToWideString("<c2ab 1234")); - - res += L"\xfaab"; - EXPECT_EQ(res, CPDF_ToUnicodeMap::StringToWideString("<c2abFaAb")); -} |