]> granicus.if.org Git - php/commitdiff
Add test for bcpwmod
authorGabriel Caruso <carusogabriel34@gmail.com>
Mon, 12 Feb 2018 01:52:54 +0000 (23:52 -0200)
committerJoe <krakjoe@php.net>
Mon, 12 Feb 2018 08:25:31 +0000 (09:25 +0100)
bc_raisemod's mod can't be zero and expo can't be negative

ext/bcmath/tests/bcpowmod_error4.phpt [new file with mode: 0644]

diff --git a/ext/bcmath/tests/bcpowmod_error4.phpt b/ext/bcmath/tests/bcpowmod_error4.phpt
new file mode 100644 (file)
index 0000000..7c2ba50
--- /dev/null
@@ -0,0 +1,10 @@
+--TEST--
+bc_raisemod's mod can't be zero and expo can't be negative
+--CREDITS--
+Gabriel Caruso (carusogabriel34@gmail.com)
+--SKIPIF--
+<?php if(!extension_loaded('bcmath')) die('skip bcmath extension not loaded'); ?>
+--FILE--
+<?php var_dump(bcpowmod('1', '-1', '0')); ?>
+--EXPECT--
+bool(false)