Generated adjusted tests

This commit is contained in:
Mark Miller 2011-09-23 17:42:36 -07:00
parent ea9a2f4c4c
commit 176f5f8542
365 changed files with 1689 additions and 436 deletions

View File

@ -11,6 +11,6 @@
* @negative
*/
"use strict";
var interface = 1;

View File

@ -10,6 +10,6 @@
* @negative
*/
"use strict";
var package = 1;

View File

@ -10,6 +10,6 @@
* @negative
*/
"use strict";
var private = 1;

View File

@ -11,6 +11,6 @@
* @negative
*/
"use strict";
var protected = 1;

View File

@ -10,6 +10,6 @@
* @negative
*/
"use strict";
var public = 1;

View File

@ -10,6 +10,6 @@
* @negative
*/
"use strict";
var static = 1;

View File

@ -10,7 +10,7 @@
* @negative SyntaxError
*/
"use strict";
{
function __func(){}
}

View File

@ -10,7 +10,7 @@
* @negative SyntaxError
*/
"use strict";
if (true) {
function __func(){};
} else {

View File

@ -6,6 +6,7 @@
*
* @path 12_Statement/12.5_The_if_Statement/S12.5_A9_T2.js
* @description Declaring function within an "if" that is declared within the strict function
* @strictOnly
* @negative SyntaxError
*/

View File

@ -10,7 +10,7 @@
* @negative SyntaxError
*/
"use strict";
do{
function __func(){};
} while(0);

View File

@ -6,6 +6,7 @@
*
* @path 12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T2.js
* @description Declaring a function within a "do-while" loop that is within a strict function
* @strictOnly
* @negative SyntaxError
*/

View File

@ -6,6 +6,7 @@
*
* @path 15_Native/15.4_Array_Objects/15.4.4_Properties_of_the_Array_Prototype_Object/15.4.4.11_Array_prototype_sort/S15.4.4.11_A8.js
* @description comparefn tests that its this value is undefined
* @strictOnly
*/
var global = this;

View File

@ -6,6 +6,7 @@
*
* @path 15_Native/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.11_String.prototype.replace/S15.5.4.11_A12.js
* @description replaceValue tests that its this value is undefined
* @strictOnly
*/
var global = this;

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
var implements = 1;

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
var y = 010;

View File

@ -7,5 +7,5 @@
* @negative .
*/
"use strict";
b = 11;

View File

@ -7,6 +7,6 @@
* @negative NotEarlyErrorString
*/
"use strict";
throw NotEarlyError;
b = 11;

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
var public = 1;

View File

@ -7,7 +7,7 @@
* @negative EarlyErrorRePat
*/
"use strict";
"use strict";
throw NotEarlyError;
var public = 1;

View File

@ -7,7 +7,7 @@
* @negative EarlyErrorRePat
*/
"use strict";
eval("var x = 7;");
x = 9;
throw NotEarlyError;

View File

@ -24,7 +24,7 @@
* @strictOnly
*/
"use strict";
function f() {
return typeof this;
}

View File

@ -7,7 +7,7 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
function f_10_5_1_gs(){

View File

@ -6,7 +6,7 @@
* @strictOnly
*/
"use strict";
function f_10_6_1_gs(){
return arguments.callee;
}

View File

@ -7,7 +7,7 @@
* @negative .
*/
"use strict";
function f_10_6_1_gs(){
return arguments.callee;
}

View File

@ -6,7 +6,7 @@
* @strictOnly
*/
"use strict";
if (this===undefined) {
throw NotEarlyError;
}

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
eval *= 20;

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
arguments++;

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
--arguments;

View File

@ -24,4 +24,7 @@
*/
assertTruthy(+"" === 0);
function testcase() {
return +"" === 0;
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(-"" === 0);
function testcase() {
return -"" === 0;
}
runTestCase(testcase);

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
with ({}) { }

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
try { } catch (eval) { }

View File

@ -7,6 +7,6 @@
* @negative NotEarlyErrorString
*/
"use strict";
var _13_4_17_fun = new Function('eval = 42;');
throw NotEarlyError;

View File

@ -7,6 +7,6 @@
* @negative EarlyErrorRePat
*/
"use strict";
throw NotEarlyError;
function _13_0_4_5_fun() { eval = 42; };

View File

@ -24,4 +24,7 @@
*/
assertTruthy(isNaN(parseInt("")) && parseInt("") !== parseInt(""));
function testcase() {
return isNaN(parseInt("")) && parseInt("") !== parseInt("");
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(isNaN(parseFloat("")) && parseFloat("") !== parseFloat(""));
function testcase() {
return isNaN(parseFloat("")) && parseFloat("") !== parseFloat("");
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy((typeof(RegExp.prototype.source)) === 'string');
function testcase() {
return (typeof(RegExp.prototype.source)) === 'string';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy((typeof(RegExp.prototype.global)) === 'boolean');
function testcase() {
return (typeof(RegExp.prototype.global)) === 'boolean';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy((typeof(RegExp.prototype.ignoreCase)) === 'boolean');
function testcase() {
return (typeof(RegExp.prototype.ignoreCase)) === 'boolean';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy((typeof(RegExp.prototype.multiline)) === 'boolean');
function testcase() {
return (typeof(RegExp.prototype.multiline)) === 'boolean';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy((typeof(RegExp.prototype.lastIndex)) === 'number');
function testcase() {
return (typeof(RegExp.prototype.lastIndex)) === 'number';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(typeof ConversionError === "undefined");
function testcase() {
return typeof ConversionError === "undefined";
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(typeof RegExpError === "undefined");
function testcase() {
return typeof RegExpError === "undefined";
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('"abc"')==="abc");
function testcase() {
return JSON.parse('"abc"')==="abc";
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('""')==="");
function testcase() {
return JSON.parse('""')==="";
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
assertTruthy(JSON.parse('"\\u0058"')==='X');
function testcase() {
return JSON.parse('"\\u0058"')==='X';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('"\\/"')==='/');
function testcase() {
return JSON.parse('"\\/"')==='/';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('"\\\\"')==='\\');
function testcase() {
return JSON.parse('"\\\\"')==='\\';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('"\\b"')==='\b');
function testcase() {
return JSON.parse('"\\b"')==='\b';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('"\\f"')==='\f');
function testcase() {
return JSON.parse('"\\f"')==='\f';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('"\\n"')==='\n');
function testcase() {
return JSON.parse('"\\n"')==='\n';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('"\\r"')==='\r');
function testcase() {
return JSON.parse('"\\r"')==='\r';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.parse('"\\t"')==='\t');
function testcase() {
return JSON.parse('"\\t"')==='\t';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(undefined) === undefined);
function testcase() {
return JSON.stringify(undefined) === undefined;
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(42, function(k, v) { return undefined }) === undefined);
function testcase() {
return JSON.stringify(42, function(k, v) { return undefined }) === undefined;
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify({prop:1}, function(k, v) { return undefined }) === undefined);
function testcase() {
return JSON.stringify({prop:1}, function(k, v) { return undefined }) === undefined;
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }) === '[4,2]');
function testcase() {
return JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }) === '[4,2]';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}) === '{"forty":2}');
function testcase() {
return JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}) === '{"forty":2}';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(function() {}) === undefined);
function testcase() {
return JSON.stringify(function() {}) === undefined;
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(function() {}, function(k,v) {return 99}) === '99');
function testcase() {
return JSON.stringify(function() {}, function(k,v) {return 99}) === '99';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(undefined, function(k, v) { return "replacement" }) === '"replacement"');
function testcase() {
return JSON.stringify(undefined, function(k, v) { return "replacement" }) === '"replacement"';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify("a string") === '"a string"');
function testcase() {
return JSON.stringify("a string") === '"a string"';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(123) === '123');
function testcase() {
return JSON.stringify(123) === '123';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(true) === 'true');
function testcase() {
return JSON.stringify(true) === 'true';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(null) === 'null');
function testcase() {
return JSON.stringify(null) === 'null';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(new Number(42)) === '42');
function testcase() {
return JSON.stringify(new Number(42)) === '42';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(new String('wrappered')) === '"wrappered"');
function testcase() {
return JSON.stringify(new String('wrappered')) === '"wrappered"';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify(new Boolean(false)) === 'false');
function testcase() {
return JSON.stringify(new Boolean(false)) === 'false';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}) === '["fortytwo"]');
function testcase() {
return JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}) === '["fortytwo"]';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}) === '[84]');
function testcase() {
return JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}) === '[84]';
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}) === '[false]');
function testcase() {
return JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}) === '[false]';
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.preventExtensions.length === 1);
function testcase() {
if (Object.preventExtensions.length === 1) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.isSealed.length === 1);
function testcase() {
if (Object.isSealed.length === 1) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.isFrozen.length === 1);
function testcase() {
if (Object.isFrozen.length === 1) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,7 @@
*/
assertTruthy(!Object.isFrozen({}));
function testcase() {
return !Object.isFrozen({});
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.isExtensible.length === 1);
function testcase() {
if (Object.isExtensible.length === 1) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.isExtensible(fnGlobalObject()));
function testcase() {
return Object.isExtensible(fnGlobalObject());
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.keys.length === 1);
function testcase() {
if (Object.keys.length === 1) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(typeof(Object.getPrototypeOf) === "function");
function testcase() {
if (typeof(Object.getPrototypeOf) === "function") {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf.length === 1);
function testcase() {
if (Object.getPrototypeOf.length === 1) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(Boolean) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(Boolean) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(RegExp) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(RegExp) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(Error) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(Error) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(EvalError) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(EvalError) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(RangeError) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(RangeError) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(ReferenceError) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(ReferenceError) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(SyntaxError) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(SyntaxError) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(TypeError) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(TypeError) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(URIError) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(URIError) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(JSON) === Object.prototype);
function testcase() {
if (Object.getPrototypeOf(JSON) === Object.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(Object) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(Object) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,8 @@
*/
assertTruthy((Object.getPrototypeOf(Object.prototype) === null));
function testcase() {
return (Object.getPrototypeOf(Object.prototype) === null);
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(Function) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(Function) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(Array) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(Array) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(String) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(String) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(Number) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(Number) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(Math) === Object.prototype);
function testcase() {
if (Object.getPrototypeOf(Math) === Object.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getPrototypeOf(Date) === Function.prototype);
function testcase() {
if (Object.getPrototypeOf(Date) === Function.prototype) {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(typeof(Object.getOwnPropertyDescriptor) === "function");
function testcase() {
if (typeof(Object.getOwnPropertyDescriptor) === "function") {
return true;
}
}
runTestCase(testcase);

View File

@ -24,4 +24,9 @@
*/
assertTruthy(Object.getOwnPropertyDescriptor.length === 2);
function testcase() {
if (Object.getOwnPropertyDescriptor.length === 2) {
return true;
}
}
runTestCase(testcase);

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