Changeset 41896 in webkit
- Timestamp:
- Mar 21, 2009 8:01:59 PM (15 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/tests/testapi.js
r41893 r41896 115 115 shouldBe("(MyObject.toString())", "[object MyObject]"); // toString 116 116 shouldBe("String(MyObject)", "MyObjectAsString"); // type conversion to string 117 shouldBe("MyObject - 0", NaN); // toPrimitive117 shouldBe("MyObject - 0", 1); // toNumber 118 118 119 119 shouldBe("typeof MyConstructor", "object"); -
trunk/JavaScriptCore/ChangeLog
r41895 r41896 1 2009-03-21 Cameron Zwarich <cwzwarich@uwaterloo.ca> 2 3 Reviewed by Oliver Hunt. 4 5 Bug 20049: testapi failure: MyObject - 0 should be NaN but instead is 1. 6 <https://bugs.webkit.org/show_bug.cgi?id=20049> 7 <rdar://problem/6079127> 8 9 In this case, the test is wrong. According to the ECMA spec, subtraction 10 uses ToNumber, not ToPrimitive. Change the test to match the spec. 11 12 * API/tests/testapi.js: 13 1 14 2009-03-21 Oliver Hunt <oliver@apple.com> 2 15
Note: See TracChangeset
for help on using the changeset viewer.