summaryrefslogtreecommitdiffstats
path: root/day15/test_init.py
diff options
context:
space:
mode:
Diffstat (limited to 'day15/test_init.py')
-rw-r--r--day15/test_init.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/day15/test_init.py b/day15/test_init.py
new file mode 100644
index 0000000..e5f10b0
--- /dev/null
+++ b/day15/test_init.py
@@ -0,0 +1,37 @@
1from day15 import AssignmentTwo
2
3
4def test_icrease_map():
5 assert AssignmentTwo.increase_map([[8]]) == [
6 [8, 9, 1, 2, 3],
7 [9, 1, 2, 3, 4],
8 [1, 2, 3, 4, 5],
9 [2, 3, 4, 5, 6],
10 [3, 4, 5, 6, 7],
11 ]
12
13 assert AssignmentTwo.increase_map([
14 [0],
15 [1]
16 ]) == [
17 [0, 1, 2, 3, 4],
18 [1, 2, 3, 4, 5],
19 [1, 2, 3, 4, 5],
20 [2, 3, 4, 5, 6],
21 [2, 3, 4, 5, 6],
22 [3, 4, 5, 6, 7],
23 [3, 4, 5, 6, 7],
24 [4, 5, 6, 7, 8],
25 [4, 5, 6, 7, 8],
26 [5, 6, 7, 8, 9]
27 ]
28
29 assert AssignmentTwo.increase_map([
30 [0, 1],
31 ]) == [
32 [0, 1, 1, 2, 2, 3, 3, 4, 4, 5],
33 [1, 2, 2, 3, 3, 4, 4, 5, 5, 6],
34 [2, 3, 3, 4, 4, 5, 5, 6, 6, 7],
35 [3, 4, 4, 5, 5, 6, 6, 7, 7, 8],
36 [4, 5, 5, 6, 6, 7, 7, 8, 8, 9]
37 ]