summaryrefslogtreecommitdiffstats
path: root/day20/test_init.py
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2022-12-28 11:58:20 +0100
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2022-12-28 11:58:20 +0100
commitc22544594e251613a5dbf6c4ee505716867e55e6 (patch)
tree16abda419325121eb6a36acc306697f7acba6497 /day20/test_init.py
parent1cf8cf3f2182bb010b60f7c916fe2cd030df1658 (diff)
download2022-c22544594e251613a5dbf6c4ee505716867e55e6.tar.gz
2022-c22544594e251613a5dbf6c4ee505716867e55e6.tar.bz2
2022-c22544594e251613a5dbf6c4ee505716867e55e6.zip
Day 20 [WIP]
Diffstat (limited to 'day20/test_init.py')
-rw-r--r--day20/test_init.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/day20/test_init.py b/day20/test_init.py
index b3ccc44..24b94cb 100644
--- a/day20/test_init.py
+++ b/day20/test_init.py
@@ -25,3 +25,11 @@ def test_rotation():
25 25
26 items = AssignmentOne.move(items, 4) 26 items = AssignmentOne.move(items, 4)
27 assert items == [1, 2, -3, 4, 0, 3, -2] 27 assert items == [1, 2, -3, 4, 0, 3, -2]
28
29
30def test_get_nth_number_after_0():
31 items = [1, 2, -3, 4, 0, 3, -2]
32
33 assert AssignmentOne.get_nth_number_after_0(items, 1000) == 4
34 assert AssignmentOne.get_nth_number_after_0(items, 2000) == -3
35 assert AssignmentOne.get_nth_number_after_0(items, 3000) == 2