1
#include <cppunit/extensions/HelperMacros.h>
2
#include <cppunit/TestCaller.h>
3
#include <cppunit/TestCase.h>
4
#include <cppunit/TestSuite.h>
6
#include "FTCharToGlyphIndexMap.h"
9
class FTCharToGlyphIndexMapTest : public CppUnit::TestCase
11
CPPUNIT_TEST_SUITE( FTCharToGlyphIndexMapTest);
12
CPPUNIT_TEST( testConstructor);
13
CPPUNIT_TEST( testInsert);
14
CPPUNIT_TEST( testClear);
15
CPPUNIT_TEST_SUITE_END();
18
FTCharToGlyphIndexMapTest() : CppUnit::TestCase( "FTCharToGlyphIndexMap Test")
21
FTCharToGlyphIndexMapTest( const std::string& name) : CppUnit::TestCase(name) {}
23
void testConstructor()
25
FTCharToGlyphIndexMap testMap;
27
CPPUNIT_ASSERT( testMap.find( 2) == 0);
28
CPPUNIT_ASSERT( testMap.find( 5) == 0);
33
FTCharToGlyphIndexMap testMap;
35
testMap.insert( 2, 37);
37
CPPUNIT_ASSERT( testMap.find( 2) == 37);
38
CPPUNIT_ASSERT( testMap.find( 5) == 0);
43
FTCharToGlyphIndexMap testMap;
45
testMap.insert( 2, 37);
48
CPPUNIT_ASSERT( testMap.find( 2) == 0);
49
CPPUNIT_ASSERT( testMap.find( 5) == 0);
63
CPPUNIT_TEST_SUITE_REGISTRATION( FTCharToGlyphIndexMapTest);