Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2014-05-05 23:57:10 +0000
committerAngel Avila2014-06-04 20:00:04 +0000
commit2388fcfd0ca85d3a66470f399f1be3ec96339a93 (patch)
tree96f8e15ae7c19e73e2d3125cc3d76814bee61797 /plugins/org.eclipse.osee.disposition.rest.test
parent70942c95d6910a179e2fcf1f537b39f8fc7880e7 (diff)
downloadorg.eclipse.osee-2388fcfd0ca85d3a66470f399f1be3ec96339a93.tar.gz
org.eclipse.osee-2388fcfd0ca85d3a66470f399f1be3ec96339a93.tar.xz
org.eclipse.osee-2388fcfd0ca85d3a66470f399f1be3ec96339a93.zip
bug: Fix locationRangeCompressor
Diffstat (limited to 'plugins/org.eclipse.osee.disposition.rest.test')
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java
index aa68c7978af..4a76c887623 100644
--- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java
+++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java
@@ -34,5 +34,20 @@ public class LocationRangesCompressorTest {
locationPoints.add(2);
result = LocationRangesCompressor.compress(locationPoints);
Assert.assertEquals("1-4, 21, 83-84", result);
+
+ locationPoints.add(89);
+ result = LocationRangesCompressor.compress(locationPoints);
+ Assert.assertEquals("1-4, 21, 83-84, 89", result);
+
+ locationPoints.add(92);
+ locationPoints.add(93);
+ locationPoints.add(5);
+ result = LocationRangesCompressor.compress(locationPoints);
+ Assert.assertEquals("1-5, 21, 83-84, 89, 92-93", result);
+
+ List<Integer> locationPointsZero = new ArrayList<Integer>();
+ locationPointsZero.add(0);
+ result = LocationRangesCompressor.compress(locationPointsZero);
+ Assert.assertEquals("0", result);
}
}

Back to the top