Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/issue067.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Issue #67 (uint64_t)
if (!extension_loaded("msgpack")) {
die("skip");
}
if (PHP_INT_SIZE !== 8)
die("skip this test is for 64-bit platforms only");
?>
--FILE--
<?php
Expand Down
22 changes: 22 additions & 0 deletions tests/issue067_32bit.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--TEST--
Issue #67 (uint64_t)
--SKIPIF--
<?php
if (!extension_loaded("msgpack")) {
die("skip");
}
if (PHP_INT_SIZE !== 4)
die("skip this test is for 32-bit platforms only");
?>
--FILE--
<?php
var_dump(msgpack_unpack("\xcf"."\x7f\xff\xff\xff"."\xff\xff\xff\xff"));
var_dump(msgpack_unpack("\xcf"."\x80\x00\x00\x00"."\x00\x00\x00\x00"));
var_dump(msgpack_unpack("\xcf"."\xff\xff\xff\xff"."\xff\xff\xff\xff"));
?>
OK
--EXPECT--
string(19) "9223372036854775807"
string(19) "9223372036854775808"
string(20) "18446744073709551615"
OK