Index: test/webkit/fast/js/kde/Object.js |
diff --git a/test/webkit/dfg-double-addition-simplify-to-int.js b/test/webkit/fast/js/kde/Object.js |
similarity index 65% |
copy from test/webkit/dfg-double-addition-simplify-to-int.js |
copy to test/webkit/fast/js/kde/Object.js |
index 3e12b114284a1e4bfd59316c7b768ab1e40b25fd..2637309464245c07b287fd6710138b6b9879b824 100644 |
--- a/test/webkit/dfg-double-addition-simplify-to-int.js |
+++ b/test/webkit/fast/js/kde/Object.js |
@@ -21,29 +21,22 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-description( |
-"Tests that the DFG doesn't get confused about an edge being a double edge after we perform CFG simplification." |
-); |
+description("KDE JS Test"); |
+shouldBe("typeof Object()", "'object'"); |
+shouldBe("var o = Object(); o.x = 11; o.x;", "11"); // wanted behaviour ? |
+// shouldBe("Object(undefined)", ???); |
+// shouldBe("Object(null)", ???); |
+shouldBe("Object(1).valueOf()", "1"); |
+shouldBe("Object(true).valueOf()", "true"); |
+shouldBe("Object('s').valueOf()", "'s'"); |
-function foo(a, p) { |
- var p2; |
- var x; |
- var y; |
- if (p) |
- p2 = true; |
- else |
- p2 = true; |
- if (p2) |
- x = a; |
- else |
- x = 0.5; |
- if (p2) |
- y = a; |
- else |
- y = 0.7; |
- var result = x + y; |
- return [result, [x, y], [x, y], [x, y]]; |
-} |
+shouldBe("typeof (new Object())", "'object'"); |
+// shouldBe("new Object(undefined)", ???); |
+// shouldBe("new Object(null)", ???); |
+shouldBe("(new Object(1)).valueOf()", "1"); |
+shouldBe("(new Object(true)).valueOf()", "true"); |
+shouldBe("(new Object('s')).valueOf()", "'s'"); |
-for (var i = 0; i < 1000; ++i) |
- shouldBe("foo(42, true)[0]", "84"); |
+shouldBe("String(Object())", "'[object Object]'"); |
+shouldBe("Object().toString()", "'[object Object]'"); |
+shouldBe("String(Object().valueOf())", "'[object Object]'"); |