Author: ruschein
Date: 2010-09-02 14:57:21 -0700 (Thu, 02 Sep 2010)
New Revision: 21672
Modified:
core3/work-api/trunk/src/test/java/org/cytoscape/work/util/BoundedFloatTest.java
Log:
Improved branch coverage.
Modified:
core3/work-api/trunk/src/test/java/org/cytoscape/work/util/BoundedFloatTest.java
===================================================================
---
core3/work-api/trunk/src/test/java/org/cytoscape/work/util/BoundedFloatTest.java
2010-09-02 21:48:03 UTC (rev 21671)
+++
core3/work-api/trunk/src/test/java/org/cytoscape/work/util/BoundedFloatTest.java
2010-09-02 21:57:21 UTC (rev 21672)
@@ -74,10 +74,22 @@
}
@Test(expected=IllegalArgumentException.class)
- public final void testSettingInvalidValue() throws Exception {
+ public final void testSettingInvalidValueAtLowerBound() throws
Exception {
bf.setValue(-1.0f);
}
+ @Test(expected=IllegalArgumentException.class)
+ public final void testSettingInvalidValueBelowLowerBound() throws
Exception {
+ final BoundedFloat bf3 = new BoundedFloat(-1.0f, 0.0f, 1.0f, /*
lowerStrict = */ false, /* upperStrict = */ true);
+ bf3.setValue(-1.5f);
+ }
+
+ @Test(expected=IllegalArgumentException.class)
+ public final void testSettingInvalidValueAtUpperBound() throws
Exception {
+ final BoundedFloat bf2 = new BoundedFloat(-1.0f, 0.0f, 1.0f, /*
lowerStrict = */ false, /* upperStrict = */ true);
+ bf2.setValue(1.0f);
+ }
+
@Test
public final void testSettingValueEqualToUpperBound() throws Exception {
bf.setValue(1.0f);
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.