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

Unified Diff: test/mjsunit/regress/regress-crbug-142087.js

Issue 10824278: Fix wrong indexing in global regexp. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: adding one more repro Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-142087.js
diff --git a/test/mjsunit/pixel-array-rounding.js b/test/mjsunit/regress/regress-crbug-142087.js
old mode 100755
new mode 100644
similarity index 83%
copy from test/mjsunit/pixel-array-rounding.js
copy to test/mjsunit/regress/regress-crbug-142087.js
index 0c307e62e55297faefe3e2ae253e7a344f4ee6c6..6a1dbf7b86ac88b12f6227f54bbf7d8f5f766a78
--- a/test/mjsunit/pixel-array-rounding.js
+++ b/test/mjsunit/regress/regress-crbug-142087.js
@@ -25,20 +25,14 @@
// (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: --allow-natives-syntax
+var string = "What are you looking for?";
-var pixels = new Uint8ClampedArray(8);
-
-function f() {
- for (var i = 0; i < 8; i++) {
- pixels[i] = (i * 1.1);
- }
- return pixels[1] + pixels[6];
+var expected_match = [];
+for (var i = 0; i < string.length; i++) {
+ expected_match.push("");
}
-f();
-f();
-assertEquals(6, pixels[5]);
-%OptimizeFunctionOnNextCall(f);
-f();
-assertEquals(6, pixels[5]);
+string.replace(/(_)|(_|)/g, "");
+assertArrayEquals(expected_match, string.match(/(_)|(_|)/g, ""));
+
+'***************************************'.match(/((\\)|(\*)|(\$))/g, ".");
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698