2012-10-24 18:43 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/hbmlzo/tests/test.prg
    * changed LZO_ADLER32() calls to HB_ADLER32() in test app.
This commit is contained in:
Viktor Szakats
2012-10-24 16:44:52 +00:00
parent a0bd1cd972
commit 7082dceae1
2 changed files with 7 additions and 3 deletions

View File

@@ -16,6 +16,10 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-24 18:43 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbmlzo/tests/test.prg
* changed LZO_ADLER32() calls to HB_ADLER32() in test app.
2012-10-24 18:30 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbmlzo/core.c
* LZO_ADLER32() changed to use core checksum function.

View File

@@ -46,7 +46,7 @@ PROCEDURE Main()
?
cStr := Replicate( TEST_STRING, 500 )
nLen := Len( cStr )
checksum := lzo_adler32( cStr )
checksum := hb_adler32( cStr )
cCompressed := hb_lzo1x_1_compress( @cStr, @nLenC, @nResult )
ShowResult( @cStr, @cCompressed, @nLenC, @nResult )
@@ -60,7 +60,7 @@ PROCEDURE Main()
nLenD := nLenC
cDeCompressed := hb_lzo1x_decompress_safe( @cCompressed, @nLenD, @nResult )
IF nResult != LZO_E_OK .OR. nLenD != nLen .OR. checksum != lzo_adler32( cDeCompressed )
IF nResult != LZO_E_OK .OR. nLenD != nLen .OR. checksum != hb_adler32( cDeCompressed )
? "Internal error - decompression failed: ", hb_ntos( nResult )
ELSE
? hb_strFormat( FMT2_STRING, nLenC, nLenD, nLen )
@@ -79,7 +79,7 @@ PROCEDURE Main()
nLenD := nLen
cDeCompressed := hb_lzo1x_decompress( @cCompressed, @nLenD, @nResult )
IF nResult != LZO_E_OK .OR. nLenD != nLen .OR. checksum != lzo_adler32( cDeCompressed )
IF nResult != LZO_E_OK .OR. nLenD != nLen .OR. checksum != hb_adler32( cDeCompressed )
? "Internal error - decompression failed: ", hb_ntos( nResult )
ELSE
? hb_strFormat( FMT2_STRING, nLenC, nLenD, nLen )