Mercurial > hgrepos > Python > apps > py-cutils
comparison tests/test_crc32.py @ 257:1181d8cb4846
Tests: add a tests for the 32-bit border
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 16 Feb 2025 09:30:23 +0100 |
| parents | d852559df523 |
| children | 7f797d71bd5e |
comparison
equal
deleted
inserted
replaced
| 256:d50e89d92fa3 | 257:1181d8cb4846 |
|---|---|
| 118 | 118 |
| 119 def test_struct_pack(self): | 119 def test_struct_pack(self): |
| 120 self.assertEqual( | 120 self.assertEqual( |
| 121 struct.pack(">I", 3421780262), | 121 struct.pack(">I", 3421780262), |
| 122 struct.pack(">i", -873187034)) | 122 struct.pack(">i", -873187034)) |
| 123 self.assertEqual( | |
| 124 struct.pack(">i", -2147483648), | |
| 125 struct.pack(">I", 0x80000000)) | |
| 123 | 126 |
| 124 | 127 |
| 125 if __name__ == "__main__": | 128 if __name__ == "__main__": |
| 126 unittest.main() | 129 unittest.main() |
