buffertools-php
buffertools-php copied to clipboard
hex/getHex issue with value 12a05f200 (5e9)
An additional zero is added after hex/getHex operations applied. I've checked and it looks like it is pack/unpack behavior for the 'H*' format.
The commit with a test to demonstrate the issue: https://github.com/olegabr/buffertools-php/commit/56d7bb3f80612320912059f7b13fb5f985b4ca9f
$ ./vendor/bin/phpunit
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.
Error: No code coverage driver is available
........F...................................................... 63 / 196 ( 32%)
............................................................... 126 / 196 ( 64%)
............................................................... 189 / 196 ( 96%)
....... 196 / 196 (100%)
Time: 40 ms, Memory: 6.00MB
There was 1 failure:
1) BitWasp\Buffertools\Tests\BufferTest::testSerialize2
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'12a05f200'
+'12a05f2000'
buffertools-php/tests/BufferTest.php:106
FAILURES!
Tests: 196, Assertions: 592, Failures: 1