aboutsummaryrefslogtreecommitdiff
path: root/test/ch/epfl
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-02-29 17:32:05 +0100
committerPacien TRAN-GIRARD2016-02-29 17:32:05 +0100
commit7d26df97d90532b7fa094def157ea38c13a8c0f9 (patch)
tree7f4414c7630f11284fc5da6e94c983716fbb3c17 /test/ch/epfl
parent7c19be7f34b932d696d839a092f05617400589f6 (diff)
downloadxblast-7d26df97d90532b7fa094def157ea38c13a8c0f9.tar.gz
Add mirrored list size test
Diffstat (limited to 'test/ch/epfl')
-rw-r--r--test/ch/epfl/xblast/ListsTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ch/epfl/xblast/ListsTest.java b/test/ch/epfl/xblast/ListsTest.java
index 0a2f5f9..b898399 100644
--- a/test/ch/epfl/xblast/ListsTest.java
+++ b/test/ch/epfl/xblast/ListsTest.java
@@ -31,6 +31,15 @@ public class ListsTest {
31 } 31 }
32 32
33 @Test 33 @Test
34 public void mirroredListSizeIsCorrect() {
35 int sampleSize = 10;
36 List<Integer> sampleList = IntStream.range(0, sampleSize).boxed().collect(Collectors.toList());
37 List<Integer> mirrored = Lists.mirrored(sampleList);
38
39 assertEquals(sampleSize * 2 - 1, mirrored.size());
40 }
41
42 @Test
34 public void mirrorElementsAreEqual() { 43 public void mirrorElementsAreEqual() {
35 List<Integer> sampleList = IntStream.range(0, 10).boxed().collect(Collectors.toList()); 44 List<Integer> sampleList = IntStream.range(0, 10).boxed().collect(Collectors.toList());
36 List<Integer> mirrored = Lists.mirrored(sampleList); 45 List<Integer> mirrored = Lists.mirrored(sampleList);