Skip to content

hex/getHex issue with value 12a05f200 (5e9) #98

@olegabr

Description

@olegabr

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: olegabr@56d7bb3

$ ./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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions