Skip to content

Commit 8e2448b

Browse files
committed
SSE-oriented strtolower/strtoupper tests
1 parent 547e053 commit 8e2448b

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

ext/standard/tests/strings/strtolower.phpt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ $strings = array (
4141
"ABCD\0abcdABCD",
4242
TRUE,
4343
FALSE,
44+
45+
/* Check for off-by-one errors in the SSE implementation */
46+
"AAAAAAAAAAAAAAAAAAAA",
47+
"ZZZZZZZZZZZZZZZZZZZZ",
48+
"@@@@@@@@@@@@@@@@@@@@",
49+
"[[[[[[[[[[[[[[[[[[[[",
4450
);
4551

4652
$count = 0;
@@ -218,6 +224,18 @@ string(1) "1"
218224
-- Iteration 7 --
219225
string(0) ""
220226

227+
-- Iteration 8 --
228+
string(20) "aaaaaaaaaaaaaaaaaaaa"
229+
230+
-- Iteration 9 --
231+
string(20) "zzzzzzzzzzzzzzzzzzzz"
232+
233+
-- Iteration 10 --
234+
string(20) "@@@@@@@@@@@@@@@@@@@@"
235+
236+
-- Iteration 11 --
237+
string(20) "[[[[[[[[[[[[[[[[[[[["
238+
221239
*** Testing strtolower() with two different case strings ***
222240
strings are same, with Case Insensitive
223241
*** Done ***

ext/standard/tests/strings/strtoupper1.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ $strings = array (
4141
"ABCD\0abcdABCD",
4242
TRUE,
4343
FALSE,
44+
/* Check for off-by-one errors in the SSE implementation */
45+
"aaaaaaaaaaaaaaaaaaaa",
46+
"zzzzzzzzzzzzzzzzzzzz",
47+
"````````````````````",
48+
"{{{{{{{{{{{{{{{{{{{{",
4449
);
4550

4651
$count = 0;
@@ -219,6 +224,18 @@ string(1) "1"
219224
-- Iteration 7 --
220225
string(0) ""
221226

227+
-- Iteration 8 --
228+
string(20) "AAAAAAAAAAAAAAAAAAAA"
229+
230+
-- Iteration 9 --
231+
string(20) "ZZZZZZZZZZZZZZZZZZZZ"
232+
233+
-- Iteration 10 --
234+
string(20) "````````````````````"
235+
236+
-- Iteration 11 --
237+
string(20) "{{{{{{{{{{{{{{{{{{{{"
238+
222239
*** Testing strtoupper() with two different case strings ***
223240
strings are same, with Case Insensitive
224241
*** Done ***

0 commit comments

Comments
 (0)