harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-1808) [classlib][luni] tests.api.java.util.ResourceBundleTest has incorrect assertion
Date Wed, 20 Dec 2006 09:24:23 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1808?page=all ]

Mikhail Markov updated HARMONY-1808:
------------------------------------

    Attachment: ResourceBundleTest.patch

1) The mention test is passed
2) There is no errror in tests logic. There are 2 hyts_resources.properties files:
1-st is located at tests/resources, 2-nd - at tests/resources/subfolder/tests/resources containing
different values: "parent" & "resource" respectively.
The test reads the first resource bundle ("parent" value should be returned) and after that
reads the second one (using specially configured URLClassLoader) checking that the returned
value is "resource" and thus not cached from the first call.

But just in case i've added additional assertion after the 1st read to verify that the "parent"
value was read.

Find the patch attached, but its applying is optional as it does not modify test's logic :-)


> [classlib][luni] tests.api.java.util.ResourceBundleTest has incorrect assertion
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-1808
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1808
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Maxim Makarov
>         Attachments: patch.txt, ResourceBundleTest.patch
>
>
> HUT tests.api.java.util.ResourceBundleTest.test_getBundleLjava_lang_StringLjava_util_LocaleLjava_lang_ClassLoader
test fails beacuse has incorrect assertion at line #125 as the pair "key=value" into hyts_resource.properties
file looks: 
> $cat hyts_resource.properties
> property=parent
> $cat -n tests/api/java/util/ResourceBundleTest
> ...
>    120                  String name = Support_Resources.RESOURCE_PACKAGE_NAME
>    121                                  + ".hyts_resource";
>    122                  ResourceBundle bundle = ResourceBundle.getBundle(name, Locale
>    123                                  .getDefault());
>    124                  bundle = ResourceBundle.getBundle(name, Locale.getDefault(),
loader);
>    125                  assertEquals("Wrong cached value",
>    126                                  "resource", bundle.getString("property"));
> ...
> Suggesion fix: plz, see patch

-- 
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

        

Mime
View raw message