diff options
| author | Nikita Popov <nikic@php.net> | 2014-09-04 21:10:41 +0200 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2014-09-04 21:10:41 +0200 |
| commit | 9586b15229256e7091b3392fbfedb3054c299e49 (patch) | |
| tree | 0e88aefd6271d0a042062e420ed999f927cedbaa /ext/gmp/tests/gmp_random.phpt | |
| parent | 15c139b99a6a887e2a9e8e1a07632e390650bd13 (diff) | |
| download | php-git-9586b15229256e7091b3392fbfedb3054c299e49.tar.gz | |
Give proper names to GMP test files
Diffstat (limited to 'ext/gmp/tests/gmp_random.phpt')
| -rw-r--r-- | ext/gmp/tests/gmp_random.phpt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ext/gmp/tests/gmp_random.phpt b/ext/gmp/tests/gmp_random.phpt new file mode 100644 index 0000000000..3a876aa60c --- /dev/null +++ b/ext/gmp/tests/gmp_random.phpt @@ -0,0 +1,41 @@ +--TEST-- +gmp_random() basic tests +--SKIPIF-- +<?php if (!extension_loaded("gmp")) print "skip"; ?> +--FILE-- +<?php + +var_dump(gmp_strval(gmp_random())); +var_dump(gmp_strval(gmp_random(-1))); +var_dump(gmp_strval(gmp_random(0))); +var_dump(gmp_strval(gmp_random(10))); +var_dump(gmp_strval(gmp_random("-10"))); +var_dump(gmp_strval(gmp_random(-10))); + +var_dump(gmp_random(array())); +var_dump(gmp_random(array(),1)); +var_dump(gmp_random("")); +var_dump(gmp_random("test")); + +echo "Done\n"; +?> +--EXPECTF-- +string(%d) "%d" +string(%d) "%d" +string(1) "%d" +string(%d) "%d" +string(%d) "%d" +string(%d) "%d" + +Warning: gmp_random() expects parameter 1 to be long, array given in %s on line %d +NULL + +Warning: gmp_random() expects at most 1 parameter, 2 given in %s on line %d +NULL + +Warning: gmp_random() expects parameter 1 to be long, string given in %s on line %d +NULL + +Warning: gmp_random() expects parameter 1 to be long, string given in %s on line %d +NULL +Done |
