[Python-checkins] CVS: python/dist/src/Lib/test test_binascii.py,1.4,1.5

Guido van Rossum guido@cnri.reston.va.us
2000年2月16日 16:13:08 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Lib/test
In directory eric:/projects/python/develop/guido/src/Lib/test
Modified Files:
	test_binascii.py 
Log Message:
Added test for new crc32() function.
Index: test_binascii.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/test/test_binascii.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** test_binascii.py	1999年10月19日 19:08:13	1.4
--- test_binascii.py	2000年02月16日 21:13:06	1.5
***************
*** 85,87 ****
--- 85,93 ----
 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

AltStyle によって変換されたページ (->オリジナル) /