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, "."); |