sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1445078 - in /sis/branches/JDK7/sis-utility/src: main/java/org/apache/sis/measure/ main/java/org/apache/sis/util/resources/ test/java/org/apache/sis/measure/ test/java/org/apache/sis/test/suite/
Date Tue, 12 Feb 2013 09:49:50 GMT
Author: desruisseaux
Date: Tue Feb 12 09:49:50 2013
New Revision: 1445078

URL: http://svn.apache.org/r1445078
Log:
Ported DateRange.

Added:
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/DateRange.java   (with
props)
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/DateRangeTest.java
  (with props)
Modified:
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Range.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/NumberRangeTest.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java

Added: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/DateRange.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/DateRange.java?rev=1445078&view=auto
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/DateRange.java (added)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/DateRange.java Tue
Feb 12 09:49:50 2013
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.measure;
+
+import java.util.Date;
+import javax.measure.unit.Unit;
+import javax.measure.converter.UnitConverter;
+import javax.measure.converter.ConversionException;
+import net.jcip.annotations.Immutable;
+import org.apache.sis.util.resources.Errors;
+
+
+/**
+ * A range of dates. The elements in this range are {@link Date} objects.
+ * Consequently the precision of {@code DateRange} objects is milliseconds.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.3 (derived from geotk-2.5)
+ * @version 0.3
+ * @module
+ *
+ * @see RangeFormat
+ */
+@Immutable
+public class DateRange extends Range<Date> {
+    /**
+     * For cross-version compatibility.
+     */
+    private static final long serialVersionUID = -6400011350250757942L;
+
+    /**
+     * Creates a new date range for the given dates. Start time and end time are inclusive.
+     *
+     * @param startTime The start time (inclusive), or {@code null} if none.
+     * @param endTime   The end time (inclusive), or {@code null} if none.
+     */
+    public DateRange(final Date startTime, final Date endTime) {
+        super(Date.class, clone(startTime), clone(endTime));
+    }
+
+    /**
+     * Creates a new date range for the given dates.
+     *
+     * @param startTime     The start time, or {@code null} if none.
+     * @param isMinIncluded {@code true} if the start time is inclusive.
+     * @param endTime       The end time, or {@code null} if none.
+     * @param isMaxIncluded {@code true} if the end time is inclusive.
+     */
+    public DateRange(final Date startTime, boolean isMinIncluded,
+                     final Date   endTime, boolean isMaxIncluded)
+    {
+        super(Date.class, clone(startTime), isMinIncluded,
+                          clone(  endTime), isMaxIncluded);
+    }
+
+    /**
+     * Creates a date range from the specified measurement range. Units are converted as
needed.
+     *
+     * @param  range The range to convert.
+     * @param  origin The date to use as the origin.
+     * @throws ConversionException if the given range doesn't have a
+     *         {@linkplain MeasurementRange#getUnits unit} compatible with milliseconds.
+     */
+    public DateRange(final MeasurementRange<?> range, final Date origin) throws ConversionException
{
+        this(range, getConverter(range.getUnits()), origin.getTime());
+    }
+
+    /**
+     * Workaround for RFE #4093999 ("Relax constraint on placement of this()/super()
+     * call in constructors").
+     */
+    private DateRange(final MeasurementRange<?> range, final UnitConverter converter,
final long origin)
+            throws ConversionException
+    {
+        super(Date.class,
+              new Date(origin + Math.round(converter.convert(range.getMinimum()))), range.isMinIncluded(),
+              new Date(origin + Math.round(converter.convert(range.getMaximum()))), range.isMaxIncluded());
+    }
+
+    /**
+     * Creates a new date range using the given values. This method is invoked by the
+     * parent class for creating the result of an intersection or union operation.
+     */
+    @Override
+    final DateRange create(final Date minValue, final boolean isMinIncluded,
+                           final Date maxValue, final boolean isMaxIncluded)
+    {
+        return new DateRange(minValue, isMinIncluded, maxValue, isMaxIncluded);
+    }
+
+    /**
+     * Returns an initially empty array of the given length.
+     */
+    @Override
+    final DateRange[] newArray(final int length) {
+        return new DateRange[length];
+    }
+
+    /**
+     * Ensures that {@link #elementType} is compatible with the type expected by this range
class.
+     * Invoked for argument checking by the super-class constructor.
+     */
+    @Override
+    final void ensureValidType() throws IllegalArgumentException {
+        // No need to call super.checkElementClass() because Date implements Comparable.
+        if (!Date.class.isAssignableFrom(elementType)) {
+            throw new IllegalArgumentException(Errors.format(
+                    Errors.Keys.IllegalClass_2, Date.class, elementType));
+        }
+    }
+
+    /**
+     * Casts the given {@code Range} object to a {@code DateRange}. This method shall be
invoked
+     * only in context where we have verified that the range element class is compatible.
+     * This verification is performed by {@link Range#ensureCompatible(Range)} method.
+     */
+    private static DateRange cast(final Range<?> range) {
+        if (range == null || range instanceof DateRange) {
+            return (DateRange) range;
+        }
+        return new DateRange((Date) range.getMinValue(), range.isMinIncluded(),
+                             (Date) range.getMaxValue(), range.isMaxIncluded());
+    }
+
+    /**
+     * Returns a clone of the specified date.
+     */
+    private static Date clone(final Date date) {
+        return (date != null) ? (Date) date.clone() : null;
+    }
+
+    /**
+     * Workaround for RFE #4093999 ("Relax constraint on placement of this()/super()
+     * call in constructors").
+     */
+    private static UnitConverter getConverter(final Unit<?> source) throws ConversionException
{
+        if (source == null) {
+            throw new ConversionException(Errors.format(Errors.Keys.NoUnit));
+        }
+        return source.getConverterToAny(Units.MILLISECOND);
+    }
+
+    /**
+     * Returns the start time, or {@code null} if none.
+     */
+    @Override
+    public Date getMinValue() {
+        return clone(super.getMinValue());
+    }
+
+    /**
+     * Returns the end time, or {@code null} if none.
+     */
+    @Override
+    public Date getMaxValue() {
+        return clone(super.getMaxValue());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public DateRange union(final Range<?> range) throws IllegalArgumentException {
+        return cast(super.union(range));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public DateRange intersect(final Range<?> range) throws IllegalArgumentException
{
+        return cast(super.intersect(range));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public DateRange[] subtract(final Range<?> range) throws IllegalArgumentException
{
+        return (DateRange[]) super.subtract(range);
+        // Should never throw ClassCastException because super.subtract(Range) invokes newArray(int)
+        // and create(...), which are overridden in this class with DateRange return type.
+    }
+}

Propchange: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/DateRange.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/DateRange.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Range.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Range.java?rev=1445078&r1=1445077&r2=1445078&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Range.java (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Range.java Tue Feb
12 09:49:50 2013
@@ -546,7 +546,7 @@ public class Range<T extends Comparable<
      *
      * @see #containsNC(Range)
      */
-    final int compareMinTo(final T value, int position) {
+    private int compareMinTo(final T value, int position) {
         /*
          * Check for infinite values.  If the given value is infinite, it can be either positive
or
          * negative infinity, which we can infer from the 'position' argument. Note that
'position'
@@ -589,7 +589,7 @@ public class Range<T extends Comparable<
      * Compares the {@linkplain #getMaxValue() maximum value} of this range with the given
bound of
      * another range. See the comment in {@link #compareMinTo(Comparable, int)} for more
details.
      */
-    final int compareMaxTo(final T value, int position) {
+    private int compareMaxTo(final T value, int position) {
         if (maxValue == null) {
             return (value == null) ? 0 : +1;
         }

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1445078&r1=1445077&r2=1445078&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
Tue Feb 12 09:49:50 2013
@@ -240,6 +240,11 @@ public final class Errors extends Indexe
         public static final int NegativeArgument_2 = 8;
 
         /**
+         * No unit of measurement has been specified.
+         */
+        public static final int NoUnit = 68;
+
+        /**
          * Node “{0}” can not be a child of itself.
          */
         public static final int NodeChildOfItself_1 = 37;
@@ -390,6 +395,11 @@ public final class Errors extends Indexe
         public static final int UnsupportedOperation_1 = 20;
 
         /**
+         * The ‘{0}’ type is unsupported.
+         */
+        public static final int UnsupportedType_1 = 69;
+
+        /**
          * A value is already defined for “{0}”.
          */
         public static final int ValueAlreadyDefined_1 = 13;

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1445078&r1=1445077&r2=1445078&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
Tue Feb 12 09:49:50 2013
@@ -72,6 +72,7 @@ NonTemporalUnit_1               = \u201c
 NotANumber_1                    = Argument \u2018{0}\u2019 shall not be NaN (Not-a-Number).
 NotAPrimitiveWrapper_1          = Class \u2018{0}\u2019 is not a primitive type wrapper.
 NotComparableClass_1            = Class \u2018{0}\u2019 is not a comparable.
+NoUnit                          = No unit of measurement has been specified.
 NullArgument_1                  = Argument \u2018{0}\u2019 shall not be null.
 # Use the OGC/ISO "Dictionary" word instead of "Map" for avoiding confusion with geographic
map.
 NullMapKey                      = Null key is not allowed in this dictionary.
@@ -91,6 +92,7 @@ UnparsableStringForClass_3      = Text \
 UnspecifiedFormatForClass_1     = No format is specified for objects of class \u2018{0}\u2019.
 UnsupportedImplementation_1     = Can not handle instances of \u2018{0}\u2019 because arbitrary
implementations are not yet supported.
 UnsupportedOperation_1          = The \u2018{0}\u2019 operation is unsupported.
+UnsupportedType_1               = The \u2018{0}\u2019 type is unsupported.
 ValueAlreadyDefined_1           = A value is already defined for \u201c{0}\u201d.
 ValueNotGreaterThanZero_2       = Value \u2018{0}\u2019={1} is invalid. Expected a number
greater than 0.
 ValueOutOfRange_4               = Value \u2018{0}\u2019={3} is invalid. Expected a value
in the [{1} \u2026 {2}] range.

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1445078&r1=1445077&r2=1445078&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
Tue Feb 12 09:49:50 2013
@@ -61,6 +61,7 @@ NonTemporalUnit_1               = \u201c
 NotANumber_1                    = L\u2019argument \u2018{0}\u2019 ne doit pas \u00eatre NaN
(Not-a-Number).
 NotAPrimitiveWrapper_1          = La classe \u2018{0}\u2019 n\u2019est pas un adaptateur
d\u2019un type primitif.
 NotComparableClass_1            = La classe \u2018{0}\u2019 n\u2019est pas comparable.
+NoUnit                          = Aucune unit\u00e9 de mesure n\u2019a \u00e9t\u00e9 sp\u00e9cifi\u00e9e.
 NullArgument_1                  = L\u2019argument \u2018{0}\u2019 ne doit pas \u00eatre nul.
 NullMapKey                      = La cl\u00e9 nulle n\u2019est pas autoris\u00e9e dans ce
dictionnaire.
 NullMapValue                    = Les valeurs nulles ne sont pas autoris\u00e9es dans ce
dictionnaire.
@@ -79,6 +80,7 @@ UnparsableStringForClass_2      = Le tex
 UnparsableStringForClass_3      = Le texte \u201c{1}\u201d n\u2019est pas reconnu comme un
objet de type \u2018{0}\u2019, \u00e0 cause des caract\u00e8res \u201c{2}\u201d.
 UnsupportedImplementation_1     = Les instances de \u2018{0}\u2019 ne peuvent pas \u00eatre
g\u00e9r\u00e9es parce que les impl\u00e9mentations arbitraires ne sont pas encore support\u00e9es.
 UnsupportedOperation_1          = L\u2019op\u00e9ration \u2018{0}\u2019 n\u2019est pas support\u00e9e.
+UnsupportedType_1               = Le type \u2018{0}\u2019 n\u2019est pas support\u00e9.
 ValueAlreadyDefined_1           = Une valeur est d\u00e9j\u00e0 d\u00e9finie pour \u201c{0}\u201d.
 ValueNotGreaterThanZero_2       = La valeur \u2018{0}\u2019={1} n\u2019est pas valide. On
attendait un nombre positif non-nul.
 ValueOutOfRange_4               = La valeur \u2018{0}\u2019={3} est invalide. Une valeur
dans la plage [{1} \u2026 {2}] \u00e9tait attendue.

Added: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/DateRangeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/DateRangeTest.java?rev=1445078&view=auto
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/DateRangeTest.java
(added)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/DateRangeTest.java
Tue Feb 12 09:49:50 2013
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.measure;
+
+import java.util.Date;
+import org.junit.Test;
+import org.apache.sis.test.TestCase;
+import org.apache.sis.test.DependsOn;
+
+import static org.junit.Assert.*;
+import static org.apache.sis.test.TestUtilities.date;
+
+
+/**
+ * Tests the {@link DateRange} class.
+ *
+ * @author  Martin Desruisseaux (IRD)
+ * @since   0.3 (derived from geotk-2.4)
+ * @version 0.3
+ * @module
+ */
+@DependsOn(RangeTest.class)
+public final strictfp class DateRangeTest extends TestCase {
+    /**
+     * Tests {@link DateRange#union(Range)}.
+     */
+    @Test
+    public void testUnion() {
+        final Date min = date("1998-04-02 13:00:00");
+        final Date in1 = date("1998-05-12 11:00:00");
+        final Date in2 = date("1998-06-08 14:00:00");
+        final Date max = date("1998-07-01 19:00:00");
+        final DateRange r1 = new DateRange(min, in2);
+        final DateRange r2 = new DateRange(in1, max);
+        final DateRange rt = r1.union(r2);
+        assertEquals(min, rt.getMinValue());
+        assertEquals(max, rt.getMaxValue());
+        assertEquals(rt, r2.union(r1));
+        /*
+         * Test a range fully included in the other range.
+         */
+        final DateRange outer = new DateRange(min, max);
+        final DateRange inner = new DateRange(in1, in2);
+        assertSame(outer, outer.union(inner));
+        assertSame(outer, inner.union(outer));
+        /*
+         * Same test than above, but with a cast from Range to DateRange.
+         */
+        final Range<Date> outerAsRange = new Range<>(Date.class, min, max);
+        assertSame(outerAsRange, outerAsRange.union(inner));
+        assertEquals(outer, inner.union(outerAsRange));
+    }
+
+    /**
+     * Tests {@link DateRange#intersect(Range)}.
+     */
+    @Test
+    public void testIntersect() {
+        final Date min = date("1998-04-02 13:00:00");
+        final Date in1 = date("1998-05-12 11:00:00");
+        final Date in2 = date("1998-06-08 14:00:00");
+        final Date max = date("1998-07-01 19:00:00");
+        final DateRange r1 = new DateRange(min, in2);
+        final DateRange r2 = new DateRange(in1, max);
+        final DateRange rt = r1.intersect(r2);
+        assertEquals(in1, rt.getMinValue());
+        assertEquals(in2, rt.getMaxValue());
+        assertEquals(rt, r2.intersect(r1));
+        /*
+         * Test a range fully included in the other range.
+         */
+        final DateRange outer = new DateRange(min, max);
+        final DateRange inner = new DateRange(in1, in2);
+        assertSame(inner, outer.intersect(inner));
+        assertSame(inner, inner.intersect(outer));
+        /*
+         * Same test than above, but with a cast from Range to DateRange.
+         */
+        final Range<Date> innerAsRange = new Range<>(Date.class, in1, in2);
+        assertSame(innerAsRange, innerAsRange.intersect(outer));
+        assertEquals(inner, outer.intersect(innerAsRange));
+    }
+
+    /**
+     * Tests {@link DateRange#subtract(Range)}.
+     */
+    @Test
+    public void testSubtract() {
+        final Date min = date("1998-04-02 13:00:00");
+        final Date in1 = date("1998-05-12 11:00:00");
+        final Date in2 = date("1998-06-08 14:00:00");
+        final Date max = date("1998-07-01 19:00:00");
+        final DateRange outer = new DateRange(min, max);
+        final DateRange inner = new DateRange(in1, in2);
+        final DateRange[] rt = outer.subtract(inner);
+        assertEquals(2, rt.length);
+        assertEquals(min, rt[0].getMinValue());
+        assertEquals(in1, rt[0].getMaxValue());
+        assertEquals(in2, rt[1].getMinValue());
+        assertEquals(max, rt[1].getMaxValue());
+    }
+}

Propchange: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/DateRangeTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/DateRangeTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java?rev=1445078&r1=1445077&r2=1445078&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/MeasurementRangeTest.java
Tue Feb 12 09:49:50 2013
@@ -19,6 +19,7 @@ package org.apache.sis.measure;
 import javax.measure.unit.SI;
 import javax.measure.converter.ConversionException;
 import org.junit.Test;
+import org.apache.sis.test.TestCase;
 import org.apache.sis.test.DependsOn;
 
 import static org.apache.sis.test.Assert.*;
@@ -33,7 +34,7 @@ import static org.apache.sis.test.Assert
  * @module
  */
 @DependsOn(NumberRangeTest.class)
-public final strictfp class MeasurementRangeTest {
+public final strictfp class MeasurementRangeTest extends TestCase {
     /**
      * Tests unit conversions.
      *

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/NumberRangeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/NumberRangeTest.java?rev=1445078&r1=1445077&r2=1445078&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/NumberRangeTest.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/measure/NumberRangeTest.java
Tue Feb 12 09:49:50 2013
@@ -17,6 +17,7 @@
 package org.apache.sis.measure;
 
 import org.junit.Test;
+import org.apache.sis.test.TestCase;
 import org.apache.sis.test.DependsOn;
 
 import static org.junit.Assert.*;
@@ -31,7 +32,7 @@ import static org.junit.Assert.*;
  * @module
  */
 @DependsOn(RangeTest.class)
-public final strictfp class NumberRangeTest {
+public final strictfp class NumberRangeTest extends TestCase {
     /**
      * Tests the bounds values of a range of integers.
      */

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java?rev=1445078&r1=1445077&r2=1445078&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
Tue Feb 12 09:49:50 2013
@@ -72,6 +72,7 @@ import org.junit.runners.Suite;
     // Measurements and formatting.
     org.apache.sis.measure.UnitsTest.class,
     org.apache.sis.measure.RangeTest.class,
+    org.apache.sis.measure.DateRangeTest.class,
     org.apache.sis.measure.NumberRangeTest.class,
     org.apache.sis.measure.MeasurementRangeTest.class,
     org.apache.sis.measure.FormattedCharacterIteratorTest.class,



Mime
View raw message