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

Unified Diff: test/mjsunit/bool-concat.js

Issue 106743010: Add a regression test for boolean concatenation in strings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698