Mozilla/mozilla/js/tests/ecma_2/instanceof/instanceof-002.js
cbegle%netscape.com a910491319 Add regression test for http://bugzilla.mozilla.org/show_bug.cgi?id=7635.
Rename files for consistency.

These files are not part of the client.


git-svn-id: svn://10.0.0.236/trunk@35753 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-17 00:20:04 +00:00

62 lines
1.9 KiB
JavaScript

/**
File Name:
ECMA Section:
Description: Call Objects
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "";
var VERSION = "ECMA_2";
var TITLE = "The Call Constructor";
startTest();
writeHeaderToLog( SECTION + " "+ TITLE);
var tc = 0;
var testcases = new Array();
var b = new Boolean();
testcases[tc++] = new TestCase( SECTION,
"var b = new Boolean(); b instanceof Boolean",
true,
b instanceof Boolean );
testcases[tc++] = new TestCase( SECTION,
"b instanceof Object",
true,
b instanceof Object );
testcases[tc++] = new TestCase( SECTION,
"b instanceof Array",
false,
b instanceof Array );
testcases[tc++] = new TestCase( SECTION,
"true instanceof Boolean",
false,
true instanceof Boolean );
testcases[tc++] = new TestCase( SECTION,
"Boolean instanceof Object",
true,
Boolean instanceof Object );
test();
function test() {
for ( tc=0; tc < testcases.length; tc++ ) {
testcases[tc].passed = writeTestCaseResult(
testcases[tc].expect,
testcases[tc].actual,
testcases[tc].description +" = "+
testcases[tc].actual );
testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
}
stopTest();
return ( testcases );
}