-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2.2
-
x86
-
windows_nt
Name: akC57697 Date: 09/24/98
The JCK test api\javax_swing\SizeRequirements\manual.html#Ctor fails
with JIT and always passes without JIT. The java is JDK1.2 FCS build K.
Unfortunatelly this bug reproduced only in JCK run , minimal test
passes correctly. The JCK test code is equal to example below.
The example:
--------------------------------8-<---------------------------
import javax.swing.SizeRequirements;
class Test {
public static void main(String[] argv) {
int intTests[]={0,10,1000,Integer.MAX_VALUE};
float floatTests[]={0.0f ,0.25f, 0.75f, 1.0f};
for(int i=0;i<floatTests.length;i++)
for(int i1=0;i<intTests.length;i++)
for(int i2=0;i<intTests.length;i++)
for(int i3=0;i<intTests.length;i++)
try {
SizeRequirements c =
new SizeRequirements(intTests[i1],intTests[i2],
intTests[i3],floatTests[i]);
if(!(
c != null // Test not null
&&
c instanceof SizeRequirements // Test instance
&&
c.minimum==intTests[i1]
&&
c.maximum==intTests[i3]
&&
c.preferred==intTests[i2]
&&
c.alignment==floatTests[i]
)) { // Test variable setting
System.out.println("c != null"+(c != null) );
System.out.println("c instanceof SizeRequirements"+(c instanceof SizeRequirements) );
System.out.println("c.minimum==intTests[i1]"+(c.minimum==intTests[i1]) );
System.out.println("c.maximum==intTests[i3]"+(c.maximum==intTests[i3]) );
System.out.println("c.preferred==intTests[i2]"+(c.preferred==intTests[i2]) );
System.out.println("c.alignment==floatTests[i]"+(c.alignment==floatTests[i]) );
}
} catch(Throwable e) { // Test no exceptions thrown
System.out.println( "Unexpected "+e+" thrown" );
return;
}
System.out.println("OKAY");
return;
}
}
--------------------------------8-<---------------------------
JCK runs result files:
JIT:
#Test Results
#Wed Sep 24 13:02:43 GMT 1997
testsuite=H:\\jck12-b-int\\tests
source=CtorTests.java
executeClass=javasoft.sqe.tests.api.javax.swing.SizeRequirements.CtorTests
title=SizeRequirements constructor tests
status=Failed. tests: 2; passed: 1; failed: 1; first test case failure: SizeRequirements2002
work=C:\\TEMP\\api\\javax_swing\\SizeRequirements
execStatus=Failed. tests: 2; passed: 1; failed: 1; first test case failure: SizeRequirements2002
description=file:H:/jck12-b-int/tests/api/javax_swing/SizeRequirements/manual.html#Ctor
id=Ctor
javatestVersion=JT_2.0_zd
sections=refCompile.java refCompile.java testExecute testExecute
file=H:\\jck12-b-int\\tests\\api\\javax_swing\\SizeRequirements\\manual.html
end=Wed Sep 24 13:02:43 GMT 1997
start=Wed Sep 24 13:02:27 GMT 1997
keywords=runtime positive javax swing
environment=jck-compiler-otherJVM-winNT
executeArgs=-TestCaseID ALL
test: api\javax_swing\SizeRequirements\manual.html#Ctor
script: javasoft.sqe.javatest.lib.JCKScript -developer -runtime
Precompiling source files...
command: javasoft.sqe.javatest.lib.ProcessCommand CLASSPATH=C:\TEMP\classes;H:\javatest20-zd\javatest.jar;H:\javatest20-zd\classes;/set/java-sqe/javatest20/classes G:\JDK1.2-fcsK\windows\bin\javac -J-Djava.compiler=NONE -d C:\TEMP\classes -nowarn H:\jck12-b-int\tests\api\javax_swing\SizeRequirements\CtorTests.java
----------ref:refCompile.java(0/0)----------
----------log:refCompile.java(0/0)----------
command result: Passed. exit code 0
Executing test class...
command: javasoft.sqe.javatest.lib.ExecJCKTestOtherJVMCmd CLASSPATH=C:\TEMP\classes;H:\jck12-b-int\tests\..\classes;H:\javatest20-zd\javatest.jar;H:\javatest20-zd\classes PATH=PATH_NOT_DEFINED SystemRoot=c:\WINNT G:\JDK1.2-fcsK\windows\bin\java -verify javasoft.sqe.tests.api.javax.swing.SizeRequirements.CtorTests -TestCaseID ALL
----------ref:testExecute(2/134)----------
====== SizeRequirements2001 ====== constructor SizeRequirements()
====== SizeRequirements2002 ====== constructor SizeRequirements()
----------log:testExecute(3/202)----------
SizeRequirements2001: Passed. OKAY
SizeRequirements2002: Failed. Failed to create SizeRequirements object
STATUS:Failed. tests: 2; passed: 1; failed: 1; first test case failure: SizeRequirements2002
command result: Failed. tests: 2; passed: 1; failed: 1; first test case failure: SizeRequirements2002
test result: Failed. tests: 2; passed: 1; failed: 1; first test case failure: SizeRequirements2002
NO JIT:
#Test Results
#Wed Sep 24 13:06:10 GMT 1997
testsuite=H:\\jck12-b-int\\tests
source=CtorTests.java
executeClass=javasoft.sqe.tests.api.javax.swing.SizeRequirements.CtorTests
title=SizeRequirements constructor tests
status=Passed. tests: 2; passed: 2
work=C:\\TEMP\\api\\javax_swing\\SizeRequirements
execStatus=Passed. tests: 2; passed: 2
description=file:H:/jck12-b-int/tests/api/javax_swing/SizeRequirements/manual.html#Ctor
id=Ctor
javatestVersion=JT_2.0_zd
sections=refCompile.java refCompile.java testExecute testExecute
file=H:\\jck12-b-int\\tests\\api\\javax_swing\\SizeRequirements\\manual.html
end=Wed Sep 24 13:06:10 GMT 1997
start=Wed Sep 24 13:05:53 GMT 1997
keywords=runtime positive javax swing
environment=jck-compiler-otherJVM-winNT
executeArgs=-TestCaseID ALL
test: api\javax_swing\SizeRequirements\manual.html#Ctor
script: javasoft.sqe.javatest.lib.JCKScript -developer -runtime
Precompiling source files...
command: javasoft.sqe.javatest.lib.ProcessCommand CLASSPATH=C:\TEMP\classes;H:\javatest20-zd\javatest.jar;H:\javatest20-zd\classes;/set/java-sqe/javatest20/classes G:\JDK1.2-fcsK\windows\bin\javac -J-Djava.compiler=NONE -d C:\TEMP\classes -nowarn H:\jck12-b-int\tests\api\javax_swing\SizeRequirements\CtorTests.java
----------ref:refCompile.java(0/0)----------
----------log:refCompile.java(0/0)----------
command result: Passed. exit code 0
Executing test class...
command: javasoft.sqe.javatest.lib.ExecJCKTestOtherJVMCmd CLASSPATH=C:\TEMP\classes;H:\jck12-b-int\tests\..\classes;H:\javatest20-zd\javatest.jar;H:\javatest20-zd\classes PATH=PATH_NOT_DEFINED SystemRoot=c:\WINNT G:\JDK1.2-fcsK\windows\bin\java -Djava.compiler=NONE -verify javasoft.sqe.tests.api.javax.swing.SizeRequirements.CtorTests -TestCaseID ALL
----------ref:testExecute(2/134)----------
====== SizeRequirements2001 ====== constructor SizeRequirements()
====== SizeRequirements2002 ====== constructor SizeRequirements()
----------log:testExecute(3/108)----------
SizeRequirements2001: Passed. OKAY
SizeRequirements2002: Passed. OKAY
STATUS:Passed. tests: 2; passed: 2
command result: Passed. tests: 2; passed: 2
test result: Passed. tests: 2; passed: 2
======================================================================