Crc64Test.php 618 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace AlibabaCloud\Tea\OSSUtils\Tests;
  3. use AlibabaCloud\Tea\OSSUtils\Crc64;
  4. use PHPUnit\Framework\TestCase;
  5. /**
  6. * @internal
  7. * @coversNothing
  8. */
  9. class Crc64Test extends TestCase
  10. {
  11. public function testCrc64()
  12. {
  13. $crc = new Crc64();
  14. $crc->append('test');
  15. $this->assertEquals('18020588380933092773', $crc->getValue());
  16. $crc->append(' oss string');
  17. $this->assertEquals('5415765121994015315', $crc->getValue());
  18. $crc = new Crc64();
  19. $crc->append('test oss string');
  20. $this->assertEquals('5415765121994015315', $crc->getValue());
  21. }
  22. }