Reviewers: Benedikt Meurer,

Message:
This CL includes a regression test for a bug that was apparently fixed by one of
Oli's changes back in Sep.

https://code.google.com/p/v8/source/detail?r=16849

https://code.google.com/p/chromium/issues/detail?id=326508

Description:
Add a regression test for boolean concatenation in strings.

BUG=

Please review this at https://codereview.chromium.org/106743010/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+9, -9 lines):
  A + test/mjsunit/bool-concat.js


Index: test/mjsunit/bool-concat.js
diff --git a/test/mjsunit/regress/regress-context-osr.js b/test/mjsunit/bool-concat.js
similarity index 88%
copy from test/mjsunit/regress/regress-context-osr.js
copy to test/mjsunit/bool-concat.js
index b74907de6a5c9530285e96c4b2eb4f9aa59a49e3..1306dcbbbca526481951d0d5e29acbd9414840f3 100644
--- a/test/mjsunit/regress/regress-context-osr.js
+++ b/test/mjsunit/bool-concat.js
@@ -25,15 +25,15 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-"use strict";
-function f() {
-  try { } catch (e) { }
+function format(a) {
+  if (a) {
+    return "X"+true+"Y";
+  } else {
+    return "X"+false+"Y";
+  }
 }

-for (this.x = 0; this.x < 1; ++this.x) {
-  for (this.y = 0; this.y < 1; ++this.y) {
-    for (this.ll = 0; this.ll < 70670; ++this.ll) {
-      f();
-    }
-  }
+for (var i = 0; i < 1000; i++) {
+  assertEquals("XtrueY", format(true));
+  assertEquals("XfalseY", format(false));
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to