Skip to content

Commit 6314cf1

Browse files
committed
SSE-oriented strtolower/strtoupper tests
1 parent 6719cc7 commit 6314cf1

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
@@ -24,6 +24,12 @@ $strings = array (
2424
"ABCD\0abcdABCD",
2525
TRUE,
2626
FALSE,
27+
28+
/* Check for off-by-one errors in the SSE implementation */
29+
"AAAAAAAAAAAAAAAAAAAA",
30+
"ZZZZZZZZZZZZZZZZZZZZ",
31+
"@@@@@@@@@@@@@@@@@@@@",
32+
"[[[[[[[[[[[[[[[[[[[[",
2733
);
2834

2935
$count = 0;
@@ -329,6 +335,18 @@ string(1) "1"
329335
-- Iteration 7 --
330336
string(0) ""
331337

338+
-- Iteration 8 --
339+
string(20) "aaaaaaaaaaaaaaaaaaaa"
340+
341+
-- Iteration 9 --
342+
string(20) "zzzzzzzzzzzzzzzzzzzz"
343+
344+
-- Iteration 10 --
345+
string(20) "@@@@@@@@@@@@@@@@@@@@"
346+
347+
-- Iteration 11 --
348+
string(20) "[[[[[[[[[[[[[[[[[[[["
349+
332350
*** Testing strtolower() with two different case strings ***
333351
strings are same, with Case Insensitive
334352
*** Done ***

ext/standard/tests/strings/strtoupper1.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ $strings = array (
2323
"ABCD\0abcdABCD",
2424
TRUE,
2525
FALSE,
26+
/* Check for off-by-one errors in the SSE implementation */
27+
"aaaaaaaaaaaaaaaaaaaa",
28+
"zzzzzzzzzzzzzzzzzzzz",
29+
"````````````````````",
30+
"{{{{{{{{{{{{{{{{{{{{",
2631
);
2732

2833
$count = 0;
@@ -329,6 +334,18 @@ string(1) "1"
329334
-- Iteration 7 --
330335
string(0) ""
331336

337+
-- Iteration 8 --
338+
string(20) "AAAAAAAAAAAAAAAAAAAA"
339+
340+
-- Iteration 9 --
341+
string(20) "ZZZZZZZZZZZZZZZZZZZZ"
342+
343+
-- Iteration 10 --
344+
string(20) "````````````````````"
345+
346+
-- Iteration 11 --
347+
string(20) "{{{{{{{{{{{{{{{{{{{{"
348+
332349
*** Testing strtoupper() with two different case strings ***
333350
strings are same, with Case Insensitive
334351
*** Done ***

0 commit comments

Comments
 (0)