summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch11/11.2/11.2.2
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/tests/test262/ch11/11.2/11.2.2
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/test262/ch11/11.2/11.2.2')
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A1.1.js60
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A1.2.js60
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A2.js32
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T1.js46
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T2.js45
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T3.js45
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T4.js45
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T5.js45
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T1.js46
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T2.js46
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T3.js46
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T4.js32
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T5.js45
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/browser.js0
-rw-r--r--js/src/tests/test262/ch11/11.2/11.2.2/shell.js0
15 files changed, 593 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A1.1.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A1.1.js
new file mode 100644
index 000000000..10811b4b0
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A1.1.js
@@ -0,0 +1,60 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * White Space and Line Terminator between "new" and NewExpression are allowed
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A1.1.js
+ * @description Checking by using eval
+ */
+
+//CHECK#1
+if (eval("new\u0009Number") != 0) {
+ $ERROR('#1: new\\u0009Number == 0');
+}
+
+//CHECK#2
+if (eval("new\u000BNumber") != 0) {
+ $ERROR('#2: new\\u000BNumber == 0');
+}
+
+//CHECK#3
+if (eval("new\u000CNumber") != 0) {
+ $ERROR('#3: new\\u000CNumber == 0');
+}
+
+//CHECK#4
+if (eval("new\u0020Number") != 0) {
+ $ERROR('#4: new\\u0020Number == 0');
+}
+
+//CHECK#5
+if (eval("new\u00A0Number") != 0) {
+ $ERROR('#5: new\\u00A0Number == 0');
+}
+
+//CHECK#6
+if (eval("new\u000ANumber") != 0) {
+ $ERROR('#6: new\\u000ANumber == 0');
+}
+
+//CHECK#7
+if (eval("new\u000DNumber") != 0) {
+ $ERROR('#7: new\\u000DNumber == 0');
+}
+
+//CHECK#8
+if (eval("new\u2028Number") != 0) {
+ $ERROR('#8: new\\u2028Number == 0');
+}
+
+//CHECK#9
+if (eval("new\u2029Number") != 0) {
+ $ERROR('#9: new\\u2029Number == 0');
+}
+
+//CHECK#10
+if (eval("new\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029Number") != 0) {
+ $ERROR('#10: new\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Number == 0');
+}
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A1.2.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A1.2.js
new file mode 100644
index 000000000..d47eb10bf
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A1.2.js
@@ -0,0 +1,60 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * White Space and Line Terminator between "new" and MemberExpression are allowed
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A1.2.js
+ * @description Checking by using eval
+ */
+
+//CHECK#1
+if (eval("new\u0009Number()") != 0) {
+ $ERROR('#1: new\\u0009Number == 0');
+}
+
+//CHECK#2
+if (eval("new\u000BNumber()") != 0) {
+ $ERROR('#2: new\\u000BNumber == 0');
+}
+
+//CHECK#3
+if (eval("new\u000CNumber()") != 0) {
+ $ERROR('#3: new\\u000CNumber == 0');
+}
+
+//CHECK#4
+if (eval("new\u0020Number()") != 0) {
+ $ERROR('#4: new\\u0020Number == 0');
+}
+
+//CHECK#5
+if (eval("new\u00A0Number()") != 0) {
+ $ERROR('#5: new\\u00A0Number == 0');
+}
+
+//CHECK#6
+if (eval("new\u000ANumber()") != 0) {
+ $ERROR('#6: new\\u000ANumber == 0');
+}
+
+//CHECK#7
+if (eval("new\u000DNumber()") != 0) {
+ $ERROR('#7: new\\u000DNumber == 0');
+}
+
+//CHECK#8
+if (eval("new\u2028Number()") != 0) {
+ $ERROR('#8: new\\u2028Number == 0');
+}
+
+//CHECK#9
+if (eval("new\u2029Number()") != 0) {
+ $ERROR('#9: new\\u2029Number == 0');
+}
+
+//CHECK#10
+if (eval("new\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029Number()") != 0) {
+ $ERROR('#10: new\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Number == 0');
+}
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A2.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A2.js
new file mode 100644
index 000000000..e879390fc
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A2.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * Operator "new" uses GetValue
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A2.js
+ * @description If GetBase(NewExpression) or GetBase(MemberExpression) is null, throw ReferenceError
+ */
+
+//CHECK#1
+try {
+ new x;
+ $ERROR('#1.1: new x throw ReferenceError. Actual: ' + (new x));
+}
+catch (e) {
+ if ((e instanceof ReferenceError) !== true) {
+ $ERROR('#1.2: new x throw ReferenceError. Actual: ' + (e));
+ }
+}
+
+//CHECK#2
+try {
+ new x();
+ $ERROR('#2: new x() throw ReferenceError');
+}
+catch (e) {
+ if ((e instanceof ReferenceError) !== true) {
+ $ERROR('#2: new x() throw ReferenceError');
+ }
+}
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T1.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T1.js
new file mode 100644
index 000000000..3f52d9527
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T1.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A3_T1.js
+ * @description Checking boolean primitive case
+ */
+
+//CHECK#1
+try {
+ new true;
+ $ERROR('#1: new true throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new true throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ var x = true;
+ new x;
+ $ERROR('#2: var x = true; new x throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: var x = true; new x throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = true;
+ new x();
+ $ERROR('#3: var x = true; new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = true; new x() throw TypeError');
+ }
+}
+
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T2.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T2.js
new file mode 100644
index 000000000..1ad67c548
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T2.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A3_T2.js
+ * @description Checking "number primitive" case
+ */
+
+//CHECK#1
+try {
+ new 1;
+ $ERROR('#1: new 1 throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new 1 throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ var x = 1;
+ new x;
+ $ERROR('#2: var x = 1; new x throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: var x = 1; new x throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = 1;
+ new x();
+ $ERROR('#3: var x = 1; new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = 1; new x() throw TypeError');
+ }
+}
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T3.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T3.js
new file mode 100644
index 000000000..c93406012
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T3.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A3_T3.js
+ * @description Checking "string primitive" case
+ */
+
+//CHECK#1
+try {
+ new 1;
+ $ERROR('#1: new "1" throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new "1" throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ var x = "1";
+ new x;
+ $ERROR('#2: var x = "1"; new x throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: var x = "1"; new x throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = "1";
+ new x();
+ $ERROR('#3: var x = "1"; new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = "1"; new x() throw TypeError');
+ }
+}
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T4.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T4.js
new file mode 100644
index 000000000..adbd1356c
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T4.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A3_T4.js
+ * @description Checking "undefined" case
+ */
+
+//CHECK#1
+try {
+ new undefined;
+ $ERROR('#1: new undefined throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new undefined throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ var x = undefined;
+ new x;
+ $ERROR('#2: var x = undefined; new x throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: var x = undefined; new x throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = undefined;
+ new x();
+ $ERROR('#3: var x = undefined; new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = undefined; new x() throw TypeError');
+ }
+}
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T5.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T5.js
new file mode 100644
index 000000000..abf71da19
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A3_T5.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A3_T5.js
+ * @description Checking "null primitive" case
+ */
+
+//CHECK#1
+try {
+ new null;
+ $ERROR('#1: new null throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new null throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ var x = null;
+ new x;
+ $ERROR('#2: var x = null; new x throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: var x = null; new x throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = null;
+ new x();
+ $ERROR('#3: var x = null; new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = null; new x() throw TypeError');
+ }
+}
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T1.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T1.js
new file mode 100644
index 000000000..cd6517cbf
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T1.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A4_T1.js
+ * @description Checking Boolean object case
+ */
+
+//CHECK#1
+try {
+ new new Boolean(true);
+ $ERROR('#1: new new Boolean(true) throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new new Boolean(true) throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ var x = new Boolean(true);
+ new x;
+ $ERROR('#2: var x = new Boolean(true); new x throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: var x = new Boolean(true); new x throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = new Boolean(true);
+ new x();
+ $ERROR('#3: var x = new Boolean(true); new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = new Boolean(true); new x() throw TypeError');
+ }
+}
+
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T2.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T2.js
new file mode 100644
index 000000000..bc776ec65
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T2.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A4_T2.js
+ * @description Checking Number object case
+ */
+
+//CHECK#1
+try {
+ new new Number(1);
+ $ERROR('#1: new new Number(1) throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new new Number(1) throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ var x = new Number(1);
+ new x;
+ $ERROR('#2: var x = new Number(1); new x throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: var x = new Number(1); new x throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = new Number(1);
+ new x();
+ $ERROR('#3: var x = new Number(1); new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = new Number(1); new x() throw TypeError');
+ }
+}
+
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T3.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T3.js
new file mode 100644
index 000000000..9027cf051
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T3.js
@@ -0,0 +1,46 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A4_T3.js
+ * @description Checking String object case
+ */
+
+//CHECK#1
+try {
+ new new String("1");
+ $ERROR('#1: new new String("1") throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new new String("1") throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ var x = new String("1");
+ new x;
+ $ERROR('#2: var x = new String("1"); new x throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: var x = new String("1"); new x throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = new String("1");
+ new x();
+ $ERROR('#3: var x = new String("1"); new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = new String("1"); new x() throw TypeError');
+ }
+}
+
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T4.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T4.js
new file mode 100644
index 000000000..e240ba827
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T4.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A4_T4.js
+ * @description Checking Global object case
+ */
+
+//CHECK#1
+try {
+ new this;
+ $ERROR('#1: new this throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new this throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ new this();
+ $ERROR('#2: new this() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: new this() throw TypeError');
+ }
+}
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T5.js b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T5.js
new file mode 100644
index 000000000..72fdae876
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/S11.2.2_A4_T5.js
@@ -0,0 +1,45 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError
+ *
+ * @path ch11/11.2/11.2.2/S11.2.2_A4_T5.js
+ * @description Checking Math object case
+ */
+
+//CHECK#1
+try {
+ new Math;
+ $ERROR('#1: new Math throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#1: new Math throw TypeError');
+ }
+}
+
+//CHECK#2
+try {
+ new new Math();
+ $ERROR('#2: new new Math() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#2: new new Math() throw TypeError');
+ }
+}
+
+//CHECK#3
+try {
+ var x = new Math();
+ new x();
+ $ERROR('#3: var x = new Math(); new x() throw TypeError');
+}
+catch (e) {
+ if ((e instanceof TypeError) !== true) {
+ $ERROR('#3: var x = new Math(); new x() throw TypeError');
+ }
+}
+
+
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/browser.js b/js/src/tests/test262/ch11/11.2/11.2.2/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/browser.js
diff --git a/js/src/tests/test262/ch11/11.2/11.2.2/shell.js b/js/src/tests/test262/ch11/11.2/11.2.2/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.2/11.2.2/shell.js