From bd55239e7825b8d10255093d8c3fa03b43620a98 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 2 Nov 2015 16:26:55 -0500 Subject: Merge to XFA: Add tests for CMap_GetCode and CMap_GetCodeRange. This CL adds tests for the CMap_GetCode and CMap_GetCodeRange methods. To do so, it moves the methods to be static private members of CPDF_CMapParser and makes the test class a friend. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1414013005 . (cherry picked from commit afca65ac019d2ad4cb8ac8f585809cc1a519ac2b) Review URL: https://codereview.chromium.org/1429943002 . --- core/src/fpdfapi/fpdf_font/font_int.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/src/fpdfapi/fpdf_font/font_int.h') diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h index 559027b283..c7a00dccc9 100644 --- a/core/src/fpdfapi/fpdf_font/font_int.h +++ b/core/src/fpdfapi/fpdf_font/font_int.h @@ -77,6 +77,14 @@ class CPDF_CMapParser { CFX_BinaryBuf m_AddMaps; private: + friend class fpdf_font_cid_CMap_GetCode_Test; + friend class fpdf_font_cid_CMap_GetCodeRange_Test; + + static FX_DWORD CMap_GetCode(const CFX_ByteStringC& word); + static bool CMap_GetCodeRange(CMap_CodeRange& range, + const CFX_ByteStringC& first, + const CFX_ByteStringC& second); + CPDF_CMap* m_pCMap; int m_Status; int m_CodeSeq; -- cgit v1.2.3