You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Anonymous (JIRA)" <ji...@apache.org> on 2006/10/10 07:40:20 UTC

[jira] Updated: (HARMONY-1782) javax.swing.table.JTableHeader() creates object with component number different from RI

     [ http://issues.apache.org/jira/browse/HARMONY-1782?page=all ]


    Attachment: patch1782_1

> javax.swing.table.JTableHeader() creates object with component number different from RI
> ---------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1782
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1782
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vera Aristova
>            Priority: Minor
>         Attachments: patch1782_1
>
>
> javax.swing.table.JTableHeader() creates object with component number different from RI.
> The same issue is for javax.swing.JTabel() and javax.swing.JFileChooser().
> It's a compatibility bug.
> test for reproducing:
> import junit.framework.TestCase;
> import javax.swing.table.JTableHeader;
> import javax.swing.JFileChooser;
> import javax.swing.JTable;
> public class test extends TestCase {
> public void testJTableHeader_GetComponentCount() {
> 	JTableHeader JTH = new JTableHeader();
> 	assertEquals(1,JTH.getComponentCount());
> 	}
> public void testJTable_GetComponentCount() 
> {
> 	JTable JT = new JTable();
> 	assertEquals(1,JT.getComponentCount());
> }
> public void testJFileChooser_GetComponentCount() 
> {
> 	JFileChooser JFC = new JFileChooser ();
> 	assertEquals(4,JFC.getComponentCount());
> }
> }
> OUTPUT:
> HARMONY
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundatio
> n or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r453981, (Oct  9 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> .F.F.F
> Time: 2.594
> There were 3 failures:
> 1) testJTableHeader_GetComponentCount(test)junit.framework.AssertionFailedError:
>  expected:<1> but was:<0>
>         at test.testJTableHeader_GetComponentCount(test.java:9)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 2) testJTable_GetComponentCount(test)junit.framework.AssertionFailedError: expec
> ted:<1> but was:<0>
>         at test.testJTable_GetComponentCount(test.java:14)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 3) testJFileChooser_GetComponentCount(test)junit.framework.AssertionFailedError:
>  expected:<4> but was:<3>
>         at test.testJFileChooser_GetComponentCount(test.java:19)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 3,  Failures: 3,  Errors: 0
> ------------------------------------------------------------------------
> SUN
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> ...
> Time: 2.39
> OK (3 tests)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira