summaryrefslogtreecommitdiffstats
path: root/day18/test_init.py
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2022-12-19 09:30:43 +0100
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2022-12-19 09:30:43 +0100
commitf3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2 (patch)
tree535a7048c7547e1eaef6f97dcfd8b2cad598ca50 /day18/test_init.py
parent06cb539f69f0b501afaa9ef5b6d89863e1c9d111 (diff)
download2022-f3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2.tar.gz
2022-f3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2.tar.bz2
2022-f3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2.zip
Day 18
Diffstat (limited to 'day18/test_init.py')
-rw-r--r--day18/test_init.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/day18/test_init.py b/day18/test_init.py
new file mode 100644
index 0000000..f8a4eaa
--- /dev/null
+++ b/day18/test_init.py
@@ -0,0 +1,24 @@
1# -*- coding: utf-8 -*-
2from aoc.datastructures import Coordinate3
3from day18 import Assignment
4
5
6class TestAssignment:
7 def test_open_sides(self):
8 blocks = {Coordinate3(0, 0, 0)}
9
10 assert Assignment.open_sides(blocks) == 6
11
12 blocks = {
13 Coordinate3(0, 0, 0),
14 Coordinate3(1, 0, 0),
15 }
16
17 assert Assignment.open_sides(blocks) == 10
18
19 blocks = {
20 Coordinate3(1, 1, 1),
21 Coordinate3(2, 1, 1),
22 }
23
24 assert Assignment.open_sides(blocks) == 10