aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohannes Schickel2008-02-19 00:10:05 +0000
committerJohannes Schickel2008-02-19 00:10:05 +0000
commit15d8e578ed17a9940a08e3ac8e6c5d7e5a6075ef (patch)
treebf1c883b5c0000803d43fd7f3f2eaf7304c4d10f /test
parent896b46323ff2d57f7496b2ec58f0cf606239bf76 (diff)
downloadscummvm-rg350-15d8e578ed17a9940a08e3ac8e6c5d7e5a6075ef.tar.gz
scummvm-rg350-15d8e578ed17a9940a08e3ac8e6c5d7e5a6075ef.tar.bz2
scummvm-rg350-15d8e578ed17a9940a08e3ac8e6c5d7e5a6075ef.zip
Fixed some warnings.
svn-id: r30906
Diffstat (limited to 'test')
-rw-r--r--test/common/pack.h12
-rw-r--r--test/common/seekablesubreadstream.h16
2 files changed, 14 insertions, 14 deletions
diff --git a/test/common/pack.h b/test/common/pack.h
index 1db8c8c409..6d18c9c300 100644
--- a/test/common/pack.h
+++ b/test/common/pack.h
@@ -22,15 +22,15 @@ class PackTestSuite : public CxxTest::TestSuite
public:
void test_packing( void )
{
- TS_ASSERT_EQUALS( sizeof(TestStruct), 4+1+2+4+1 );
+ TS_ASSERT_EQUALS( sizeof(TestStruct), size_t(4+1+2+4+1) );
}
void test_offsets( void )
{
- TS_ASSERT_EQUALS( OFFS(TestStruct, x), 0 );
- TS_ASSERT_EQUALS( OFFS(TestStruct, y), 4 );
- TS_ASSERT_EQUALS( OFFS(TestStruct, z), 5 );
- TS_ASSERT_EQUALS( OFFS(TestStruct, a), 7 );
- TS_ASSERT_EQUALS( OFFS(TestStruct, b), 11 );
+ TS_ASSERT_EQUALS( OFFS(TestStruct, x), (ptrdiff_t)0 );
+ TS_ASSERT_EQUALS( OFFS(TestStruct, y), (ptrdiff_t)4 );
+ TS_ASSERT_EQUALS( OFFS(TestStruct, z), (ptrdiff_t)5 );
+ TS_ASSERT_EQUALS( OFFS(TestStruct, a), (ptrdiff_t)7 );
+ TS_ASSERT_EQUALS( OFFS(TestStruct, b), (ptrdiff_t)11 );
}
};
diff --git a/test/common/seekablesubreadstream.h b/test/common/seekablesubreadstream.h
index 86ccf4c670..c4b21667c7 100644
--- a/test/common/seekablesubreadstream.h
+++ b/test/common/seekablesubreadstream.h
@@ -20,7 +20,7 @@ class SeekableSubReadStreamTestSuite : public CxxTest::TestSuite
{
TS_ASSERT( !ssrs.eos() );
- TS_ASSERT_EQUALS( i - start, ssrs.pos() );
+ TS_ASSERT_EQUALS( uint32(i - start), ssrs.pos() );
ssrs.read(&b, 1);
TS_ASSERT_EQUALS( i, b );
@@ -37,34 +37,34 @@ class SeekableSubReadStreamTestSuite : public CxxTest::TestSuite
Common::SeekableSubReadStream ssrs = Common::SeekableSubReadStream(&ms, 1, 9);
byte b;
- TS_ASSERT_EQUALS( ssrs.pos(), 0 );
+ TS_ASSERT_EQUALS( ssrs.pos(), (uint32)0 );
ssrs.seek(1, SEEK_SET);
- TS_ASSERT_EQUALS( ssrs.pos(), 1 );
+ TS_ASSERT_EQUALS( ssrs.pos(), (uint32)1 );
b = ssrs.readByte();
TS_ASSERT_EQUALS( b, 2 );
ssrs.seek(5, SEEK_CUR);
- TS_ASSERT_EQUALS( ssrs.pos(), 7 );
+ TS_ASSERT_EQUALS( ssrs.pos(), (uint32)7 );
b = ssrs.readByte();
TS_ASSERT_EQUALS( b, 8 );
ssrs.seek(-3, SEEK_CUR);
- TS_ASSERT_EQUALS( ssrs.pos(), 5 );
+ TS_ASSERT_EQUALS( ssrs.pos(), (uint32)5 );
b = ssrs.readByte();
TS_ASSERT_EQUALS( b, 6 );
ssrs.seek(0, SEEK_END);
- TS_ASSERT_EQUALS( ssrs.pos(), 8 );
+ TS_ASSERT_EQUALS( ssrs.pos(), (uint32)8 );
TS_ASSERT( ssrs.eos() );
ssrs.seek(3, SEEK_END);
- TS_ASSERT_EQUALS( ssrs.pos(), 5 );
+ TS_ASSERT_EQUALS( ssrs.pos(), (uint32)5 );
b = ssrs.readByte();
TS_ASSERT_EQUALS( b, 6 );
ssrs.seek(8, SEEK_END);
- TS_ASSERT_EQUALS( ssrs.pos(), 0 );
+ TS_ASSERT_EQUALS( ssrs.pos(), (uint32)0 );
b = ssrs.readByte();
TS_ASSERT_EQUALS( b, 1 );
}