jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1467255 - in /jackrabbit/trunk: jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SetPropertyDoubleTest.java jackrabbit-jcr2dav/pom.xml
Date Fri, 12 Apr 2013 13:01:36 GMT
Author: reschke
Date: Fri Apr 12 13:01:35 2013
New Revision: 1467255

URL: http://svn.apache.org/r1467255
Log:
JCR-3566: add TCK test for NaN and infinity double property values

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SetPropertyDoubleTest.java
    jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SetPropertyDoubleTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SetPropertyDoubleTest.java?rev=1467255&r1=1467254&r2=1467255&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SetPropertyDoubleTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SetPropertyDoubleTest.java
Fri Apr 12 13:01:35 2013
@@ -131,4 +131,17 @@ public class SetPropertyDoubleTest exten
                 testNode.hasProperty(propertyName1));
     }
 
+    /**
+     * Tests that in infinity and NaN values can be persisted and round-tripped.
+     */
+    public void testEdgeCases() throws Exception {
+        double tests[] = { Double.NaN, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY
};
+        String path = testNode.getPath();
+
+        for (double v : tests) {
+            testNode.setProperty(propertyName1, v);
+            testRootNode.getSession().save();
+            assertEquals("Round-trip of " + v, v, superuser.getNode(path).getProperty(propertyName1).getDouble());
+        }
+    }
 }
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml?rev=1467255&r1=1467254&r2=1467255&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-jcr2dav/pom.xml Fri Apr 12 13:01:35 2013
@@ -92,6 +92,8 @@
                       org.apache.jackrabbit.jcr2spi.IsSameTest#testIsSameProperty3
                       org.apache.jackrabbit.jcr2spi.IsSameTest#testIsSameProperty4
                       org.apache.jackrabbit.jcr2spi.IsSameTest#testIsSameNode7
+                      <!-- JCR-3551 -->
+                      org.apache.jackrabbit.test.api.SetPropertyDoubleTest#testEdgeCases
                       <!-- Known, general issue of the Jcr2Spi - SPI setup.
                            No notification about changes to registered namespace(s) -->
                       
                       org.apache.jackrabbit.jcr2spi.name.NamespaceRegistryTest#testReRegisteredNamespace



Mime
View raw message