JavaScript Tests - standardize test reporting for shell and browser, bug 380257
git-svn-id: svn://10.0.0.236/trunk@227049 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
gTestfile = 'integer-001.js';
|
||||
|
||||
/**
|
||||
Template for LiveConnect Tests
|
||||
|
||||
@@ -113,12 +115,12 @@ a[i++] = new TestObject( "new java.lang.Integer( Number(5.5) )",
|
||||
|
||||
for ( var i = 0; i < a.length; i++ ) {
|
||||
|
||||
// check typeof
|
||||
new TestCase(
|
||||
SECTION,
|
||||
"typeof (" + a[i].description +")",
|
||||
a[i].type,
|
||||
typeof a[i].javavalue );
|
||||
// check typeof
|
||||
new TestCase(
|
||||
SECTION,
|
||||
"typeof (" + a[i].description +")",
|
||||
a[i].type,
|
||||
typeof a[i].javavalue );
|
||||
/*
|
||||
// check the js class
|
||||
new TestCase(
|
||||
@@ -127,23 +129,23 @@ SECTION,
|
||||
E_JSCLASS,
|
||||
a[i].jsclass );
|
||||
*/
|
||||
// check the number value of the object
|
||||
new TestCase(
|
||||
SECTION,
|
||||
"Number(" + a[i].description +")",
|
||||
a[i].jsvalue,
|
||||
Number( a[i].javavalue ) );
|
||||
// check the number value of the object
|
||||
new TestCase(
|
||||
SECTION,
|
||||
"Number(" + a[i].description +")",
|
||||
a[i].jsvalue,
|
||||
Number( a[i].javavalue ) );
|
||||
}
|
||||
|
||||
test();
|
||||
|
||||
function TestObject( description, javavalue, jsvalue ) {
|
||||
this.description = description;
|
||||
this.javavalue = javavalue;
|
||||
this.jsvalue = jsvalue;
|
||||
this.type = E_TYPE;
|
||||
this.description = description;
|
||||
this.javavalue = javavalue;
|
||||
this.jsvalue = jsvalue;
|
||||
this.type = E_TYPE;
|
||||
// LC2 does not support the proto property in Java objects
|
||||
// this.javavalue.__proto__.getJSClass = Object.prototype.toString;
|
||||
// this.jsclass = this.javavalue.getJSClass();
|
||||
return this;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user