From 7d26df97d90532b7fa094def157ea38c13a8c0f9 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 29 Feb 2016 17:32:05 +0100 Subject: Add mirrored list size test --- test/ch/epfl/xblast/ListsTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/ch/epfl') 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 @@ -30,6 +30,15 @@ public class ListsTest { assertEquals(expected, Lists.mirrored(sampleList)); } + @Test + public void mirroredListSizeIsCorrect() { + int sampleSize = 10; + List sampleList = IntStream.range(0, sampleSize).boxed().collect(Collectors.toList()); + List mirrored = Lists.mirrored(sampleList); + + assertEquals(sampleSize * 2 - 1, mirrored.size()); + } + @Test public void mirrorElementsAreEqual() { List sampleList = IntStream.range(0, 10).boxed().collect(Collectors.toList()); -- cgit v1.2.3