use CPPUNIT_ASSERT_EQUAL
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5558 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2efd32160b
commit
77e9be5dcc
1 changed files with 5 additions and 5 deletions
|
@ -79,20 +79,20 @@ public:
|
|||
|
||||
CPPUNIT_ASSERT_MESSAGE( "decompressed data is smaller", data.getlen() <= decompressed.getlen() );
|
||||
CPPUNIT_ASSERT_MESSAGE( "decompressed data is larger", data.getlen() >= decompressed.getlen() );
|
||||
CPPUNIT_ASSERT_MESSAGE( "decompressed data is different", !memcmp(data.get(), decompressed.get(), data.getlen()) );
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE( "decompressed data is different", 0, memcmp(data.get(), decompressed.get(), data.getlen()) );
|
||||
}
|
||||
|
||||
void testCompressDecompress(ICompressor &compressor, IDecompressor& decompressor) {
|
||||
CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
|
||||
CPPUNIT_ASSERT_EQUAL( C_OK, compressor.Init(9, 1 << 23) );
|
||||
testCompressDecompress(1, compressor, decompressor);
|
||||
|
||||
CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
|
||||
CPPUNIT_ASSERT_EQUAL( C_OK, compressor.Init(9, 1 << 23) );
|
||||
testCompressDecompress(1024, compressor, decompressor);
|
||||
|
||||
CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
|
||||
CPPUNIT_ASSERT_EQUAL( C_OK, compressor.Init(9, 1 << 23) );
|
||||
testCompressDecompress(8*1024, compressor, decompressor);
|
||||
|
||||
CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
|
||||
CPPUNIT_ASSERT_EQUAL( C_OK, compressor.Init(9, 1 << 23) );
|
||||
testCompressDecompress(32*1024, compressor, decompressor);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue