Transform: legacy $ERROR -> assert.*

This commit is contained in:
Rick Waldron 2020-09-23 09:57:53 -04:00
parent dcbc02b7fa
commit e5fa1d5ef4
102 changed files with 1012 additions and 2261 deletions

View File

@ -10,13 +10,10 @@ description: >
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
////////////////////////////////////////////////////////////////////////////// assert(
//CHECK#1 String.prototype.split.hasOwnProperty('length'),
if (!(String.prototype.split.hasOwnProperty('length'))) { 'String.prototype.split.hasOwnProperty(\'length\') must return true'
$ERROR('#1: String.prototype.split.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.split.hasOwnProperty('length')); );
}
//
//////////////////////////////////////////////////////////////////////////////
var __obj = String.prototype.split.length; var __obj = String.prototype.split.length;
@ -24,10 +21,8 @@ verifyNotWritable(String.prototype.split, "length", null, function() {
return "shifted"; return "shifted";
}); });
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 String.prototype.split.length,
if (String.prototype.split.length !== __obj) { __obj,
$ERROR('#2: __obj = String.prototype.split.length; String.prototype.split.length = function(){return "shifted";}; String.prototype.split.length === __obj. Actual: ' + String.prototype.split.length); 'The value of String.prototype.split.length is expected to equal the value of __obj'
} );
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -7,18 +7,9 @@ es5id: 15.5.4.14_A11
description: Checking String.prototype.split.length description: Checking String.prototype.split.length
---*/ ---*/
////////////////////////////////////////////////////////////////////////////// assert(
//CHECK#1 String.prototype.split.hasOwnProperty("length"),
if (!(String.prototype.split.hasOwnProperty("length"))) { 'String.prototype.split.hasOwnProperty("length") must return true'
$ERROR('#1: String.prototype.split.hasOwnProperty("length") return true. Actual: ' + String.prototype.split.hasOwnProperty("length")); );
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(String.prototype.split.length, 2, 'The value of String.prototype.split.length is 2');
//CHECK#2
if (String.prototype.split.length !== 2) {
$ERROR('#2: String.prototype.split.length === 2. Actual: ' + String.prototype.split.length);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -18,26 +18,12 @@ __instance.split = String.prototype.split;
var __split = __instance.split(true, false); var __split = __instance.split(true, false);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 0, 'The value of __split.length is 0');
//CHECK#3
if (__split.length !== 0) {
$ERROR('#3: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); __split.length === 0. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -29,34 +29,13 @@ var __str = "ABB\u0041BABAB";
var __split = __str.split(__obj, __obj2); var __split = __str.split(__obj, __obj2);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; var __split = split(__obj, __obj2); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; var __split = split(__obj, __obj2); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#3 assert.sameValue(__split[0], "A", 'The value of __split[0] is "A"');
if (__split.length !== 1) {
$ERROR('#3: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; var __split = split(__obj, __obj2); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[0] !== "A") {
$ERROR('#4: var __obj = {toString:function(){return "u0042B";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = "ABBu0041BABAB"; var __split = split(__obj, __obj2); __split[0] === "A". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -31,11 +31,9 @@ var __str = "ABB\u0041BABAB";
//CHECK#1 //CHECK#1
try { try {
var x = __str.split(__obj, __obj2); var x = __str.split(__obj, __obj2);
$ERROR('#1: "var x = __str.split(__obj, __obj2)" lead to throwing exception'); Test262Error.thrower('#1: "var x = __str.split(__obj, __obj2)" lead to throwing exception');
} catch (e) { } catch (e) {
if (e !== "intointeger") { assert.sameValue(e, "intointeger", 'The value of `e` is "intointeger"');
$ERROR('#1.1: Exception === "intointeger". Actual: ' + e);
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -34,11 +34,9 @@ var __str = new String("ABB\u0041BABAB");
//CHECK#1 //CHECK#1
try { try {
var x = __str.split(__obj, __obj2); var x = __str.split(__obj, __obj2);
$ERROR('#1: "var x = __str.split(__obj, __obj2)" lead to throwing exception'); Test262Error.thrower('#1: "var x = __str.split(__obj, __obj2)" lead to throwing exception');
} catch (e) { } catch (e) {
if (e !== "intointeger") { assert.sameValue(e, "intointeger", 'The value of `e` is "intointeger"');
$ERROR('#1.1: Exception === "intointeger". Actual: ' + e);
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -31,42 +31,14 @@ var __obj2 = {
var __split = "ABB\u0041BABAB\u0042cc^^\u0042Bvv%%B\u0042xxx".split(__obj, __obj2); var __split = "ABB\u0041BABAB\u0042cc^^\u0042Bvv%%B\u0042xxx".split(__obj, __obj2);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#3 assert.sameValue(__split[0], "A", 'The value of __split[0] is "A"');
if (__split.length !== 2) { assert.sameValue(__split[1], "ABABA", 'The value of __split[1] is "ABABA"');
$ERROR('#3: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[0] !== "A") {
$ERROR('#4: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); __split[0] === "A". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[1] !== "ABABA") {
$ERROR('#5: var __obj = {toString:function(){return "u0042u0042";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}}; __split = "ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx".split(__obj, __obj2); __split[1] === "ABABA". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -32,11 +32,9 @@ Number.prototype.split = String.prototype.split;
//CHECK#1 //CHECK#1
try { try {
var x = __instance.split(__obj, __obj2); var x = __instance.split(__obj, __obj2);
$ERROR('#1: "var x = __instance.split(__obj, __obj2)" lead to throwing exception'); Test262Error.thrower('#1: "var x = __instance.split(__obj, __obj2)" lead to throwing exception');
} catch (e) { } catch (e) {
if (e !== "intoint") { assert.sameValue(e, "intoint", 'The value of `e` is "intoint"');
$ERROR('#1.1: Exception === "intoint". Actual: ' + e);
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -39,11 +39,9 @@ var __instance = new __FACTORY(void 0);
//CHECK#1 //CHECK#1
try { try {
var x = __instance.split(__obj, __obj2); var x = __instance.split(__obj, __obj2);
$ERROR('#1: "var x = __instance.split(__obj, __obj2)" lead to throwing exception'); Test262Error.thrower('#1: "var x = __instance.split(__obj, __obj2)" lead to throwing exception');
} catch (e) { } catch (e) {
if (e !== "intointeger") { assert.sameValue(e, "intointeger", 'The value of `e` is "intointeger"');
$ERROR('#1.1: Exception === "intointeger". Actual: ' + e);
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -23,10 +23,8 @@ var __obj = {
Number.prototype.split = String.prototype.split; Number.prototype.split = String.prototype.split;
try { try {
var __split = 6776767677.006771122677555.split(__obj); var __split = (6776767677.006771122677555).split(__obj);
$ERROR('#1: "__split = 6776767677.006771122677555.split(__obj)" lead to throwing exception'); Test262Error.thrower('#1: "__split = 6776767677.006771122677555.split(__obj)" lead to throwing exception');
} catch (e) { } catch (e) {
if (!(e instanceof TypeError)) { assert(e instanceof TypeError, 'The result of `(e instanceof TypeError)` is true');
$ERROR('#1.1: Exception is instance of TypeError. Actual: ' + e);
}
} }

View File

@ -16,60 +16,18 @@ var __re = /\u0037\u0037/g;
Number.prototype.split = String.prototype.split; Number.prototype.split = String.prototype.split;
var __split = 6776767677.006771122677555.split(__re); var __split = (6776767677.006771122677555).split(__re);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 4, 'The value of __split.length is 4');
//CHECK#3 assert.sameValue(__split[0], "6", 'The value of __split[0] is "6"');
if (__split.length !== 4) { assert.sameValue(__split[1], "67676", 'The value of __split[1] is "67676"');
$ERROR('#3: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split.length === 4. Actual: ' + __split.length); assert.sameValue(__split[2], ".006", 'The value of __split[2] is ".006"');
} assert.sameValue(__split[3], "1", 'The value of __split[3] is "1"');
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[0] !== "6") {
$ERROR('#4: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[0] === "6". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[1] !== "67676") {
$ERROR('#5: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[1] === "67676". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#6
if (__split[2] !== ".006") {
$ERROR('#6: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[2] === ".006". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#7
if (__split[3] !== "1") {
$ERROR('#7: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[3] === "1". Actual: ' + __split[3]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,36 +16,15 @@ var __re = new RegExp("00");
Number.prototype.split = String.prototype.split; Number.prototype.split = String.prototype.split;
var __split = 6776767677.006771122677555.split(__re, eval("\"1\"")); var __split = (6776767677.006771122677555).split(__re, eval("\"1\""));
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: var __re = new RegExp("00"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(""1"")); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: var __re = new RegExp("00"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(""1"")); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#3 assert.sameValue(__split[0], "6776767677.", 'The value of __split[0] is "6776767677."');
if (__split.length !== 1) {
$ERROR('#3: var __re = new RegExp("00"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(""1"")); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "6776767677.") {
$ERROR('#3: var __re = new RegExp("00"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(""1"")); __split[0] === "6776767677.". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -22,26 +22,12 @@ var __split = __instance.split("A" !== "\u0041", function() {
return 0; return 0;
}(), null); }(), null);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split("A"!=="u0041", function(){return 0;}(),null); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split("A"!=="u0041", function(){return 0;}(),null); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 0, 'The value of __split.length is 0');
//CHECK#3
if (__split.length !== 0) {
$ERROR('#3: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split("A"!=="u0041", function(){return 0;}(),null); __split.length === 0. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -32,35 +32,14 @@ if (toString === Object.prototype.toString) {
var __split = split(eval("\"[\""), __obj__lim); var __split = split(eval("\"[\""), __obj__lim);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#3 assert.sameValue(__split[1].substring(0, 6), "object", '__split[1].substring(0, 6) must return "object"');
if (__split.length !== 2) {
$ERROR('#3: __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[1].substring(0, 6) !== "object") {
$ERROR('#4: __split[1].substring(0,6) === "object". Actual: ' + __split[1].substring(0, 6));
}
//
//////////////////////////////////////////////////////////////////////////////
} }

View File

@ -15,34 +15,13 @@ description: Call split without arguments, and instance is empty string
//since ToString() evaluates to "" split() evaluates to split("",0) //since ToString() evaluates to "" split() evaluates to split("",0)
var __split = "".split(); var __split = "".split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: __split = "".split(); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: __split = "".split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#3 assert.sameValue(__split[0], "", 'The value of __split[0] is ""');
if (__split.length !== 1) {
$ERROR('#3: __split = "".split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[0] !== "") {
$ERROR('#4: __split = "".split(); __split[0] === "". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -19,42 +19,14 @@ var __split = function() {
return "gnulluna" return "gnulluna"
}().split(null); }().split(null);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: __split = function(){return "gnulluna"}().split(null); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: __split = function(){return "gnulluna"}().split(null); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#3 assert.sameValue(__split[0], "g", 'The value of __split[0] is "g"');
if (__split.length !== 2) { assert.sameValue(__split[1], "una", 'The value of __split[1] is "una"');
$ERROR('#3: __split = function(){return "gnulluna"}().split(null); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[0] !== "g") {
$ERROR('#4: __split = function(){return "gnulluna"}().split(null); __split[0] === "g". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[1] !== "una") {
$ERROR('#5: __split = function(){return "gnulluna"}().split(null); __split[1] === "una". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -14,34 +14,13 @@ description: Argument is undefined, and instance is String
var __split = String("undefinedd").split(undefined); var __split = String("undefinedd").split(undefined);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: __split = String("undefinedd").split(undefined); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: __split = String("undefinedd").split(undefined); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#3 assert.sameValue(__split[0], "undefinedd", 'The value of __split[0] is "undefinedd"');
if (__split.length !== 1) {
$ERROR('#3: __split = String("undefinedd").split(undefined); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[0] !== "undefinedd") {
$ERROR('#4: __split = String("undefinedd").split(undefined); __split[0] === "undefinedd". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -20,34 +20,13 @@ var __obj = {
var __split = String(__obj).split(void 0); var __split = String(__obj).split(void 0);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#3 assert.sameValue(__split[0], "undefined", 'The value of __split[0] is "undefined"');
if (__split.length !== 1) {
$ERROR('#3: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[0] !== "undefined") {
$ERROR('#4: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split[0] !== "undefined". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -22,34 +22,13 @@ var __obj = {
//since ToString(undefined) evaluates to "undefined" //since ToString(undefined) evaluates to "undefined"
var __split = new String(__obj).split(function() {}()); var __split = new String(__obj).split(function() {}());
////////////////////////////////////////////////////////////////////////////// assert.sameValue(typeof __split, "object", 'The value of `typeof __split` is "object"');
//CHECK#1
if (typeof __split !== "object") {
$ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); typeof __split === "object". Actual: ' + typeof __split);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#3 assert.sameValue(__split[0], "undefined", 'The value of __split[0] is "undefined"');
if (__split.length !== 1) {
$ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[0] !== "undefined") {
$ERROR('#4: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split[0] !== "undefined". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,58 +15,15 @@ var __string = new String("one,two,three,four,five");
var __split = __string.split(","); var __split = __string.split(",");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 5, 'The value of __split.length is 5');
//CHECK#2 assert.sameValue(__split[0], "one", 'The value of __split[0] is "one"');
if (__split.length !== 5) { assert.sameValue(__split[1], "two", 'The value of __split[1] is "two"');
$ERROR('#2: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split.length === 5. Actual: ' + __split.length); assert.sameValue(__split[2], "three", 'The value of __split[2] is "three"');
} assert.sameValue(__split[3], "four", 'The value of __split[3] is "four"');
// assert.sameValue(__split[4], "five", 'The value of __split[4] is "five"');
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "one") {
$ERROR('#3: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[0] === "one". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "two") {
$ERROR('#4: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[1] === "two". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "three") {
$ERROR('#5: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[2] === "three". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#6
if (__split[3] !== "four") {
$ERROR('#6: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[3] === "four". Actual: ' + __split[3]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#7
if (__split[4] !== "five") {
$ERROR('#7: var __string = new String("one,two,three,four,five"); __split = __string.split(","); __split[4] === "five". Actual: ' + __split[4]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,28 +16,25 @@ var __expected = ["this", "is", "a", "string", "object"];
var __split = __string.split(123); var __split = __string.split(123);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var i = 0; i < __expected.length; i++) { for (var i = 0; i < __expected.length; i++) {
if (__expected[i] !== __split[i]) { assert.sameValue(__expected[i], __split[i], 'The value of __expected[i] is expected to equal the value of __split[i]');
$ERROR('#3.' + i + ': var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(123); __expected[' + i + ']===__split[' + i + ']. Actual: ' + __expected[i]);
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = new String("one-1,two-2,four-4");
var __split = __string.split(":"); var __split = __string.split(":");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one-1,two-2,four-4"); __split = __string.split(":"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "one-1,two-2,four-4", 'The value of __split[0] is "one-1,two-2,four-4"');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String("one-1,two-2,four-4"); __split = __string.split(":"); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "one-1,two-2,four-4") {
$ERROR('#3: var __string = new String("one-1,two-2,four-4"); __split = __string.split(":"); __split[0] === "one-1,two-2,four-4". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = new String("one-1 two-2 four-4");
var __split = __string.split("r-42"); var __split = __string.split("r-42");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one-1 two-2 four-4"); __split = __string.split("r-42"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "one-1 two-2 four-4", 'The value of __split[0] is "one-1 two-2 four-4"');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String("one-1 two-2 four-4"); __split = __string.split("r-42"); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "one-1 two-2 four-4") {
$ERROR('#3: var __string = new String("one-1 two-2 four-4"); __split = __string.split("r-42"); __split[0] === "one-1 two-2 four-4". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,34 +15,12 @@ var __string = new String("one-1 two-2 four-4");
var __split = __string.split("-4"); var __split = __string.split("-4");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one-1 two-2 four-4"); __split = __string.split("-4"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "one-1 two-2 four", 'The value of __split[0] is "one-1 two-2 four"');
if (__split.length !== 2) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("one-1 two-2 four-4"); __split = __string.split("-4"); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "one-1 two-2 four") {
$ERROR('#3: var __string = new String("one-1 two-2 four-4"); __split = __string.split("-4"); __split[0] === "one-1 two-2 four". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#3: var __string = new String("one-1 two-2 four-4"); __split = __string.split("-4"); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,34 +15,12 @@ var __string = new String("one-1 two-2 four-4");
var __split = __string.split("on"); var __split = __string.split("on");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one-1 two-2 four-4"); __split = __string.split("on"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "", 'The value of __split[0] is ""');
if (__split.length !== 2) { assert.sameValue(__split[1], "e-1 two-2 four-4", 'The value of __split[1] is "e-1 two-2 four-4"');
$ERROR('#2: var __string = new String("one-1 two-2 four-4"); __split = __string.split("on"); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "") {
$ERROR('#3: var __string = new String("one-1 two-2 four-4"); __split = __string.split("on"); __split[0] === "". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "e-1 two-2 four-4") {
$ERROR('#4: var __string = new String("one-1 two-2 four-4"); __split = __string.split("on"); __split[1] === "e-1 two-2 four-4". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = new String();
var __split = __string.split(""); var __split = __string.split("");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String(); __split = __string.split(""); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 0, 'The value of __split.length is 0');
//CHECK#2 assert.sameValue(__split[0], undefined, 'The value of __split[0] is expected to equal `undefined`');
if (__split.length !== 0) {
$ERROR('#2: var __string = new String(); __split = __string.split(""); __split.length === 0. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== undefined) {
$ERROR('#3: var __string = new String(); __split = __string.split(""); __split[0] === undefined. Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = new String();
var __split = __string.split(" "); var __split = __string.split(" ");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String(); __split = __string.split(" "); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "", 'The value of __split[0] is ""');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String(); __split = __string.split(" "); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "") {
$ERROR('#3: var __string = new String(); __split = __string.split(" "); __split[0] === "". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = new String(" ");
var __split = __string.split(""); var __split = __string.split("");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String(" "); __split = __string.split(""); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], " ", 'The value of __split[0] is " "');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String(" "); __split = __string.split(""); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== " ") {
$ERROR('#3: var __string = new String(" "); __split = __string.split(""); __split[0] === " ". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,34 +15,12 @@ var __string = new String(" ");
var __split = __string.split(" "); var __split = __string.split(" ");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String(" "); __split = __string.split(" "); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "", 'The value of __split[0] is ""');
if (__split.length !== 2) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String(" "); __split = __string.split(" "); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "") {
$ERROR('#3: var __string = new String(" "); __split = __string.split(" "); __split[0] === "". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String(" "); __split = __string.split(" "); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = "";
var __split = __string.split("x"); var __split = __string.split("x");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = ""; __split = __string.split("x"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "", 'The value of __split[0] is ""');
if (__split.length !== 1) {
$ERROR('#2: var __string = ""; __split = __string.split("x"); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "") {
$ERROR('#3: var __string = ""; __split = __string.split("x"); __split[0] === "". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,58 +15,15 @@ var __string = new String("one two three four five");
var __split = __string.split(" "); var __split = __string.split(" ");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one two three four five"); __split = __string.split(" "); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 5, 'The value of __split.length is 5');
//CHECK#2 assert.sameValue(__split[0], "one", 'The value of __split[0] is "one"');
if (__split.length !== 5) { assert.sameValue(__split[1], "two", 'The value of __split[1] is "two"');
$ERROR('#2: var __string = new String("one two three four five"); __split = __string.split(" "); __split.length === 5. Actual: ' + __split.length); assert.sameValue(__split[2], "three", 'The value of __split[2] is "three"');
} assert.sameValue(__split[3], "four", 'The value of __split[3] is "four"');
// assert.sameValue(__split[4], "five", 'The value of __split[4] is "five"');
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "one") {
$ERROR('#3: var __string = new String("one two three four five"); __split = __string.split(" "); __split[0] === "one". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "two") {
$ERROR('#4: var __string = new String("one two three four five"); __split = __string.split(" "); __split[1] === "two". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "three") {
$ERROR('#5: var __string = new String("one two three four five"); __split = __string.split(" "); __split[2] === "three". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#6
if (__split[3] !== "four") {
$ERROR('#6: var __string = new String("one two three four five"); __split = __string.split(" "); __split[3] === "four". Actual: ' + __split[3]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#7
if (__split[4] !== "five") {
$ERROR('#7: var __string = new String("one two three four five"); __split = __string.split(" "); __split[4] === "five". Actual: ' + __split[4]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,28 +15,25 @@ var __string = new String("one-1 two-2 three-3");
var __split = __string.split(new RegExp); var __split = __string.split(new RegExp);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one-1 two-2 three-3"); __split = __string.split(new RegExp); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__string.length,
'The value of __split.length is expected to equal the value of __string.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __string.length) {
$ERROR('#2: var __string = new String("one-1 two-2 three-3"); __split = __string.split(new RegExp); __split.length === __string.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var i = 0; i < __string.length; i++) { for (var i = 0; i < __string.length; i++) {
if (__string.charAt(i) !== __split[i]) { assert.sameValue(__string.charAt(i), __split[i], '__string.charAt("0") must return the value of __split[i]');
$ERROR('#3.' + i + ': var __string = new String("one-1 two-2 three-3"); __split = __string.split(new RegExp); __string.charAt(' + i + ')===__split[' + i + ']. Actual: ' + __string.charAt(i));
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,34 +15,12 @@ var __string = new String("hello");
var __split = __string.split("ll"); var __split = __string.split("ll");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); __split = __string.split("ll"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 2) { assert.sameValue(__split[1], "o", 'The value of __split[1] is "o"');
$ERROR('#2: var __string = new String("hello"); __split = __string.split("ll"); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); __split = __string.split("ll"); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "o") {
$ERROR('#4: var __string = new String("hello"); __split = __string.split("ll"); __split[1] === "o". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,42 +15,13 @@ var __string = new String("hello");
var __split = __string.split("l"); var __split = __string.split("l");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); __split = __string.split("l"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 3, 'The value of __split.length is 3');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 3) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); __split = __string.split("l"); __split.length === 3. Actual: ' + __split.length); assert.sameValue(__split[2], "o", 'The value of __split[2] is "o"');
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); __split = __string.split("l"); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); __split = __string.split("l"); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "o") {
$ERROR('#5: var __string = new String("hello"); __split = __string.split("l"); __split[2] === "o". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = new String("hello");
var __split = __string.split("x"); var __split = __string.split("x");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); __split = __string.split("x"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "hello", 'The value of __split[0] is "hello"');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String("hello"); __split = __string.split("x"); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "hello") {
$ERROR('#3: var __string = new String("hello"); __split = __string.split("x"); __split[0] === "hello". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,34 +15,12 @@ var __string = new String("hello");
var __split = __string.split("h"); var __split = __string.split("h");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); __split = __string.split("h"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "", 'The value of __split[0] is ""');
if (__split.length !== 2) { assert.sameValue(__split[1], "ello", 'The value of __split[1] is "ello"');
$ERROR('#2: var __string = new String("hello"); __split = __string.split("h"); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "") {
$ERROR('#3: var __string = new String("hello"); __split = __string.split("h"); __split[0] === "". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "ello") {
$ERROR('#4: var __string = new String("hello"); __split = __string.split("h"); __split[1] === "ello". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,34 +15,12 @@ var __string = new String("hello");
var __split = __string.split("o"); var __split = __string.split("o");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); __split = __string.split("o"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "hell", 'The value of __split[0] is "hell"');
if (__split.length !== 2) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); __split = __string.split("o"); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "hell") {
$ERROR('#3: var __string = new String("hello"); __split = __string.split("o"); __split[0] === "hell". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); __split = __string.split("o"); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,34 +15,12 @@ var __string = new String("hello");
var __split = __string.split("hello"); var __split = __string.split("hello");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); __split = __string.split("hello"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "", 'The value of __split[0] is ""');
if (__split.length !== 2) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); __split = __string.split("hello"); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "") {
$ERROR('#3: var __string = new String("hello"); __split = __string.split("hello"); __split[0] === "". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); __split = __string.split("hello"); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = new String("hello");
var __split = __string.split(undefined); var __split = __string.split(undefined);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); __split = __string.split(undefined); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "hello", 'The value of __split[0] is "hello"');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String("hello"); __split = __string.split(undefined); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "hello") {
$ERROR('#3: var __string = new String("hello"); __split = __string.split(undefined); __split[0] === "hello". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,26 +15,11 @@ var __string = new String("hello");
var __split = __string.split("hellothere"); var __split = __string.split("hellothere");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); __split = __string.split("hellothere"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "hello", 'The value of __split[0] is "hello"');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String("hello"); __split = __string.split("hellothere"); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "hello") {
$ERROR('#3: var __string = new String("hello"); __split = __string.split("hellothere"); __split[0] === "hello". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -19,28 +19,29 @@ var __split = __instance.split(1);
var __expected = ["", "00", "", "", "", "22", "33", "44", "60"]; var __expected = ["", "00", "", "", "", "22", "33", "44", "60"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,34 +15,12 @@ var __string = new String("one two three four five");
var __split = __string.split(/ /, 2); var __split = __string.split(/ /, 2);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one two three four five"); __split = __string.split(/ /,2); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "one", 'The value of __split[0] is "one"');
if (__split.length !== 2) { assert.sameValue(__split[1], "two", 'The value of __split[1] is "two"');
$ERROR('#2: var __string = new String("one two three four five"); __split = __string.split(/ /,2); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "one") {
$ERROR('#3: var __string = new String("one two three four five"); __split = __string.split(/ /,2); __split[0] === "one". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "two") {
$ERROR('#4: var __string = new String("one two three four five"); __split = __string.split(/ /,2); __split[1] === "two". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -19,26 +19,16 @@ var __split = __instance.split(1, 1);
var __expected = [""]; var __expected = [""];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -19,28 +19,29 @@ var __split = __instance.split(1, 2);
var __expected = ["", "00"]; var __expected = ["", "00"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[index] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -19,26 +19,16 @@ var __split = __instance.split(1, 0);
var __expected = []; var __expected = [];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -19,28 +19,29 @@ var __split = __instance.split(1, 100);
var __expected = ["", "00", "", "", "", "22", "33", "44", "60"]; var __expected = ["", "00", "", "", "", "22", "33", "44", "60"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[index] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -19,28 +19,29 @@ var __split = __instance.split(1, void 0);
var __expected = ["", "00", "", "", "", "22", "33", "44", "60"]; var __expected = ["", "00", "", "", "", "22", "33", "44", "60"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3: __split[index] === __expected[index]. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -19,28 +19,29 @@ var __split = __instance.split(1, Math.pow(2, 32) - 1);
var __expected = ["", "00", "", "", "", "22", "33", "44", "60"]; var __expected = ["", "00", "", "", "", "22", "33", "44", "60"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[index] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -19,26 +19,16 @@ var __split = __instance.split(1, "boo");
var __expected = []; var __expected = [];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -19,26 +19,16 @@ var __split = __instance.split(1, -Math.pow(2, 32) + 1);
var __expected = [""]; var __expected = [""];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -17,25 +17,16 @@ var __split = __instance.split("l", NaN);
var __expected = []; var __expected = [];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", NaN); __expected = []; __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", NaN); __expected = []; __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", NaN); __expected = []; __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//

View File

@ -17,25 +17,16 @@ var __split = __instance.split("l", 0);
var __expected = []; var __expected = [];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 0); __expected = []; __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 0); __expected = []; __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", 0); __expected = []; __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//

View File

@ -15,50 +15,19 @@ var __string = new String("one two three");
var __split = __string.split(""); var __split = __string.split("");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one two three"); __split = __string.split(""); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __string.length) { __string.length,
$ERROR('#2: var __string = new String("one two three"); __split = __string.split(""); __split.length === __string.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __string.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], "o", 'The value of __split[0] is "o"');
//CHECK#3 assert.sameValue(__split[1], "n", 'The value of __split[1] is "n"');
if (__split[0] !== "o") { assert.sameValue(__split[11], "e", 'The value of __split[11] is "e"');
$ERROR('#3: var __string = new String("one two three"); __split = __string.split(""); __split[0] === "o". Actual: ' + __split[0]); assert.sameValue(__split[12], "e", 'The value of __split[12] is "e"');
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "n") {
$ERROR('#4: var __string = new String("one two three"); __split = __string.split(""); __split[1] === "n". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[11] !== "e") {
$ERROR('#5: var __string = new String("one two three"); __split = __string.split(""); __split[11] === "e". Actual: ' + __split[11]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#6
if (__split[12] !== "e") {
$ERROR('#6: var __string = new String("one two three"); __split = __string.split(""); __split[12] === "e". Actual: ' + __split[12]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -17,25 +17,16 @@ var __split = __instance.split("l", 1);
var __expected = ["he"]; var __expected = ["he"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 1); __expected = ["he"]; __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 1); __expected = ["he"]; __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", 1); __expected = ["he"]; __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//

View File

@ -17,28 +17,29 @@ var __split = __instance.split("l", 2);
var __expected = ["he", ""]; var __expected = ["he", ""];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 2); __expected = ["he",""]; __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 2); __expected = ["he",""]; __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': var __instance = new String("hello"); __split = __instance.split("l", 2); __expected = ["he",""]; __split[index] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -17,28 +17,29 @@ var __split = __instance.split("l", 3);
var __expected = ["he", "", "o"]; var __expected = ["he", "", "o"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 3); __expected = ["he","","o"]; __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 3); __expected = ["he","","o"]; __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': var __instance = new String("hello"); __split = __instance.split("l", 3); __expected = ["he","","o"]; __split[index] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -17,28 +17,29 @@ var __split = __instance.split("l", 4);
var __expected = ["he", "", "o"]; var __expected = ["he", "", "o"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new String("hello"); __split = __instance.split("l", 4); __expected = ["he","","o"]; __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: var __instance = new String("hello"); __split = __instance.split("l", 4); __expected = ["he","","o"]; __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': var __instance = new String("hello"); __split = __instance.split("l", 4); __expected = ["he","","o"]; __split[index] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,42 +15,13 @@ var __string = new String("one-1,two-2,four-4");
var __split = __string.split(/,/); var __split = __string.split(/,/);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 3, 'The value of __split.length is 3');
//CHECK#2 assert.sameValue(__split[0], "one-1", 'The value of __split[0] is "one-1"');
if (__split.length !== 3) { assert.sameValue(__split[1], "two-2", 'The value of __split[1] is "two-2"');
$ERROR('#2: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split.length === 3. Actual: ' + __split.length); assert.sameValue(__split[2], "four-4", 'The value of __split[2] is "four-4"');
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "one-1") {
$ERROR('#3: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split[0] === "one-1". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "two-2") {
$ERROR('#4: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split[1] === "two-2". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "four-4") {
$ERROR('#5: var __string = new String("one-1,two-2,four-4"); __split = __string.split(/,/); __split[2] === "four-4". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -15,28 +15,29 @@ var __string = new String("one-1 two-2 three-3");
var __split = __string.split(''); var __split = __string.split('');
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one-1 two-2 three-3"); __split = __string.split(\'\'); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__string.length,
'The value of __split.length is expected to equal the value of __string.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __string.length) {
$ERROR('#2: var __string = new String("one-1 two-2 three-3"); __split = __string.split(\'\'); __split.length === __string.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var i = 0; i < __string.length; i++) { for (var i = 0; i < __string.length; i++) {
if (__split[i] !== __string.charAt(i)) { assert.sameValue(
$ERROR('#3.' + i + ': var __string = new String("one-1 two-2 three-3"); __split = __string.split(\'\'); __split[' + i + ']===__string.charAt(' + i + '). Actual: ' + __split[i]); __split[i],
} __string.charAt(i),
'The value of __split[i] must return the same value returned by __string.charAt(i)'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,25 @@ var __expected = [__string];
var __split = __string.split(void 0); var __split = __string.split(void 0);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = "thisundefinedisundefinedaundefinedstringundefinedobject"; var __expected = ["thisundefinedisundefinedaundefinedstringundefinedobject"]; __split = __string.split(void 0); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: var __string = "thisundefinedisundefinedaundefinedstringundefinedobject"; var __expected = ["thisundefinedisundefinedaundefinedstringundefinedobject"]; __split = __string.split(void 0); __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var i = 0; i < __expected.length; i++) { for (var i = 0; i < __expected.length; i++) {
if (__expected[i] !== __split[i]) { assert.sameValue(__expected[i], __split[i], 'The value of __expected[i] is expected to equal the value of __split[i]');
$ERROR('#3.' + i + ': var __string = "thisundefinedisundefinedaundefinedstringundefinedobject"; var __expected = ["thisundefinedisundefinedaundefinedstringundefinedobject"]; __split = __string.split(void 0); __expected[' + i + ']===' + __split[i] + '. Actual: ' + __expected[i]);
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -16,28 +16,25 @@ var __expected = ["this", "is", "a", "string", "object"];
var __split = __string.split(null); var __split = __string.split(null);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = "thisnullisnullanullstringnullobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(null); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: var __string = "thisnullisnullanullstringnullobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(null); __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var i = 0; i < __expected.length; i++) { for (var i = 0; i < __expected.length; i++) {
if (__expected[i] !== __split[i]) { assert.sameValue(__expected[i], __split[i], 'The value of __expected[i] is expected to equal the value of __split[i]');
$ERROR('#3.' + i + ': var __string = "thisnullisnullanullstringnullobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(null); __expected[' + i + ']===' + __split[i] + '. Actual: ' + __expected[i]);
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -16,28 +16,25 @@ var __expected = ["this", "is", "a", "string", "object"];
var __split = __string.split(true); var __split = __string.split(true);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = "thistrueistrueatruestringtrueobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(true); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: var __string = "thistrueistrueatruestringtrueobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(true); __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var i = 0; i < __expected.length; i++) { for (var i = 0; i < __expected.length; i++) {
if (__expected[i] !== __split[i]) { assert.sameValue(__expected[i], __split[i], 'The value of __expected[i] is expected to equal the value of __split[i]');
$ERROR('#3.' + i + ': var __string = "thistrueistrueatruestringtrueobject"; var __expected = ["this", "is", "a", "string", "object"]; __split = __string.split(true); __expected[' + i + ']===' + __split[i] + '. Actual: ' + __expected[i]);
}
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,26 +14,11 @@ var __string = new String("one,two,three,four,five");
var __split = __string.split(); var __split = __string.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("one,two,three,four,five"); __split = __string.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "one,two,three,four,five", 'The value of __split[0] is "one,two,three,four,five"');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String("one,two,three,four,five"); __split = __string.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "one,two,three,four,five") {
$ERROR('#3: var __string = new String("one,two,three,four,five"); __split = __string.split(); __split[0] === "one,two,three,four,five". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -14,26 +14,11 @@ var __string = new String;
var __split = __string.split(); var __split = __string.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String; __split = __string.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "", 'The value of __split[0] is ""');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String; __split = __string.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "") {
$ERROR('#3: var __string = new String; __split = __string.split(); __split[0] === "". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -14,26 +14,11 @@ var __string = new String(" ");
var __split = __string.split(); var __split = __string.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String(" "); __split = __string.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], " ", 'The value of __split[0] is " "');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String(" "); __split = __string.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== " ") {
$ERROR('#3: var __string = new String(" "); __split = __string.split(); __split[0] === " ". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,26 +16,11 @@ __instance.split = String.prototype.split;
var __split = __instance.split(); var __split = __instance.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "[object Object]", 'The value of __split[0] is "[object Object]"');
if (__split.length !== 1) {
$ERROR('#2: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "[object Object]") {
$ERROR('#3: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "[object Object]". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -20,26 +20,11 @@ __instance.split = String.prototype.split;
var __split = __instance.split(); var __split = __instance.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0].substring(0, 8), "function", '__split[0].substring(0, 8) must return "function"');
if (__split.length !== 1) {
$ERROR('#2: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0].substring(0, 8) !== "function") {
$ERROR('#3: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split[0].substring(0,8) === "function". Actual: ' + __split[0].substring(0, 8));
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,26 +16,11 @@ __instance.split = String.prototype.split;
var __split = __instance.split(); var __split = __instance.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "NaN", 'The value of __split[0] is "NaN"');
if (__split.length !== 1) {
$ERROR('#2: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "NaN") {
$ERROR('#3: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "NaN". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,26 +16,11 @@ __instance.split = String.prototype.split;
var __split = __instance.split(); var __split = __instance.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "-1234567890", 'The value of __split[0] is "-1234567890"');
if (__split.length !== 1) {
$ERROR('#2: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "-1234567890") {
$ERROR('#3: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "-1234567890". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,26 +16,16 @@ __instance.split = String.prototype.split;
var __split = __instance.split(); var __split = __instance.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2
if (__split.length !== 1) {
$ERROR('#2: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#3 __split[0],
if (__split[0] !== __instance.toString()) { __instance.toString(),
$ERROR('#3: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === __instance.toString(). Actual: ' + __split[0]); 'The value of __split[0] must return the same value returned by __instance.toString()'
} );
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,26 +16,11 @@ __instance.split = String.prototype.split;
var __split = __instance.split(); var __split = __instance.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "[object Math]", 'The value of __split[0] is "[object Math]"');
if (__split.length !== 1) {
$ERROR('#2: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "[object Math]") {
$ERROR('#3: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "[object Math]". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,26 +16,11 @@ __instance.split = String.prototype.split;
var __split = __instance.split(); var __split = __instance.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "1,2,3,4,5", 'The value of __split[0] is "1,2,3,4,5"');
if (__split.length !== 1) {
$ERROR('#2: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "1,2,3,4,5") {
$ERROR('#3: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "1,2,3,4,5". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,26 +16,11 @@ __instance.split = String.prototype.split;
var __split = __instance.split(); var __split = __instance.split();
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "false", 'The value of __split[0] is "false"');
if (__split.length !== 1) {
$ERROR('#2: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "false") {
$ERROR('#3: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === "false". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,42 +16,13 @@ var __re = /l/;
var __split = __string.split(__re); var __split = __string.split(__re);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 3, 'The value of __split.length is 3');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 3) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split.length === 3. Actual: ' + __split.length); assert.sameValue(__split[2], "o", 'The value of __split[2] is "o"');
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "o") {
$ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re); __split[2] === "o". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,29 @@ var __split = __string.split(__re);
var __expected = ["h", "e", "l", "l", "o"]; var __expected = ["h", "e", "l", "l", "o"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,26 +18,16 @@ var __split = __string.split(__re, 0);
var __expected = []; var __expected = [];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -18,26 +18,16 @@ var __split = __string.split(__re, 1);
var __expected = ["h"]; var __expected = ["h"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: __split[0] === ' + __expected[0] + '. Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,29 @@ var __split = __string.split(__re, 2);
var __expected = ["h", "e"]; var __expected = ["h", "e"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,29 @@ var __split = __string.split(__re, 3);
var __expected = ["h", "e", "l"]; var __expected = ["h", "e", "l"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,29 @@ var __split = __string.split(__re, 4);
var __expected = ["h", "e", "l", "l"]; var __expected = ["h", "e", "l", "l"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -20,28 +20,29 @@ var __split = __string.split(__re, void 0);
var __expected = ["h", "e", "l", "l", "o"]; var __expected = ["h", "e", "l", "l", "o"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -20,28 +20,29 @@ var __split = __string.split(__re, undefined);
var __expected = ["h", "e", "l", "l", "o"]; var __expected = ["h", "e", "l", "l", "o"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,29 @@ var __split = __string.split(__re, "hi");
var __expected = []; var __expected = [];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,29 @@ var __split = __string.split(__re);
var __expected = ["a", "b", "c", "de", "f"]; var __expected = ["a", "b", "c", "de", "f"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -16,18 +16,10 @@ var __re = /l/;
var __split = __string.split(__re, 0); var __split = __string.split(__re, 0);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,0); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 0, 'The value of __split.length is 0');
//CHECK#2
if (__split.length !== 0) {
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,0); __split.length === 0. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -20,28 +20,29 @@ var __split = __string.split(__re, 3);
var __expected = ["a", "b", "c"]; var __expected = ["a", "b", "c"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,26 +18,16 @@ var __split = __string.split(__re);
var __expected = ["a b c de f"]; var __expected = ["a b c de f"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#2 __split.length,
if (__split.length !== __expected.length) { __expected.length,
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length); 'The value of __split.length is expected to equal the value of __expected.length'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split[0], __expected[0], 'The value of __split[0] is expected to equal the value of __expected[0]');
//CHECK#3
if (__split[0] !== __expected[0]) {
$ERROR('#3: __split[0] === ' + __expected[0] + '. Actual: ' + __split[index]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -20,28 +20,29 @@ var __split = __string.split(__re);
var __expected = ["dfe", "iu ", " =+", "--"]; var __expected = ["dfe", "iu ", " =+", "--"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -20,28 +20,29 @@ var __split = __string.split(__re);
var __expected = ["dfe", "iu ", " =+", "--"]; var __expected = ["dfe", "iu ", " =+", "--"];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,29 @@ var __split = __string.split(__re);
var __expected = ["", "", "", ""]; var __expected = ["", "", "", ""];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,28 +18,29 @@ var __split = __string.split(__re);
var __expected = ["", "", "", ""]; var __expected = ["", "", "", ""];
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
__split.length,
__expected.length,
'The value of __split.length is expected to equal the value of __expected.length'
);
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__split.length !== __expected.length) {
$ERROR('#2: __split.length === __expected.length. Actual: ' + __split.length);
}
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
for (var index = 0; index < __expected.length; index++) { for (var index = 0; index < __expected.length; index++) {
if (__split[index] !== __expected[index]) { assert.sameValue(
$ERROR('#3.' + index + ': __split[' + index + '] === ' + __expected[index] + '. Actual: ' + __split[index]); __split[index],
} __expected[index],
'The value of __split[index] is expected to equal the value of __expected[index]'
);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -16,26 +16,11 @@ var __re = /l/;
var __split = __string.split(__re, 1); var __split = __string.split(__re, 1);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,1); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 1, 'The value of __split.length is 1');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 1) {
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,1); __split.length === 1. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,1); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,34 +16,12 @@ var __re = /l/;
var __split = __string.split(__re, 2); var __split = __string.split(__re, 2);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,2); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 2, 'The value of __split.length is 2');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 2) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,2); __split.length === 2. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,2); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,2); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,42 +16,13 @@ var __re = /l/;
var __split = __string.split(__re, 3); var __split = __string.split(__re, 3);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 3, 'The value of __split.length is 3');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 3) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split.length === 3. Actual: ' + __split.length); assert.sameValue(__split[2], "o", 'The value of __split[2] is "o"');
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "o") {
$ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,3); __split[2] === "o". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,42 +16,13 @@ var __re = /l/;
var __split = __string.split(__re, 4); var __split = __string.split(__re, 4);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 3, 'The value of __split.length is 3');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 3) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split.length === 3. Actual: ' + __split.length); assert.sameValue(__split[2], "o", 'The value of __split[2] is "o"');
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "o") {
$ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re,4); __split[2] === "o". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -18,42 +18,13 @@ var __re = /l/;
var __split = __string.split(__re, void 0); var __split = __string.split(__re, void 0);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 3, 'The value of __split.length is 3');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 3) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split.length === 3. Actual: ' + __split.length); assert.sameValue(__split[2], "o", 'The value of __split[2] is "o"');
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "o") {
$ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, void 0); __split[2] === "o". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -16,18 +16,10 @@ var __re = /l/;
var __split = __string.split(__re, "hi"); var __split = __string.split(__re, "hi");
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, "hi"); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 0, 'The value of __split.length is 0');
//CHECK#2
if (__split.length !== 0) {
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, "hi"); __split.length === 0. Actual: ' + __split.length);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -18,42 +18,13 @@ var __re = /l/;
var __split = __string.split(__re, undefined); var __split = __string.split(__re, undefined);
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 __split.constructor,
if (__split.constructor !== Array) { Array,
$ERROR('#1: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split.constructor === Array. Actual: ' + __split.constructor); 'The value of __split.constructor is expected to equal the value of Array'
} );
//
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// assert.sameValue(__split.length, 3, 'The value of __split.length is 3');
//CHECK#2 assert.sameValue(__split[0], "he", 'The value of __split[0] is "he"');
if (__split.length !== 3) { assert.sameValue(__split[1], "", 'The value of __split[1] is ""');
$ERROR('#2: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split.length === 3. Actual: ' + __split.length); assert.sameValue(__split[2], "o", 'The value of __split[2] is "o"');
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
if (__split[0] !== "he") {
$ERROR('#3: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split[0] === "he". Actual: ' + __split[0]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#4
if (__split[1] !== "") {
$ERROR('#4: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split[1] === "". Actual: ' + __split[1]);
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#5
if (__split[2] !== "o") {
$ERROR('#5: var __string = new String("hello"); var __re = /l/; __split = __string.split(__re, undefined); __split[2] === "o". Actual: ' + __split[2]);
}
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -7,10 +7,8 @@ es5id: 15.5.4.14_A6
description: Checking String.prototype.split.prototype description: Checking String.prototype.split.prototype
---*/ ---*/
////////////////////////////////////////////////////////////////////////////// assert.sameValue(
//CHECK#1 String.prototype.split.prototype,
if (String.prototype.split.prototype !== undefined) { undefined,
$ERROR('#1: String.prototype.split.prototype === undefined. Actual: ' + String.prototype.split.prototype); 'The value of String.prototype.split.prototype is expected to equal `undefined`'
} );
//
//////////////////////////////////////////////////////////////////////////////

View File

@ -11,7 +11,9 @@ var __FACTORY = String.prototype.split;
try { try {
var __instance = new __FACTORY; var __instance = new __FACTORY;
$ERROR('#1: __FACTORY = String.prototype.split; "__instance = new __FACTORY" lead to throwing exception'); Test262Error.thrower('#1: __FACTORY = String.prototype.split; "__instance = new __FACTORY" lead to throwing exception');
} catch (e) { } catch (e) {
if (e instanceof Test262Error) throw e; if (e instanceof Test262Error) {
throw e;
}
} }

Some files were not shown because too many files have changed in this diff Show More