Home
last modified time | relevance | path

Searched refs:Randomizer (Results 1 – 25 of 36) sorted by relevance

12

/php-src/ext/random/tests/03_randomizer/methods/
H A DgetFloat_error.phpt2 Random: Randomizer: getFloat(): Parameters are correctly validated
7 use Random\Randomizer;
9 function randomizer(): Randomizer
11 return new Randomizer();
88 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
89 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
90 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
91 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
92 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
93 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
[all …]
H A DgetBytesFromString_error.phpt2 Random: Randomizer: getBytesFromString(): Parameters are correctly validated
6 use Random\Randomizer;
8 function randomizer(): Randomizer
10 return new Randomizer();
27 Random\Randomizer::getBytesFromString(): Argument #1 ($string) must not be empty
28 Random\Randomizer::getBytesFromString(): Argument #2 ($length) must be greater than 0
H A DpickArrayKeys_error.phpt2 Random: Randomizer: pickArrayKeys(): Parameters are correctly validated
6 use Random\Randomizer;
8 function randomizer(): Randomizer
10 return new Randomizer();
45 Random\Randomizer::pickArrayKeys(): Argument #1 ($array) must be of type array, string given
46 Random\Randomizer::pickArrayKeys(): Argument #1 ($array) must not be empty
47 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…
48 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…
49 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…
H A DgetInt_gh9415.phpt2 GH-9415: Randomizer::getInt(0, 2**32 - 1) with Mt19937 always returns 1
6 use Random\Randomizer;
9 $randomizer = new Randomizer(new Mt19937(1234));
13 $randomizer = new Randomizer(new Mt19937(4321));
H A DnextInt_64_engine_on_32_platform.phpt2 Random: Randomizer: nextInt(): Throws for 64 bit engines on 32 bit platforms
8 use Random\Randomizer;
11 $randomizer = new Randomizer(new Xoshiro256StarStar());
H A DgetInt_expansion_32.phpt2 Random: Randomizer: getInt(): Returned values with insufficient bits are correctly expanded
7 use Random\Randomizer;
19 $randomizer = new Randomizer(new ByteEngine());
H A DgetInt_expansion_64.phpt2 Random: Randomizer: getInt(): Returned values with insufficient bits are correctly expanded (64 Bit)
9 use Random\Randomizer;
21 $randomizer = new Randomizer(new ByteEngine());
H A DgetBytes_expansion.phpt2 Random: Randomizer: getBytes(): Returned bytes are consistently expanded
7 use Random\Randomizer;
28 $randomizer = new Randomizer(new TestEngine());
H A DgetFloat_extreme_range.phpt2 Random: Randomizer: getFloat(): Extreme ranges are handled correctly
7 use Random\Randomizer;
23 $r = new Randomizer(new TestEngine());
H A DgetFloat_opposite_signs.phpt2 Random: Randomizer: getFloat(): Opposite signs are handled correctly
7 use Random\Randomizer;
25 $r = new Randomizer(new TestEngine());
H A DnextInt.phpt2 Random: Randomizer: nextInt(): Basic functionality
12 use Random\Randomizer;
27 $randomizer = new Randomizer($engine);
H A DnextFloat.phpt2 Random: Randomizer: nextFloat(): Basic functionality
12 use Random\Randomizer;
28 $randomizer = new Randomizer($engine);
H A DgetBytes.phpt2 Random: Randomizer: getBytes(): Basic functionality
12 use Random\Randomizer;
29 $randomizer = new Randomizer($engine);
/php-src/ext/random/tests/03_randomizer/
H A Dconstruct_twice.phpt2 Random: Randomizer: Calling __construct() fails due to readonly $engine property
10 use Random\Randomizer;
15 (new Randomizer())->__construct();
21 $randomizer = new Randomizer(new Xoshiro256StarStar());
28 $randomizer = new Randomizer(new TestShaEngine("1234"));
35 $randomizer = new Randomizer(new Xoshiro256StarStar());
47 Cannot modify readonly property Random\Randomizer::$engine
48 Cannot modify readonly property Random\Randomizer::$engine
49 Cannot modify readonly property Random\Randomizer::$engine
50 Cannot modify readonly property Random\Randomizer::$engine
H A Dreadonly.phpt2 Random: Randomizer: The engine property must be readonly
8 use Random\Randomizer;
10 $randomizer = new Randomizer(new PcgOneseq128XslRr64(1234));
11 $referenceRandomizer = new Randomizer(new PcgOneseq128XslRr64(1234));
29 Cannot modify readonly property Random\Randomizer::$engine
H A Dserialize_disallowed.phpt2 Random: Randomizer: Serialization of the Randomizer fails if the engine is not serializable
7 use Random\Randomizer;
10 serialize(new Randomizer(new Secure()));
H A Dengine_unsafe_throws.phpt2 Random: Randomizer: Engines throwing an exception are gracefully handled
7 use Random\Randomizer;
17 $randomizer = new Randomizer(new ThrowingEngine());
26 #1 %s(%d): Random\Randomizer->getBytes(1)
H A Dengine_unsafe_exits.phpt2 Random: Randomizer: Engines calling exit() are gracefully handled
7 use Random\Randomizer;
17 $randomizer = new Randomizer(new ExitingEngine());
H A Dcompatibility_user.phpt2 Random: Randomizer: Native engines can be wrapped without changing their sequence
11 use Random\Randomizer;
24 $native_randomizer = new Randomizer(clone $engine);
25 $user_randomizer = new Randomizer(new TestWrapperEngine(clone $engine));
H A Dserialize.phpt2 Random: Randomizer: Serialization of the Randomizer must preserve the sequence
11 use Random\Randomizer;
26 $randomizer = new Randomizer($engine);
H A Dcompatibility_array_rand.phpt2 Random: Randomizer: The Mt19937 engine and pickArrayKeys are consistent with array_rand()
7 use Random\Randomizer;
20 $randomizer = new Randomizer(new Mt19937(1234));
H A Dcompatibility_mt_rand.phpt2 Random: Randomizer: The Mt19937 engine is a drop-in replacement for mt_rand()
6 use Random\Randomizer;
11 $randomizer = new Randomizer(new Mt19937(1234, MT_RAND_PHP));
28 $randomizer = new Randomizer(new Mt19937(1234, MT_RAND_MT19937));
H A Dgh_9186_unserialize.phpt7 …unserialize('O:17:"Random\Randomizer":1:{i:0;a:2:{s:3:"foo";N;s:6:"engine";O:32:"Random\Engine\Xos…
14 Invalid serialization data for Random\Randomizer object
H A Dengine_unsafe_biased.phpt2 Random: Randomizer: Heavily biased engines are detected and rejected
7 use Random\Randomizer;
17 function randomizer(): Randomizer
19 return new Randomizer(new HeavilyBiasedEngine());
H A Dengine_unsafe_empty_string.phpt2 Random: Randomizer: Engines returning an empty string are detected and rejected
7 use Random\Randomizer;
17 function randomizer(): Randomizer
19 return new Randomizer(new EmptyStringEngine());

Completed in 18 milliseconds

12