File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ Issue #67 (uint64_t)
55if (!extension_loaded ("msgpack " )) {
66 die ("skip " );
77}
8+ if (PHP_INT_SIZE !== 8 )
9+ die ("skip this test is for 64-bit platforms only " );
810?>
911--FILE--
1012<?php
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Issue #67 (uint64_t)
3+ --SKIPIF--
4+ <?php
5+ if (!extension_loaded ("msgpack " )) {
6+ die ("skip " );
7+ }
8+ if (PHP_INT_SIZE !== 4 )
9+ die ("skip this test is for 32-bit platforms only " );
10+ ?>
11+ --FILE--
12+ <?php
13+ var_dump (msgpack_unpack ("\xcf" ."\x7f\xff\xff\xff" ."\xff\xff\xff\xff" ));
14+ var_dump (msgpack_unpack ("\xcf" ."\x80\x00\x00\x00" ."\x00\x00\x00\x00" ));
15+ var_dump (msgpack_unpack ("\xcf" ."\xff\xff\xff\xff" ."\xff\xff\xff\xff" ));
16+ ?>
17+ OK
18+ --EXPECT--
19+ string(19) "9223372036854775807"
20+ string(19) "9223372036854775808"
21+ string(20) "18446744073709551615"
22+ OK
You can’t perform that action at this time.
0 commit comments