2005-08-19 Florian Gross <flgr@ccan.de>
[mono.git] / mcs / class / Microsoft.JScript / Test / Mozilla / ecma_2 / Expressions / instanceof-004-n.js
index df7acf673e3aaa38479cdc957dc5a54f762d7e6d..4e0a96e57cb0bfa2860d7ee9db5748fe85dbdaea 100644 (file)
@@ -1,83 +1,83 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\r
-/**\r
- *  File Name:          instanceof-001.js\r
- *  ECMA Section:       11.8.6\r
- *  Description:\r
- *\r
- *  RelationalExpression instanceof Identifier\r
- *\r
- *  Author:             christine@netscape.com\r
- *  Date:               2 September 1998\r
- */\r
-var SECTION = "instanceof-004-n";\r
-var VERSION = "ECMA_2";\r
-var TITLE   = "instanceof"\r
-\r
-startTest();\r
-writeHeaderToLog( SECTION + " "+ TITLE);\r
-\r
-function InstanceOf( object_1, object_2, expect ) {\r
-  result = object_1 instanceof object_2;\r
-\r
-  new TestCase(\r
-    SECTION,\r
-    "(" + object_1 + ") instanceof " + object_2,\r
-    expect,\r
-    result );\r
-}\r
-\r
-function Gen3(value) {\r
-  this.value = value;\r
-  this.generation = 3;\r
-  this.toString = new Function ( "return \"(Gen\"+this.generation+\" instance)\"" );\r
-}\r
-Gen3.name = 3;\r
-Gen3.__proto__.toString = new Function( "return \"(\"+this.name+\" object)\"");\r
-\r
-function Gen2(value) {\r
-  this.value = value;\r
-  this.generation = 2;\r
-}\r
-Gen2.name = 2;\r
-Gen2.prototype = new Gen3();\r
-\r
-function Gen1(value) {\r
-  this.value = value;\r
-  this.generation = 1;\r
-}\r
-Gen1.name = 1;\r
-Gen1.prototype = new Gen2();\r
-\r
-function Gen0(value) {\r
-  this.value = value;\r
-  this.generation = 0;\r
-}\r
-Gen0.name = 0;\r
-Gen0.prototype = new Gen1();\r
-\r
-\r
-function GenA(value) {\r
-  this.value = value;\r
-  this.generation = "A";\r
-  this.toString = new Function ( "return \"(instance of Gen\"+this.generation+\")\"" );\r
-\r
-}\r
-GenA.prototype = new Gen0();\r
-GenA.name = "A";\r
-\r
-function GenB(value) {\r
-  this.value = value;\r
-  this.generation = "B";\r
-  this.toString = new Function ( "return \"(instance of Gen\"+this.generation+\")\"" );\r
-}\r
-GenB.name = "B"\r
-GenB.prototype = void 0;\r
-\r
-// Identifier is not a function\r
-\r
-DESCRIPTION = "Identifier is not a function";\r
-EXPECTED = "error";\r
-\r
-InstanceOf( new Boolean(true), false, "error" );\r
-\r
-test();\r
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/**
+ *  File Name:          instanceof-001.js
+ *  ECMA Section:       11.8.6
+ *  Description:
+ *
+ *  RelationalExpression instanceof Identifier
+ *
+ *  Author:             christine@netscape.com
+ *  Date:               2 September 1998
+ */
+var SECTION = "instanceof-004-n";
+var VERSION = "ECMA_2";
+var TITLE   = "instanceof"
+
+startTest();
+writeHeaderToLog( SECTION + " "+ TITLE);
+
+function InstanceOf( object_1, object_2, expect ) {
+  result = object_1 instanceof object_2;
+
+  new TestCase(
+    SECTION,
+    "(" + object_1 + ") instanceof " + object_2,
+    expect,
+    result );
+}
+
+function Gen3(value) {
+  this.value = value;
+  this.generation = 3;
+  this.toString = new Function ( "return \"(Gen\"+this.generation+\" instance)\"" );
+}
+Gen3.name = 3;
+Gen3.__proto__.toString = new Function( "return \"(\"+this.name+\" object)\"");
+
+function Gen2(value) {
+  this.value = value;
+  this.generation = 2;
+}
+Gen2.name = 2;
+Gen2.prototype = new Gen3();
+
+function Gen1(value) {
+  this.value = value;
+  this.generation = 1;
+}
+Gen1.name = 1;
+Gen1.prototype = new Gen2();
+
+function Gen0(value) {
+  this.value = value;
+  this.generation = 0;
+}
+Gen0.name = 0;
+Gen0.prototype = new Gen1();
+
+
+function GenA(value) {
+  this.value = value;
+  this.generation = "A";
+  this.toString = new Function ( "return \"(instance of Gen\"+this.generation+\")\"" );
+
+}
+GenA.prototype = new Gen0();
+GenA.name = "A";
+
+function GenB(value) {
+  this.value = value;
+  this.generation = "B";
+  this.toString = new Function ( "return \"(instance of Gen\"+this.generation+\")\"" );
+}
+GenB.name = "B"
+GenB.prototype = void 0;
+
+// Identifier is not a function
+
+DESCRIPTION = "Identifier is not a function";
+EXPECTED = "error";
+
+InstanceOf( new Boolean(true), false, "error" );
+
+test();