We should not keep the JavaScript tests inside the Source/JavaScriptCore/ directory.
[WebKit-https.git] / JSTests / stress / call-object-constructor.js
1 function test(n) {
2     return n === Object(n);
3 }
4 noInline(test);
5
6 function assert(condition) {
7     if (!condition)
8         throw new Error("assertion failed");
9 }
10
11 for (i = 0; i < 100000; i++) {
12     assert(!test(null));
13     assert(!test(undefined));
14     assert(!test(1));
15     assert(!test(""));
16     assert(!test(Symbol.iterator));
17     assert(test({}));
18 }