sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1392000 - in /sis/trunk/sis-utility/src/test/java/org/apache/sis/util: ./ logging/ resources/ type/
Date Sun, 30 Sep 2012 11:34:27 GMT
Author: desruisseaux
Date: Sun Sep 30 11:34:26 2012
New Revision: 1392000

URL: http://svn.apache.org/viewvc?rev=1392000&view=rev
Log:
Apply the SIS test runner on sis-utility tests.

Modified:
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/type/TypesTest.java

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java?rev=1392000&r1=1391999&r2=1392000&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java Sun Sep 30 11:34:26
2012
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.util;
 
+import org.apache.sis.test.TestCase;
+
 import org.junit.*;
 import static org.junit.Assert.*;
 
@@ -29,7 +31,7 @@ import static org.junit.Assert.*;
  * @version 0.3
  * @module
  */
-public final strictfp class ArraysTest {
+public final strictfp class ArraysTest extends TestCase {
     /**
      * Tests {@link Arrays#removeDuplicated(Object[])}.
      */

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java?rev=1392000&r1=1391999&r2=1392000&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java Sun Sep
30 11:34:26 2012
@@ -17,6 +17,10 @@
 package org.apache.sis.util;
 
 import java.util.Arrays;
+import org.apache.sis.test.TestCase;
+import org.apache.sis.test.Dependency;
+import org.apache.sis.util.type.SimpleInternationalString;
+
 import org.junit.*;
 import static org.junit.Assert.*;
 import static org.apache.sis.util.CharSequences.*;
@@ -31,7 +35,7 @@ import static org.apache.sis.util.CharSe
  * @version 0.3
  * @module
  */
-public final strictfp class CharSequencesTest {
+public final strictfp class CharSequencesTest extends TestCase {
     /**
      * Tests {@link CharSequences#spaces(int)}.
      */
@@ -77,7 +81,7 @@ public final strictfp class CharSequence
                 case 0:  /* Test directly on the String instance. */              break;
                 case 1:  string = new StringBuilder            ((String) string); break;
                 case 2:  string = new StringBuffer             ((String) string); break;
-// TODO         case 3:  string = new SimpleInternationalString((String) string); break;
+                case 3:  string = new SimpleInternationalString((String) string); break;
                 default: throw new AssertionError(i);
             }
             assertEquals(-1, indexOf(string, "dummy",        0));
@@ -127,6 +131,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseDoubles(CharSequence, char)}.
      */
     @Test
+    @Dependency("testSplit")
     public void testParseDoubles() {
         assertArrayEquals(new double[] {5, 1.5, Double.NaN, -8}, parseDoubles("5 , 1.5,,
-8 ", ','), 0.0);
     }
@@ -135,6 +140,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseFloats(CharSequence, char)}.
      */
     @Test
+    @Dependency("testSplit")
     public void testParseFloats() {
         assertArrayEquals(new float[] {5, 1.5f, Float.NaN, -8}, parseFloats("5 , 1.5,, -8
", ','), 0f);
     }
@@ -143,6 +149,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseLongs(CharSequence, char, int)}.
      */
     @Test
+    @Dependency("testSplit")
     public void testParseLongs() {
         assertArrayEquals(new long[] {5, 2, -8}, parseLongs("5 , 2, -8 ", ',', 10));
     }
@@ -151,6 +158,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseInts(CharSequence, char, int)}.
      */
     @Test
+    @Dependency("testSplit")
     public void testParseInts() {
         assertArrayEquals(new int[] {5, 2, -8}, parseInts("5 , 2, -8 ", ',', 10));
     }
@@ -159,6 +167,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseShorts(CharSequence, char, int)}.
      */
     @Test
+    @Dependency("testSplit")
     public void testParseShorts() {
         assertArrayEquals(new short[] {5, 2, -8}, parseShorts("5 , 2, -8 ", ',', 10));
     }
@@ -167,6 +176,7 @@ public final strictfp class CharSequence
      * Tests {@link CharSequences#parseBytes(CharSequence, char, int)}.
      */
     @Test
+    @Dependency("testSplit")
     public void testParseBytes() {
         assertArrayEquals(new byte[] {5, 2, -8}, parseBytes("5 , 2, -8 ", ',', 10));
     }

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java?rev=1392000&r1=1391999&r2=1392000&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java Sun Sep 30 11:34:26
2012
@@ -17,6 +17,7 @@
 package org.apache.sis.util;
 
 import java.util.Locale;
+import org.apache.sis.test.TestCase;
 
 import org.junit.*;
 import static org.junit.Assert.*;
@@ -30,7 +31,7 @@ import static org.junit.Assert.*;
  * @version 0.3
  * @module
  */
-public final strictfp class LocalesTest {
+public final strictfp class LocalesTest extends TestCase {
     /**
      * Tests the {@link Locales#getAvailableLanguages()} method.
      */
@@ -55,15 +56,6 @@ public final strictfp class LocalesTest 
     }
 
     /**
-     * Tests the {@link Locales#unique(Locale)} method.
-     */
-    @Test
-    public void testUnique() {
-        assertSame(Locale.ENGLISH, Locales.unique(new Locale("en")));
-        assertSame(Locale.FRENCH,  Locales.unique(new Locale("fr")));
-    }
-
-    /**
      * Tests the {@link Locales#parse(String)} method.
      * Depends on {@link #testUnique()}.
      */
@@ -83,4 +75,13 @@ public final strictfp class LocalesTest 
         assertEquals(new Locale("de", "", "POSIX"), Locales.parse("de__POSIX"));
         assertEquals(new Locale("fr", "", "MAC"),   Locales.parse("fr__MAC"));
     }
+
+    /**
+     * Tests the {@link Locales#unique(Locale)} method.
+     */
+    @Test
+    public void testUnique() {
+        assertSame(Locale.ENGLISH, Locales.unique(new Locale("en")));
+        assertSame(Locale.FRENCH,  Locales.unique(new Locale("fr")));
+    }
 }

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java?rev=1392000&r1=1391999&r2=1392000&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java Sun Sep
30 11:34:26 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.util;
 
+import org.apache.sis.test.TestCase;
+
 import org.junit.*;
 import static org.junit.Assert.*;
 import static org.apache.sis.util.StringBuilders.*;
@@ -30,7 +32,7 @@ import static org.apache.sis.util.String
  * @version 0.3
  * @module
  */
-public final strictfp class StringBuildersTest {
+public final strictfp class StringBuildersTest extends TestCase {
     /**
      * Tests the {@link StringBuilders#replace(StringBuilder, String, String)} method.
      */

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java?rev=1392000&r1=1391999&r2=1392000&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java
(original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/logging/PerformanceLevelTest.java
Sun Sep 30 11:34:26 2012
@@ -17,6 +17,7 @@
 package org.apache.sis.util.logging;
 
 import java.util.concurrent.TimeUnit;
+import org.apache.sis.test.TestCase;
 
 import org.junit.*;
 import static org.junit.Assert.*;
@@ -31,7 +32,7 @@ import static org.apache.sis.util.loggin
  * @version 0.3
  * @module
  */
-public final strictfp class PerformanceLevelTest {
+public final strictfp class PerformanceLevelTest extends TestCase {
     /**
      * Ensures that the duration are conform to the documentation.
      */

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java?rev=1392000&r1=1391999&r2=1392000&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
(original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
Sun Sep 30 11:34:26 2012
@@ -18,6 +18,8 @@ package org.apache.sis.util.resources;
 
 import java.util.Locale;
 import org.opengis.util.InternationalString;
+import org.apache.sis.test.Dependency;
+import org.apache.sis.test.TestCase;
 
 import org.junit.*;
 import static org.junit.Assert.*;
@@ -30,7 +32,7 @@ import static org.junit.Assert.*;
  * @since   0.3 (derived from geotk-2.2)
  * @version 0.3
  */
-public final strictfp class IndexedResourceBundleTest {
+public final strictfp class IndexedResourceBundleTest extends TestCase {
     /**
      * Tests the {@link IndexedResourceBundle#getString(int)} method on different locales.
      */
@@ -55,6 +57,7 @@ public final strictfp class IndexedResou
      * Tests the {@link IndexedResourceBundle#getString(int, Object)} method on different
locales.
      */
     @Test
+    @Dependency("testGetString")
     public void testGetStringWithParameter() {
         assertEquals("Argument ‘CRS’ shall not be null.",
                 Errors.getResources(Locale.ENGLISH).getString(Errors.Keys.NullArgument_1,
"CRS"));

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/type/TypesTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/type/TypesTest.java?rev=1392000&r1=1391999&r2=1392000&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/type/TypesTest.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/type/TypesTest.java Sun Sep 30
11:34:26 2012
@@ -19,6 +19,7 @@ package org.apache.sis.util.type;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.referencing.datum.Datum;
 import org.opengis.referencing.cs.AxisDirection;
+import org.apache.sis.test.TestCase;
 import org.junit.*;
 
 import static org.junit.Assert.*;
@@ -32,7 +33,7 @@ import static org.junit.Assert.*;
  * @version 0.3
  * @module
  */
-public final strictfp class TypesTest {
+public final strictfp class TypesTest extends TestCase {
     /**
      * Tests the {@link Types#getStandardName(String)} method.
      */



Mime
View raw message