fix #6: compatibility with 8.2
[awesomized/ext-ion] / tests / Reader / Buffer.phpt
1 --TEST--
2 ion\Reader\Buffer
3 --EXTENSIONS--
4 ion
5 --FILE--
6 TEST
7 <?php
8 $s = "123d0";
9 $r = new ion\Reader\Buffer\Reader($s);
10 $r->next();
11 var_dump($r->readDecimal());
12 var_dump($s === $r->getBuffer());
13 ?>
14 DONE
15 --EXPECTF--
16 TEST
17 object(ion\Decimal)#%d (2) {
18 ["number"]=>
19 int(123)
20 ["context"]=>
21 object(ion\Decimal\Context)#%d (5) {
22 ["digits"]=>
23 int(999999999)
24 ["eMax"]=>
25 int(999999999)
26 ["eMin"]=>
27 int(-999999999)
28 ["round"]=>
29 int(3)
30 ["clamp"]=>
31 bool(false)
32 }
33 }
34 bool(true)
35 DONE