Index: test/mjsunit/string-case.js |
diff --git a/test/mjsunit/string-case.js b/test/mjsunit/string-case.js |
index 283e703fc33d31df4a75944c7558c68eef7f2e64..34c2340d33c2ff676549e8a571a149dc9b4b26dc 100644 |
--- a/test/mjsunit/string-case.js |
+++ b/test/mjsunit/string-case.js |
@@ -25,7 +25,8 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --random-seed=17 |
+// Flags: --random-seed=17 --allow-natives-syntax |
+// Flags: --expose-externalize-string |
assertEquals("ΚΟΣΜΟΣ ΚΟΣΜΟΣ".toLowerCase(), "κοσμος κοσμος"); |
@@ -58,6 +59,19 @@ function test(length) { |
strLower += String.fromCharCode(charCodeToLower(c)); |
strUpper += String.fromCharCode(charCodeToUpper(c)); |
} |
+ %FlattenString(strLower); |
+ %FlattenString(strUpper); |
+ // Sequential string. |
+ assertEquals(strLower, str.toLowerCase()); |
+ assertEquals(strUpper, str.toUpperCase()); |
+ // Cons string. |
+ assertEquals(strLower + strLower, (str + str).toLowerCase()); |
+ assertEquals(strUpper + strUpper, (str + str).toUpperCase()); |
+ // Sliced string. |
+ assertEquals(strLower.substring(1), str.substring(1).toLowerCase()); |
+ assertEquals(strUpper.substring(1), str.substring(1).toUpperCase()); |
+ // External string. |
+ externalizeString(str, false); |
assertEquals(strLower, str.toLowerCase()); |
assertEquals(strUpper, str.toUpperCase()); |
} |