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:
bclary%bclary.com
2007-05-26 00:19:49 +00:00
parent 86376b8166
commit 046573bad4
2514 changed files with 83977 additions and 75356 deletions

View File

@@ -35,6 +35,9 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
gTestfile = 'JavaObjectToString-001.js';
/* -*- Mode: java; tab-width: 8 -*-
* Copyright (C) 1997, 1998 Netscape Communications Corporation,
* All Rights Reserved.
@@ -59,7 +62,7 @@
var SECTION = "JavaObject to string";
var VERSION = "1_4";
var TITLE = "LiveConnect 3.0 JavaScript to Java Data Type Conversion " +
SECTION;
SECTION;
startTest();
var dt = new DT();
@@ -74,37 +77,37 @@ var newValue = Math.random();
var newString = String( newValue );
a[i++] = new TestObject (
"dt.PUB_STRING_REPRESENTATION = \""+newString+"\";" +
"dt.setStringObject( dt )",
"dt.PUB_STRING +''",
"dt.getStringObject() +''",
"typeof dt.getStringObject()",
newString,
"string" );
"dt.PUB_STRING_REPRESENTATION = \""+newString+"\";" +
"dt.setStringObject( dt )",
"dt.PUB_STRING +''",
"dt.getStringObject() +''",
"typeof dt.getStringObject()",
newString,
"string" );
a[i++] = new TestObject (
"dt.PUB_DOUBLE = java.lang.Double.valueOf(\"" + newString +"\")",
"dt.PUB_DOUBLE",
"dt.getDouble()",
"typeof dt.getDouble()",
newValue,
"number" );
"dt.PUB_DOUBLE = java.lang.Double.valueOf(\"" + newString +"\")",
"dt.PUB_DOUBLE",
"dt.getDouble()",
"typeof dt.getDouble()",
newValue,
"number" );
for ( i = 0; i < a.length; i++ ) {
new TestCase(
a[i].description +"; "+ a[i].javaFieldName,
a[i].jsValue,
a[i].javaFieldValue );
new TestCase(
a[i].description +"; "+ a[i].javaFieldName,
a[i].jsValue,
a[i].javaFieldValue );
new TestCase(
a[i].description +"; " + a[i].javaMethodName,
a[i].jsValue,
a[i].javaMethodValue );
new TestCase(
a[i].description +"; " + a[i].javaMethodName,
a[i].jsValue,
a[i].javaMethodValue );
new TestCase(
a[i].javaTypeName,
a[i].jsType,
a[i].javaTypeValue );
new TestCase(
a[i].javaTypeName,
a[i].jsType,
a[i].javaTypeValue );
}
@@ -113,16 +116,16 @@ test();
function TestObject( description, javaField, javaMethod, javaType,
jsValue, jsType )
{
eval (description );
eval (description );
this.description = description;
this.javaFieldName = javaField;
this.javaFieldValue = eval( javaField );
this.javaMethodName = javaMethod;
this.javaMethodValue = eval( javaMethod );
this.javaTypeName = javaType,
this.javaTypeValue = typeof this.javaFieldValue;
this.description = description;
this.javaFieldName = javaField;
this.javaFieldValue = eval( javaField );
this.javaMethodName = javaMethod;
this.javaMethodValue = eval( javaMethod );
this.javaTypeName = javaType,
this.javaTypeValue = typeof this.javaFieldValue;
this.jsValue = jsValue;
this.jsType = jsType;
this.jsValue = jsValue;
this.jsType = jsType;
}