~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to extern/bFTGL/test/FTCharToGlyphIndexMap-Test.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <cppunit/extensions/HelperMacros.h>
 
2
#include <cppunit/TestCaller.h>
 
3
#include <cppunit/TestCase.h>
 
4
#include <cppunit/TestSuite.h>
 
5
 
 
6
#include "FTCharToGlyphIndexMap.h"
 
7
 
 
8
 
 
9
class FTCharToGlyphIndexMapTest : public CppUnit::TestCase
 
10
{
 
11
    CPPUNIT_TEST_SUITE( FTCharToGlyphIndexMapTest);
 
12
        CPPUNIT_TEST( testConstructor);
 
13
        CPPUNIT_TEST( testInsert);
 
14
        CPPUNIT_TEST( testClear);
 
15
    CPPUNIT_TEST_SUITE_END();
 
16
        
 
17
    public:
 
18
        FTCharToGlyphIndexMapTest() : CppUnit::TestCase( "FTCharToGlyphIndexMap Test")
 
19
        {}
 
20
        
 
21
        FTCharToGlyphIndexMapTest( const std::string& name) : CppUnit::TestCase(name) {}
 
22
 
 
23
        void testConstructor()
 
24
        {
 
25
            FTCharToGlyphIndexMap testMap;
 
26
            
 
27
            CPPUNIT_ASSERT( testMap.find( 2) == 0);
 
28
            CPPUNIT_ASSERT( testMap.find( 5) == 0);
 
29
        }
 
30
        
 
31
        void testInsert()
 
32
        {
 
33
            FTCharToGlyphIndexMap testMap;
 
34
            
 
35
            testMap.insert( 2, 37);
 
36
            
 
37
            CPPUNIT_ASSERT( testMap.find( 2) == 37);
 
38
            CPPUNIT_ASSERT( testMap.find( 5) == 0);
 
39
        }
 
40
        
 
41
        void testClear()
 
42
        {
 
43
            FTCharToGlyphIndexMap testMap;
 
44
            
 
45
            testMap.insert( 2, 37);
 
46
            testMap.clear();
 
47
            
 
48
            CPPUNIT_ASSERT( testMap.find( 2) == 0);
 
49
            CPPUNIT_ASSERT( testMap.find( 5) == 0);
 
50
        }
 
51
        
 
52
        
 
53
        void setUp() 
 
54
        {}
 
55
        
 
56
        
 
57
        void tearDown() 
 
58
        {}
 
59
        
 
60
    private:
 
61
};
 
62
 
 
63
CPPUNIT_TEST_SUITE_REGISTRATION( FTCharToGlyphIndexMapTest);
 
64