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 = 'JavaObjectToByte-005.js';
/* -*- Mode: java; tab-width: 8 -*-
* Copyright (C) 1997, 1998 Netscape Communications Corporation,
* All Rights Reserved.
@@ -59,7 +62,7 @@
var SECTION = "JavaObject to byte";
var VERSION = "1_4";
var TITLE = "LiveConnect 3.0 JavaScript to Java Data Type Conversion " +
SECTION;
SECTION;
startTest();
var dt = new DT();
@@ -79,29 +82,29 @@ var i = 0;
var newValue = Math.random();
a[i++] = new TestObject (
"dt.PUB_DOUBLE_REPRESENTATION = 127.6;"+
"dt.setByte( dt )",
"dt.PUB_BYTE",
"dt.getByte()",
"typeof dt.getByte()",
127,
"number" );
"dt.PUB_DOUBLE_REPRESENTATION = 127.6;"+
"dt.setByte( dt )",
"dt.PUB_BYTE",
"dt.getByte()",
"typeof dt.getByte()",
127,
"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 );
}
@@ -110,16 +113,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;
}