Explorar o código

Updating test baselines

Jimmy Thomson %!s(int64=7) %!d(string=hai) anos
pai
achega
82fad63199

+ 0 - 6
test/Date/DateGetSet.baseline

@@ -84,9 +84,3 @@ toUTCString : Fri, 26 Jul 35816 03:06:07 GMT
 valueOf : 1068094436767008
 toISOString method : function
 toJSON method : function
-1905
-1904
-0
-1999
-1998
-5

+ 8 - 11
test/Date/DateGetSet.js

@@ -183,14 +183,11 @@ WScript.Echo("valueOf : " + d.valueOf())
 WScript.Echo("toISOString method : " + typeof d.toISOString);
 WScript.Echo("toJSON method : " + typeof d.toJSON);
 
-// Set fullYear/fullYear+month/year on the Date prototype
-Date.prototype.setYear(5);                  // Year
-WScript.Echo(Date.prototype.getFullYear());
-Date.prototype.setYear(4, 4);               // Year, month -- month should be ignored
-WScript.Echo(Date.prototype.getFullYear());
-WScript.Echo(Date.prototype.getMonth());
-Date.prototype.setFullYear(1999);           // Only full year
-WScript.Echo(Date.prototype.getFullYear());
-Date.prototype.setFullYear(1998, 5);        // Full year and month
-WScript.Echo(Date.prototype.getFullYear());
-WScript.Echo(Date.prototype.getMonth());
+WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js", "self");
+
+assert.throws(() => Date.prototype.setYear(5), TypeError);
+assert.throws(() => Date.prototype.getFullYear(), TypeError);
+assert.throws(() => Date.prototype.setYear(4, 4), TypeError);
+assert.throws(() => Date.prototype.getMonth(), TypeError);
+assert.throws(() => Date.prototype.setFullYear(1999), TypeError);
+assert.throws(() => Date.prototype.setFullYear(1998, 5), TypeError);

+ 5 - 5
test/Debugger/JsrtDebugUtilsAddPropertyType.js.dbg.baseline

@@ -34,10 +34,10 @@
         "a14": {
           "#__proto__": "function <large string>",
           "prototype": "Object {...}",
+          "length": "number 0",
           "name": "string func",
           "caller": "object null",
-          "arguments": "object null",
-          "length": "number 0"
+          "arguments": "object null"
         },
         "a15": {
           "#__proto__": "Array []",
@@ -61,7 +61,7 @@
           "#__proto__": "Object {...}"
         },
         "a19": {
-          "#__proto__": "RegExp ",
+          "#__proto__": "Object {...}",
           "lastIndex": "number 0",
           "global": "boolean false",
           "multiline": "boolean false",
@@ -73,13 +73,13 @@
           "sticky": "boolean false"
         },
         "a20": {
-          "#__proto__": "Error ",
+          "#__proto__": "Object {...}",
           "description": "string Hello World!",
           "message": "string Hello World!",
           "stack": "string <large string>"
         },
         "a21": {
-          "#__proto__": "Error ",
+          "#__proto__": "Object {...}",
           "message": "string Hello World!",
           "stack": "string <large string>"
         },

+ 1 - 1
test/DebuggerCommon/ES6_RegExp_specialproperties_all.js.dbg.baseline

@@ -2,7 +2,7 @@
   {
     "evaluate": {
       "r": {
-        "#__proto__": "RegExp ",
+        "#__proto__": "Object {...}",
         "lastIndex": "number 0",
         "global": "boolean false",
         "multiline": "boolean false",

+ 1 - 1
test/DebuggerCommon/ES6_RegExp_specialproperties_default.js.dbg.baseline

@@ -2,7 +2,7 @@
   {
     "evaluate": {
       "r": {
-        "#__proto__": "RegExp ",
+        "#__proto__": "Object {...}",
         "lastIndex": "number 0",
         "global": "boolean false",
         "multiline": "boolean false",

+ 1 - 1
test/DebuggerCommon/ES6_RegExp_specialproperties_with_sticky.js.dbg.baseline

@@ -2,7 +2,7 @@
   {
     "evaluate": {
       "r": {
-        "#__proto__": "RegExp ",
+        "#__proto__": "Object {...}",
         "lastIndex": "number 0",
         "global": "boolean false",
         "multiline": "boolean false",

+ 1 - 1
test/DebuggerCommon/ES6_RegExp_specialproperties_with_unicode.js.dbg.baseline

@@ -2,7 +2,7 @@
   {
     "evaluate": {
       "r": {
-        "#__proto__": "RegExp ",
+        "#__proto__": "Object {...}",
         "lastIndex": "number 0",
         "global": "boolean false",
         "multiline": "boolean false",

+ 1 - 1
test/DebuggerCommon/ES6_letconst_trycatch_simple_fast.js.dbg.baseline

@@ -40,7 +40,7 @@
     },
     "locals": {
       "e": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "number": "number 0",
         "description": "string ",
         "stack": "string <large string>"

+ 11 - 11
test/DebuggerCommon/attachWithDeferParse.js.dbg.baseline

@@ -41,18 +41,18 @@
       "f1": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string f1",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "g": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string g",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       }
     },
     "globals": {
@@ -75,7 +75,7 @@
     },
     "locals": {
       "t": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -85,26 +85,26 @@
       "s": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 2",
         "name": "string ",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 2"
+        "arguments": "object null"
       },
       "f1": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string f1",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "g": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string g",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       }
     },
     "globals": {

+ 4 - 4
test/DebuggerCommon/bug_543550.js.dbg.baseline

@@ -54,7 +54,7 @@
           "name": "string set"
         },
         "size": {
-          "#__proto__": "Error ",
+          "#__proto__": "Object {...}",
           "message": "string Map.prototype.size: 'this' is not a Map object",
           "description": "string Map.prototype.size: 'this' is not a Map object",
           "number": "number -2146823172",
@@ -104,9 +104,9 @@
           "#__proto__": "Object {...}",
           "constructor": "function function bar() {\r\n\t}"
         },
-        "name": "string bar",
-        "length": "number 0"
+        "length": "number 0",
+        "name": "string bar"
       }
     }
   }
-]
+]

+ 37 - 37
test/DebuggerCommon/catchInspection.js.dbg.baseline

@@ -130,7 +130,7 @@
     },
     "locals": {
       "e": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -139,10 +139,10 @@
       "j1": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string ",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       }
     },
     "globals": {
@@ -230,7 +230,7 @@
     },
     "locals": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -282,7 +282,7 @@
     },
     "locals": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -335,7 +335,7 @@
     },
     "locals": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -388,7 +388,7 @@
     },
     "locals": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -437,7 +437,7 @@
     },
     "locals": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -486,7 +486,7 @@
     },
     "locals": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -535,7 +535,7 @@
     },
     "locals": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -579,7 +579,7 @@
     },
     "locals": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -593,98 +593,98 @@
       "startTest": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string ",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "bar": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string bar",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "bar2": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string bar2",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo1": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo1",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo10": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo10",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo11": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo11",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo2": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo2",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo3": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo3",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo5": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo5",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo6": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo6",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "foo7": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo7",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       }
     },
     "globals": {}
@@ -706,7 +706,7 @@
   {
     "evaluate": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -717,7 +717,7 @@
   {
     "evaluate": {
       "ex": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",

+ 14 - 14
test/DebuggerCommon/globalFuncVars.js.dbg.baseline

@@ -60,7 +60,7 @@
     },
     "locals": {
       "ex1": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -108,18 +108,18 @@
       "foo": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "bar": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string bar",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       }
     },
     "globals": {}
@@ -134,7 +134,7 @@
     },
     "locals": {
       "ex2": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "message": "string <large string>",
         "description": "string <large string>",
         "number": "number -2146823279",
@@ -146,18 +146,18 @@
       "foo": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "bar": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string bar",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       }
     },
     "globals": {}
@@ -181,18 +181,18 @@
       "foo": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string foo",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       },
       "bar": {
         "#__proto__": "function <large string>",
         "prototype": "Object {...}",
+        "length": "number 0",
         "name": "string bar",
         "caller": "object null",
-        "arguments": "object null",
-        "length": "number 0"
+        "arguments": "object null"
       }
     },
     "globals": {}

+ 9 - 9
test/DebuggerCommon/indexprop.js.dbg.baseline

@@ -22,14 +22,14 @@
         "callee": {
           "#__proto__": "function <large string>",
           "prototype": "Object {...}",
+          "length": "number 0",
           "caller": "object null",
-          "arguments": "Object {...}",
-          "length": "number 0"
+          "arguments": "Object {...}"
         },
         "Symbol.iterator": {
           "#__proto__": "function <large string>",
-          "name": "string values",
-          "length": "number 0"
+          "length": "number 0",
+          "name": "string values"
         },
         "[0]": "string \"arg0\"",
         "[1]": "string \"arg1\"",
@@ -52,7 +52,6 @@
           "toString": "function <large string>",
           "unshift": "function <large string>",
           "every": "function <large string>",
-          "forEach": "function <large string>",
           "lastIndexOf": "function <large string>",
           "map": "function <large string>",
           "reduce": "function <large string>",
@@ -72,6 +71,7 @@
           "filter": "function <large string>",
           "flat": "function <large string>",
           "flatMap": "function <large string>",
+          "forEach": "function <large string>",
           "length": "number 0"
         },
         "length": "number 8",
@@ -91,20 +91,20 @@
         "[3]": {
           "#__proto__": "function <large string>",
           "prototype": "Object {...}",
+          "length": "number 0",
           "caller": "object null",
           "arguments": "object null",
-          "length": "number 0",
           "[104]": "string 104"
         },
         "[4]": {
-          "#__proto__": "Error ",
+          "#__proto__": "Object {...}",
           "description": "string ErrorObj",
           "message": "string ErrorObj",
           "stack": "string <large string>",
           "[105]": "string 105"
         },
         "[5]": {
-          "#__proto__": "RegExp ",
+          "#__proto__": "Object {...}",
           "lastIndex": "number 0",
           "global": "boolean false",
           "multiline": "boolean false",
@@ -117,7 +117,7 @@
           "[106]": "string 106"
         },
         "[6]": {
-          "#__proto__": "Date Invalid Date",
+          "#__proto__": "Object {...}",
           "[107]": "string 107"
         },
         "[7]": {

+ 2 - 2
test/DebuggerCommon/step_out_direct_attach.js.dbg.baseline

@@ -34,7 +34,7 @@
         "length": "number 0"
       },
       "c": {
-        "#__proto__": "Date Invalid Date"
+        "#__proto__": "Object {...}"
       }
     },
     "globals": {
@@ -123,7 +123,7 @@
         "length": "number 0"
       },
       "c": {
-        "#__proto__": "Date Invalid Date"
+        "#__proto__": "Object {...}"
       }
     },
     "globals": {

+ 1 - 1
test/DebuggerCommon/step_out_from_JITted_function_attach.js.dbg.baseline

@@ -41,7 +41,7 @@
         "length": "number 0"
       },
       "c": {
-        "#__proto__": "Date Invalid Date"
+        "#__proto__": "Object {...}"
       }
     },
     "globals": {

+ 1 - 1
test/DebuggerCommon/step_out_from_catch_attach.js.dbg.baseline

@@ -15,7 +15,7 @@
     "locals": {
       "x": "number 1",
       "e": {
-        "#__proto__": "Error ",
+        "#__proto__": "Object {...}",
         "number": "number 0",
         "description": "string ",
         "stack": "string <large string>"

+ 1 - 1
test/Lib/error.baseline

@@ -1 +1 @@
-false
+true

+ 2 - 2
test/Lib/getclass1.baseline

@@ -3,12 +3,12 @@ Array.prototype.getClass()   : [object Array]
 b1.getClass()                : [object Boolean]
 Boolean.prototype.getClass() : [object Boolean]
 d1.getClass()                : [object Date]
-Date.prototype.getClass()    : [object Date]
+Date.prototype.getClass()    : [object Object]
 f1.getClass()                : [object Function]
 Function.prototype.getClass(): [object Function]
 n1.getClass()                : [object Number]
 Number.prototype.getClass()  : [object Number]
 r1.getClass()                : [object RegExp]
-RegExp.prototype.getClass()  : [object RegExp]
+RegExp.prototype.getClass()  : [object Object]
 s1.getClass()                : [object String]
 String.prototype.getClass()  : [object String]

+ 4 - 4
test/Prototypes/initProto.baseline

@@ -8,21 +8,21 @@ typeof(Boolean.prototype) = object
 Boolean.prototype.length = undefined
 typeof(Boolean.prototype.length) = undefined
 Boolean.prototype.toString() = false
-Date.prototype = Invalid Date
+Date.prototype = err: TypeError: Date.prototype.toString: 'this' is not a Date object
 typeof(Date.prototype) = object
 Date.prototype.length = undefined
 typeof(Date.prototype.length) = undefined
-Date.prototype.toString() = Invalid Date
+Date.prototype.toString() = err: TypeError: Date.prototype.toString: 'this' is not a Date object
 Number.prototype = 0
 typeof(Number.prototype) = object
 Number.prototype.length = undefined
 typeof(Number.prototype.length) = undefined
 Number.prototype.toString() = 0
-RegExp.prototype = /(?:)/
+RegExp.prototype = err: TypeError: RegExp.prototype.toString: 'this' is not a RegExp object
 typeof(RegExp.prototype) = object
 RegExp.prototype.length = undefined
 typeof(RegExp.prototype.length) = undefined
-RegExp.prototype.toString() = /(?:)/
+RegExp.prototype.toString() = err: TypeError: RegExp.prototype.toString: 'this' is not a RegExp object
 String.prototype = 
 typeof(String.prototype) = object
 String.prototype.length = 0

+ 5 - 1
test/Prototypes/initProto.js

@@ -7,7 +7,11 @@ function write(v) { WScript.Echo(v + ""); }
 
 function doEval(str)
 {
-    write(str + " = " + eval(str));
+    try {
+        write(str + " = " + eval(str));
+    } catch (e) { 
+        write(str + " = err: " + e);
+    }
 }
 
 function check(type)

+ 4 - 24
test/StackTrace/ErrorPrototype.baseline

@@ -15,20 +15,10 @@ Error: Prototype has new Error()
    at Global code (ErrorPrototype.js:62:1)
 
 Prototype is Error.prototype
-Error: Prototype is Error.prototype
-   at testErrorStack (ErrorPrototype.js:21:9)
-   at testErrorPrototype (ErrorPrototype.js:34:5)
-   at testErrorPrototypeChain (ErrorPrototype.js:41:5)
-   at runtest (ErrorPrototype.js:47:5)
-   at Global code (ErrorPrototype.js:62:1)
+undefined
 
 Prototype has Error.prototype
-Error: Prototype has Error.prototype
-   at testErrorStack (ErrorPrototype.js:21:9)
-   at testErrorPrototype (ErrorPrototype.js:34:5)
-   at testErrorPrototypeChain (ErrorPrototype.js:42:5)
-   at runtest (ErrorPrototype.js:47:5)
-   at Global code (ErrorPrototype.js:62:1)
+undefined
 
 Prototype is new RangeError()
 RangeError: Prototype is new RangeError()
@@ -47,20 +37,10 @@ RangeError: Prototype has new RangeError()
    at Global code (ErrorPrototype.js:62:1)
 
 Prototype is RangeError.prototype
-RangeError: Prototype is RangeError.prototype
-   at testErrorStack (ErrorPrototype.js:21:9)
-   at testErrorPrototype (ErrorPrototype.js:34:5)
-   at testErrorPrototypeChain (ErrorPrototype.js:41:5)
-   at runtest (ErrorPrototype.js:49:5)
-   at Global code (ErrorPrototype.js:62:1)
+undefined
 
 Prototype has RangeError.prototype
-RangeError: Prototype has RangeError.prototype
-   at testErrorStack (ErrorPrototype.js:21:9)
-   at testErrorPrototype (ErrorPrototype.js:34:5)
-   at testErrorPrototypeChain (ErrorPrototype.js:42:5)
-   at runtest (ErrorPrototype.js:49:5)
-   at Global code (ErrorPrototype.js:62:1)
+undefined
 
 Prototype is 123
 undefined