fix timestamp formats
[awesomized/ext-ion] / tests / Decimal / Context / __construct.phpt
index 2a96406017f1a79cd485e8921c6eef86040ef1b7..088a85004c08fcc0e69b71c2324ea47795eee72c 100644 (file)
@@ -5,17 +5,22 @@ ion
 --FILE--
 TEST
 <?php
+
 use ion\Decimal\Context;
 
-new Context;
-new Context(32);
+new Context(1,2,3,4,true);
+try {
+       new Context(1,"bar",3,4,false);
+} catch (Throwable $e) {
+       echo $e->getMessage(), "\n";
+}
 try {
-       new Context(123);
+       new Context(false,false,false,false,false);
 } catch (Throwable $e) {
        echo $e->getMessage(), "\n";
 }
 try {
-       new Context("123");
+       new Context(1,2);
 } catch (Throwable $e) {
        echo $e->getMessage(), "\n";
 }
@@ -24,11 +29,17 @@ try {
 } catch (Throwable $e) {
        echo $e->getMessage(), "\n";
 }
+try {
+       new Context;
+} catch (Throwable $e) {
+       echo $e->getMessage(), "\n";
+}
 ?>
 DONE
 --EXPECTF--
 TEST
-Decimal context only allows 32, 64 or 128 bits
-Decimal context only allows 32, 64 or 128 bits
-ion\Decimal\Context::__construct(): Argument #1 ($bits) must be of type int, string given
+ion\Decimal\Context::__construct(): Argument #2 ($eMax) must be of type int, string given
+ion\Decimal\Context::__construct() expects exactly 5 arguments, 2 given
+ion\Decimal\Context::__construct() expects exactly 5 arguments, 1 given
+ion\Decimal\Context::__construct() expects exactly 5 arguments, 0 given
 DONE