harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Krivenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1782) [classlib][swing] javax.swing.table.JTableHeader() creates object with component number different from RI
Date Wed, 24 Jan 2007 11:51:49 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-1782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467004
] 

Sergey Krivenko commented on HARMONY-1782:
------------------------------------------

Harmony output looks more reasonable to me as Container doesn't count itself.

> [classlib][swing] javax.swing.table.JTableHeader() creates object with component number
different from RI
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1782
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1782
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vera Aristova
>            Priority: Minor
>         Attachments: patch1782_1, patch1782_1, patch1782_2, patch1782_2, patch1782_3,
patch1782_3
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message