Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: test/mjsunit/string-slices.js

Issue 8139027: Version 3.6.5 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/regress/short-circuit.js ('k') | test/mjsunit/undeletable-functions.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution. 11 // with the distribution.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 assertEquals("klp", ascii.substring(10,12) + ascii.substring(15,16)); 182 assertEquals("klp", ascii.substring(10,12) + ascii.substring(15,16));
183 assertEquals("\u03B1\u03B4\u03B5", utf.substring(0,1) + utf.substring(5,3)); 183 assertEquals("\u03B1\u03B4\u03B5", utf.substring(0,1) + utf.substring(5,3));
184 assertEquals("", ascii.substring(16) + utf.substring(16)); 184 assertEquals("", ascii.substring(16) + utf.substring(16));
185 assertEquals("bcdef\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9", 185 assertEquals("bcdef\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9",
186 ascii.substring(1,6) + utf.substring(3,9)); 186 ascii.substring(1,6) + utf.substring(3,9));
187 assertEquals("\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9abcdefghijklmnop", 187 assertEquals("\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9abcdefghijklmnop",
188 utf.substring(3,9) + ascii); 188 utf.substring(3,9) + ascii);
189 assertEquals("\u03B2\u03B3\u03B4\u03B5\u03B4\u03B5\u03B6\u03B7", 189 assertEquals("\u03B2\u03B3\u03B4\u03B5\u03B4\u03B5\u03B6\u03B7",
190 utf.substring(5,1) + utf.substring(3,7)); 190 utf.substring(5,1) + utf.substring(3,7));
191 191
192 /*
193 // Externalizing strings. 192 // Externalizing strings.
194 var a = "123456789qwertyuiopasdfghjklzxcvbnm"; 193 var a = "123456789" + "qwertyuiopasdfghjklzxcvbnm";
195 var b = a.slice(1,-1); 194 var b = "23456789qwertyuiopasdfghjklzxcvbn"
196 assertEquals(a.slice(1,-1), b); 195 assertEquals(a.slice(1,-1), b);
197 externalizeString(a); 196
197 assertTrue(isAsciiString(a));
198 externalizeString(a, true);
199 assertFalse(isAsciiString(a));
200
198 assertEquals(a.slice(1,-1), b); 201 assertEquals(a.slice(1,-1), b);
199 */ 202 assertTrue(/3456789qwe/.test(a));
203 assertEquals(5, a.indexOf("678"));
204 assertEquals("12345", a.split("6")[0]);
OLDNEW
« no previous file with comments | « test/mjsunit/regress/short-circuit.js ('k') | test/mjsunit/undeletable-functions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698