Skip to content

Commit cff668f

Browse files
committed
Fix 32bits tests
Notice: this warning is only raise since rand is an alias to mt_rand
1 parent 39587c4 commit cff668f

File tree

2 files changed

+60
-26
lines changed

2 files changed

+60
-26
lines changed

ext/standard/tests/math/rand_variation1.phpt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,17 @@ int(%i)
9797
int(%i)
9898

9999
-- Iteration 3 --
100-
int(%i)
100+
101+
Warning: rand(): max(100) is smaller than min(12345) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation1.php on line 79
102+
bool(false)
101103

102104
-- Iteration 4 --
103105
int(%i)
104106

105107
-- Iteration 5 --
106-
int(%i)
108+
109+
Warning: rand(): max(100) is smaller than min(2147483647) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation1.php on line 79
110+
bool(false)
107111

108112
-- Iteration 6 --
109113
int(%i)

ext/standard/tests/math/rand_variation2.phpt

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -91,98 +91,128 @@ fclose($fp);
9191
*** Testing rand) : usage variations ***
9292

9393
-- Iteration 1 --
94-
int(%i)
94+
95+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
96+
bool(false)
9597

9698
-- Iteration 2 --
97-
int(%i)
99+
100+
Warning: rand(): max(1) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
101+
bool(false)
98102

99103
-- Iteration 3 --
100104
int(%i)
101105

102106
-- Iteration 4 --
103-
int(%i)
107+
108+
Warning: rand(): max(-2345) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
109+
bool(false)
104110

105111
-- Iteration 5 --
106112
int(%i)
107113

108114
-- Iteration 6 --
109-
int(%i)
115+
116+
Warning: rand(): max(10) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
117+
bool(false)
110118

111119
-- Iteration 7 --
112-
int(%i)
120+
121+
Warning: rand(): max(-10) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
122+
bool(false)
113123

114124
-- Iteration 8 --
115125

116-
Warning: rand() expects parameter 2 to be integer, float given in %s on line %d
126+
Warning: rand() expects parameter 2 to be integer, float given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
117127
NULL
118128

119129
-- Iteration 9 --
120-
int(%i)
130+
131+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
132+
bool(false)
121133

122134
-- Iteration 10 --
123-
int(%i)
135+
136+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
137+
bool(false)
124138

125139
-- Iteration 11 --
126-
int(%i)
140+
141+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
142+
bool(false)
127143

128144
-- Iteration 12 --
129-
int(%i)
145+
146+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
147+
bool(false)
130148

131149
-- Iteration 13 --
132-
int(%i)
150+
151+
Warning: rand(): max(1) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
152+
bool(false)
133153

134154
-- Iteration 14 --
135-
int(%i)
155+
156+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
157+
bool(false)
136158

137159
-- Iteration 15 --
138-
int(%i)
160+
161+
Warning: rand(): max(1) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
162+
bool(false)
139163

140164
-- Iteration 16 --
141-
int(%i)
165+
166+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
167+
bool(false)
142168

143169
-- Iteration 17 --
144170

145-
Warning: rand() expects parameter 2 to be integer, string given in %s on line %d
171+
Warning: rand() expects parameter 2 to be integer, string given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
146172
NULL
147173

148174
-- Iteration 18 --
149175

150-
Warning: rand() expects parameter 2 to be integer, string given in %s on line %d
176+
Warning: rand() expects parameter 2 to be integer, string given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
151177
NULL
152178

153179
-- Iteration 19 --
154180

155-
Warning: rand() expects parameter 2 to be integer, array given in %s on line %d
181+
Warning: rand() expects parameter 2 to be integer, array given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
156182
NULL
157183

158184
-- Iteration 20 --
159185

160-
Warning: rand() expects parameter 2 to be integer, string given in %s on line %d
186+
Warning: rand() expects parameter 2 to be integer, string given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
161187
NULL
162188

163189
-- Iteration 21 --
164190

165-
Warning: rand() expects parameter 2 to be integer, string given in %s on line %d
191+
Warning: rand() expects parameter 2 to be integer, string given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
166192
NULL
167193

168194
-- Iteration 22 --
169195

170-
Warning: rand() expects parameter 2 to be integer, string given in %s on line %d
196+
Warning: rand() expects parameter 2 to be integer, string given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
171197
NULL
172198

173199
-- Iteration 23 --
174200

175-
Warning: rand() expects parameter 2 to be integer, object given in %s on line %d
201+
Warning: rand() expects parameter 2 to be integer, object given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
176202
NULL
177203

178204
-- Iteration 24 --
179-
int(%i)
205+
206+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
207+
bool(false)
180208

181209
-- Iteration 25 --
182-
int(%i)
210+
211+
Warning: rand(): max(0) is smaller than min(100) in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
212+
bool(false)
183213

184214
-- Iteration 26 --
185215

186-
Warning: rand() expects parameter 2 to be integer, resource given in %s on line %d
216+
Warning: rand() expects parameter 2 to be integer, resource given in /builddir/build/BUILD/php-7.1.0beta2/ext/standard/tests/math/rand_variation2.php on line 79
187217
NULL
188218
===Done===

0 commit comments

Comments
 (0)