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

Side by Side Diff: test/mjsunit/regexp-static.js

Issue 27325: Push bleeding_edge@1391 and bleeding_edge@1392 to trunk. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 years, 9 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 | « src/regexp-delay.js ('k') | no next file » | 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 2008 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
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 for (var i = 4; i < 10; ++i) { 125 for (var i = 4; i < 10; ++i) {
126 assertEquals('', RegExp['$' + i]); 126 assertEquals('', RegExp['$' + i]);
127 } 127 }
128 128
129 // String.prototype.replace must interleave matching and replacing when a 129 // String.prototype.replace must interleave matching and replacing when a
130 // global regexp is matched and replaced with the result of a function, in 130 // global regexp is matched and replaced with the result of a function, in
131 // case the function uses the static properties of the regexp constructor. 131 // case the function uses the static properties of the regexp constructor.
132 re = /(.)/g; 132 re = /(.)/g;
133 function f() { return RegExp.$1; }; 133 function f() { return RegExp.$1; };
134 assertEquals('abcd', 'abcd'.replace(re, f)); 134 assertEquals('abcd', 'abcd'.replace(re, f));
135
136 RegExp.multiline = "foo";
137 assertTrue(typeof RegExp.multiline == typeof Boolean(), "RegExp.multiline coerce s values to booleans");
138 RegExp.input = Number();
139 assertTrue(typeof RegExp.input == typeof String(), "RegExp.input coerces values to booleans");
OLDNEW
« no previous file with comments | « src/regexp-delay.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698