You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Emanuel Pordes <em...@invera.com> on 2004/07/09 15:45:37 UTC

Forms block EnumSelectionListTestCase failure on IBM 1.4.1_02 JDK on linux

Hi,

I believe that I have discovered a flaw in the EnumSelectionListTestCase of
the forms block.
The test seems to rely on the ordering of the java.lang.reflect.Field
instances returned by Sex.class.getDeclaredFields().
The order in which these fields are returned differs between the Sun
1.4.2_05 and IBM 1.4.1-2 JDKs, and therefore the test always fails when run
on the IBM JDK.

The output of the test follows.

Thanks,

Emanuel Pordes

-------------------------TEST CASE OUTPUT --------------------------------

Running org.apache.cocoon.forms.datatype.EnumSelectionListTestCase
Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 2.447 sec
Testsuite: org.apache.cocoon.forms.datatype.EnumSelectionListTestCase
Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 2.447 sec
------------- Standard Output ---------------
INFO    2004-07-09 09:34:58.505 [EnumSelectionListTestCase     ] (): Test
Cases:
 Cocoon Forms Enum Selection List
------------- ---------------- ---------------
Testcase: testGenerateSaxFragment took 0.561 sec
        FAILED
Test if output is what is expected, org.custommonkey.xmlunit.Diff
[different] Expected attribute value
'org.apache.cocoon.forms.datatype.Sex.MALE'
 but was 'org.apache.cocoon.forms.datatype.Sex.FEMALE' - comparing <fi:item
valu
e="org.apache.cocoon.forms.datatype.Sex.MALE"...> to <fi:item
value="org.apache.
cocoon.forms.datatype.Sex.FEMALE"...>
junit.framework.AssertionFailedError: Test if output is what is expected,
org.cu
stommonkey.xmlunit.Diff
[different] Expected attribute value
'org.apache.cocoon.forms.datatype.Sex.MALE'
 but was 'org.apache.cocoon.forms.datatype.Sex.FEMALE' - comparing <fi:item
valu
e="org.apache.cocoon.forms.datatype.Sex.MALE"...> to <fi:item
value="org.apache.
cocoon.forms.datatype.Sex.FEMALE"...>
        at
org.apache.cocoon.forms.datatype.EnumSelectionListTestCase.assertEqua
l(EnumSelectionListTestCase.java:130)
        at
org.apache.cocoon.forms.datatype.EnumSelectionListTestCase.testGenera
teSaxFragment(EnumSelectionListTestCase.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:79)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:41)
        at
org.apache.avalon.excalibur.testcase.ExcaliburTestCase.run(ExcaliburT
estCase.java:413)
Testcase: testGenerateSaxFragmentNullable took 0.036 sec
        FAILED
Test if output is what is expected, org.custommonkey.xmlunit.Diff
[different] Expected attribute value
'org.apache.cocoon.forms.datatype.Sex.MALE'
 but was 'org.apache.cocoon.forms.datatype.Sex.FEMALE' - comparing <fi:item
valu
e="org.apache.cocoon.forms.datatype.Sex.MALE"...> to <fi:item
value="org.apache.
cocoon.forms.datatype.Sex.FEMALE"...>
junit.framework.AssertionFailedError: Test if output is what is expected,
org.cu
stommonkey.xmlunit.Diff
[different] Expected attribute value
'org.apache.cocoon.forms.datatype.Sex.MALE'
 but was 'org.apache.cocoon.forms.datatype.Sex.FEMALE' - comparing <fi:item
valu
e="org.apache.cocoon.forms.datatype.Sex.MALE"...> to <fi:item
value="org.apache.
cocoon.forms.datatype.Sex.FEMALE"...>
        at
org.apache.cocoon.forms.datatype.EnumSelectionListTestCase.assertEqua
l(EnumSelectionListTestCase.java:130)
        at
org.apache.cocoon.forms.datatype.EnumSelectionListTestCase.testGenera
teSaxFragmentNullable(EnumSelectionListTestCase.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:79)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:41)
        at
org.apache.avalon.excalibur.testcase.ExcaliburTestCase.run(ExcaliburT
estCase.java:413)



****************************************************************************

This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations. Any distribution, use or copying
of this e-mail or the information it contains by other than an intended
recipient is unauthorized. If you received this e-mail in error, please
advise me (by return e-mail or otherwise) immediately. 

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux
droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou
copie de ce message ou des renseignements qu'il contient par une personne
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez
ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de
courriel ou par un autre moyen.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org