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

Unified Diff: test/mjsunit/unicode-test.js

Issue 11000: Periodic merge of bleeding_edge to experimental code generator branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regexp.js ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/unicode-test.js
===================================================================
--- test/mjsunit/unicode-test.js (revision 868)
+++ test/mjsunit/unicode-test.js (working copy)
@@ -9134,6 +9134,32 @@
assertEquals(munged_sizes[i - 1], munged.length, "munged size " + i);
}
+
+function hex(x) {
+ x &= 15;
+ if (x < 10) {
+ return String.fromCharCode(x + 48);
+ } else {
+ return String.fromCharCode(x + 97 - 10);
+ }
+}
+
+
+function dump_re(re) {
+ var out = "";
+ for (var i = 0; i < re.length; i++) {
+ var c = re.charCodeAt(i);
+ if (c >= 32 && c <= 126) {
+ out += re[i];
+ } else if (c < 256) {
+ out += "\\x" + hex(c >> 4) + hex(c);
+ } else {
+ out += "\\u" + hex(c >> 12) + hex(c >> 8) + hex(c >> 4) + hex(c);
+ }
+ }
+ print ("re = " + out);
+}
+
var thai_l_thingy = "\u0e44";
var thai_l_regexp = new RegExp(thai_l_thingy);
var thai_l_regexp2 = new RegExp("[" + thai_l_thingy + "]");
« no previous file with comments | « test/mjsunit/regexp.js ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698