Added test for new crc32() function.

This commit is contained in:
Guido van Rossum 2000-02-16 21:13:06 +00:00
parent 7d47c9e38a
commit cba04366a4
1 changed files with 6 additions and 0 deletions

View File

@ -84,4 +84,10 @@ def addnoise(line):
res = res + b
assert res == testdata
# Test crc32()
crc = binascii.crc32("Test the CRC-32 of")
crc = binascii.crc32(" this string.", crc)
if crc != 1571220330:
print "binascii.crc32() failed."
# The hqx test is in test_binhex.py