fix #6: compatibility with 8.2
[awesomized/ext-ion] / tests / Decimal.phpt
index cd8b242e02fe1a073185295195514ee22bbe8f7d..d667fc159d1dce5926675b16b1d6bca5ecbd7d95 100644 (file)
@@ -7,6 +7,7 @@ TEST
 <?php
 var_dump(new ion\Decimal(1));
 var_dump(new ion\Decimal("1.23"));
+var_dump(ion\unserialize(ion\serialize(clone new ion\Decimal(0x0f4e11))));
 ?>
 DONE
 --EXPECTF--
@@ -45,4 +46,21 @@ object(ion\Decimal)#%d (2) {
     bool(false)
   }
 }
+object(ion\Decimal)#%d (2) {
+  ["number"]=>
+  int(1003025)
+  ["context"]=>
+  object(ion\Decimal\Context)#%d (5) {
+    ["digits"]=>
+    int(999999999)
+    ["eMax"]=>
+    int(999999999)
+    ["eMin"]=>
+    int(-999999999)
+    ["round"]=>
+    int(3)
+    ["clamp"]=>
+    bool(false)
+  }
+}
 DONE