blob: f61cd10842c54f48ded83f407e73570410d34a5b [file] [log] [blame]
Ben Murdoch014dc512016-03-22 12:00:34 +00001// Copyright 2015 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5function dateL() {
6 var date = new Date();
7 return (date + true) == date.toString() + true;
8}
9
10function dateR() {
11 var date = new Date();
12 return (true + date) == true + date.toString();
13}
14
15function strL() {
16 return (new String(1) + true) == "1true";
17}
18
19function strR() {
20 return (true + new String(1)) == "true1";
21}
22
23assertTrue(dateL());
24assertTrue(dateR());
25assertTrue(strL());
26assertTrue(strR());