harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhouke...@apache.org
Subject svn commit: r805292 - in /harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text: DateFormatSymbolsTest.java DecimalFormatSymbolsTest.java
Date Tue, 18 Aug 2009 06:52:23 GMT
Author: zhoukevin
Date: Tue Aug 18 06:52:23 2009
New Revision: 805292

URL: http://svn.apache.org/viewvc?rev=805292&view=rev
Log:
Fix 4 failure methods of DateFormatSymbolsTest

Modified:
    harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java
    harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java?rev=805292&r1=805291&r2=805292&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java
Tue Aug 18 06:52:23 2009
@@ -71,9 +71,10 @@
      * @tests java.text.DateFormatSymbols#getAvailableLocales()
      */
     public void test_getAvailableLocales_correct_provider() throws Exception {
-        URL path = new File("src/test/resources/provider/correct").toURL();
+        URL path1 = new File("src/test/resources/provider/correct").toURL();
+        URL path2 = new File("resources/provider/correct").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
-                new URL[] { path }) {
+                new URL[] { path1, path2 }) {
             @Override
             public void test() {
                 Locale[] locales = DateFormatSymbols.getAvailableLocales();
@@ -100,9 +101,10 @@
      * @tests java.text.DateFormatSymbols#getAvailableLocales()
      */
     public void test_getAvailableLocales_wrong_provider() throws Exception {
-        URL path = new File("src/test/resources/provider/wrong").toURL();
+        URL path1 = new File("src/test/resources/provider/wrong").toURL();
+        URL path2 = new File("resources/provider/wrong").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
-                new URL[] { path }) {
+                new URL[] { path1, path2 }) {
             @Override
             public void test() {
                 try {
@@ -173,9 +175,10 @@
      */
     public void test_getInstanceLjava_util_Locale_correct_provider()
             throws Exception {
-        URL path = new File("src/test/resources/provider/correct").toURL();
+        URL path1 = new File("src/test/resources/provider/correct").toURL();
+        URL path2 = new File("resources/provider/correct").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
-                new URL[] { path }) {
+                new URL[] { path1, path2 }) {
             @Override
             public void test() {
                 DateFormatSymbols symbols = DateFormatSymbols
@@ -195,14 +198,14 @@
      */
     public void test_getInstanceLjava_util_Locale_wrong_provider()
             throws Exception {
-        URL path = new File("src/test/resources/provider/wrong").toURL();
+        URL path1 = new File("src/test/resources/provider/wrong").toURL();
+        URL path2 = new File("resources/provider/wrong").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
-                new URL[] { path }) {
+                new URL[] { path1, path2 }) {
             @Override
             public void test() {
                 try {
-                    DateFormatSymbols symbols = DateFormatSymbols
-                            .getInstance(new Locale("Mock"));
+                    DateFormatSymbols.getInstance(new Locale("Mock"));
                     fail("Should throw ServiceConfigurationError");
                 } catch (ServiceConfigurationError e) {
                     // expected

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java?rev=805292&r1=805291&r2=805292&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java
Tue Aug 18 06:52:23 2009
@@ -80,9 +80,10 @@
      * @tests java.text.DecimalFormatSymbols#getAvailableLocales()
      */
     public void test_getAvailableLocales_correct_provider() throws Exception {
-        URL path = new File("resources/provider/correct").toURL();
+        URL path1 = new File("src/test/resources/provider/correct").toURL();
+        URL path2 = new File("resources/provider/correct").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
-                new URL[] { path }) {
+                new URL[] { path1, path2 }) {
             @Override
             public void test() {
                 Locale[] locales = DecimalFormatSymbols.getAvailableLocales();
@@ -109,9 +110,10 @@
      * @tests java.text.DecimalFormatSymbols#getAvailableLocales()
      */
     public void test_getAvailableLocales_wrong_provider() throws Exception {
-        URL path = new File("resources/provider/wrong").toURL();
+        URL path1 = new File("src/test/resources/provider/wrong").toURL();
+        URL path2 = new File("resources/provider/wrong").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
-                new URL[] { path }) {
+                new URL[] { path1, path2 }) {
             @Override
             public void test() {
                 try {
@@ -184,9 +186,10 @@
      */
     public void test_getInstanceLjava_util_Locale_correct_provider()
             throws Exception {
-        URL path = new File("resources/provider/correct").toURL();
+        URL path1 = new File("src/test/resources/provider/correct").toURL();
+        URL path2 = new File("resources/provider/correct").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
-                new URL[] { path }) {
+                new URL[] { path1, path2 }) {
             @Override
             public void test() {
                 DecimalFormatSymbols symbols = DecimalFormatSymbols
@@ -206,9 +209,10 @@
      */
     public void test_getInstanceLjava_util_Locale_wrong_provider()
             throws Exception {
-        URL path = new File("resources/provider/wrong").toURL();
+        URL path1 = new File("src/test/resources/provider/wrong").toURL();
+        URL path2 = new File("resources/provider/wrong").toURL();
         LoadLocaleProviderTestHelper helper = new LoadLocaleProviderTestHelper(
-                new URL[] { path }) {
+                new URL[] { path1, path2 }) {
             @Override
             public void test() {
                 try {



Mime
View raw message