diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-11-02 13:34:21 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-11-02 13:34:21 -0500 |
commit | 15a05705c546c64014b082bcd1d110dad1b94b72 (patch) | |
tree | 37c548943f19e4de99cb31fb5bb32a5f9ad39df7 /core/src/fpdfapi/fpdf_font/font_int.h | |
parent | 3343d146f2d9cd2f9eaa3a40fed3a5b94f3f107e (diff) | |
download | pdfium-15a05705c546c64014b082bcd1d110dad1b94b72.tar.xz |
Merge to XFA: Add test for StringToCode and StringToWideString
This CL adds a test case for the StringToCode and
StringToWideString methods in fpdf_font.cpp. In order
to do so, it moves the methods to be private methods of CPDF_ToUnicodeMap and
make the tests friends of the class.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1428593005 .
(cherry picked from commit 52b0b525dca3d982a04b77fa6d0913aff1e5fd9c)
Review URL: https://codereview.chromium.org/1425233004 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_font/font_int.h')
-rw-r--r-- | core/src/fpdfapi/fpdf_font/font_int.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h index 48e58d6345..559027b283 100644 --- a/core/src/fpdfapi/fpdf_font/font_int.h +++ b/core/src/fpdfapi/fpdf_font/font_int.h @@ -174,6 +174,13 @@ class CPDF_ToUnicodeMap { std::map<FX_DWORD, FX_DWORD> m_Map; CPDF_CID2UnicodeMap* m_pBaseMap; CFX_WideTextBuf m_MultiCharBuf; + + private: + friend class fpdf_font_StringToCode_Test; + friend class fpdf_font_StringToWideString_Test; + + static FX_DWORD StringToCode(const CFX_ByteStringC& str); + static CFX_WideString StringToWideString(const CFX_ByteStringC& str); }; class CPDF_FontCharMap : public CFX_CharMap { public: |