[Schmitzm-commits] r2298 - trunk/schmitzm-core/src/test/java/de/schmitzm/data
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Thu Apr 18 19:32:31 CEST 2013
Author: mojays
Date: 2013-04-18 19:32:31 +0200 (Thu, 18 Apr 2013)
New Revision: 2298
Modified:
trunk/schmitzm-core/src/test/java/de/schmitzm/data/UnitConversionTest.java
Log:
UnitConversionTest: replaced reciprocal check with inverse function check
Modified: trunk/schmitzm-core/src/test/java/de/schmitzm/data/UnitConversionTest.java
===================================================================
--- trunk/schmitzm-core/src/test/java/de/schmitzm/data/UnitConversionTest.java 2013-04-18 17:18:09 UTC (rev 2297)
+++ trunk/schmitzm-core/src/test/java/de/schmitzm/data/UnitConversionTest.java 2013-04-18 17:32:31 UTC (rev 2298)
@@ -212,7 +212,10 @@
// e.g. although sec/min not equals min/hour, 1sec/min = 1 min/hour!!
// assertFalse(u1.convertTo(u2, 1.0) == 1.0);
// instead we check the reciprocal
- assertEquals(u1.convertTo(u2, 1.0), 1.0/u2.convertTo(u1, 1.0),0.000001);
+// assertEquals(u1.convertTo(u2, 1.0), 1.0/u2.convertTo(u1, 1.0),0.000001);
+// reciprocal does not work for temperature!
+// instead we check the inversion
+ assertEquals(u1+" <-> "+u2+" conversion failed; ",1.0, u2.convertTo(u1,u1.convertTo(u2, 1.0)),0.000001);
}
}
More information about the Schmitzm-commits
mailing list