Fixed some error return values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
diff --git a/test/FTFace-Test.cpp b/test/FTFace-Test.cpp
index 186ca6e..dabe4ed 100755
--- a/test/FTFace-Test.cpp
+++ b/test/FTFace-Test.cpp
@@ -28,8 +28,7 @@ class FTFaceTest : public CppUnit::TestCase
void testOpenFace()
{
FTFace face1( BAD_FONT_FILE);
- // This is a different error # on Mac to other platforms (1)
- CPPUNIT_ASSERT( face1.Error() == 6);
+ CPPUNIT_ASSERT( face1.Error() == 0x06);
FTFace face2( GOOD_FONT_FILE);
CPPUNIT_ASSERT( face2.Error() == 0);
@@ -39,7 +38,7 @@ class FTFaceTest : public CppUnit::TestCase
void testOpenFaceFromMemory()
{
FTFace face1( (unsigned char*)100, 0);
- CPPUNIT_ASSERT( face1.Error() == 0x02);
+ CPPUNIT_ASSERT( face1.Error() == 0x02);
FTFace face2( HPGCalc_pfb.dataBytes, HPGCalc_pfb.numBytes);
CPPUNIT_ASSERT( face2.Error() == 0);
@@ -49,7 +48,7 @@ class FTFaceTest : public CppUnit::TestCase
void testAttachFile()
{
CPPUNIT_ASSERT( !testFace->Attach( TYPE1_AFM_FILE));
- CPPUNIT_ASSERT( testFace->Error() == 7);
+ CPPUNIT_ASSERT( testFace->Error() == 0x07);
FTFace test( TYPE1_FONT_FILE);
CPPUNIT_ASSERT( test.Error() == 0);
@@ -62,7 +61,7 @@ class FTFaceTest : public CppUnit::TestCase
void testAttachMemoryData()
{
CPPUNIT_ASSERT( !testFace->Attach((unsigned char*)100, 0));
- CPPUNIT_ASSERT( testFace->Error() == 7);
+ CPPUNIT_ASSERT( testFace->Error() == 0x07);
FTFace test( TYPE1_FONT_FILE);
CPPUNIT_ASSERT( test.Error() == 0);
diff --git a/test/FTFont-Test.cpp b/test/FTFont-Test.cpp
index 0c36f56..52a3d06 100755
--- a/test/FTFont-Test.cpp
+++ b/test/FTFont-Test.cpp
@@ -69,8 +69,7 @@ class FTFontTest : public CppUnit::TestCase
void testOpenFont()
{
TestFont badFont( BAD_FONT_FILE);
- // This is a different error # on Mac to other platforms (1)
- CPPUNIT_ASSERT( badFont.Error() == 6);
+ CPPUNIT_ASSERT( badFont.Error() == 0x06);
TestFont goodFont( GOOD_FONT_FILE);
CPPUNIT_ASSERT( goodFont.Error() == 0);
@@ -90,14 +89,14 @@ class FTFontTest : public CppUnit::TestCase
void testAttachFile()
{
testFont->Attach( TYPE1_AFM_FILE);
- CPPUNIT_ASSERT( testFont->Error() == 7);
+ CPPUNIT_ASSERT( testFont->Error() == 0x07);
}
void testAttachData()
{
testFont->Attach( (unsigned char*)100, 0);
- CPPUNIT_ASSERT( testFont->Error() == 7);
+ CPPUNIT_ASSERT( testFont->Error() == 0x07);
}