From f3d0899dbfd0aa3e6aebf5d19ec89d58ead418b2 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Mon, 19 Dec 2022 09:30:43 +0100 Subject: Day 18 --- day18/test_init.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 day18/test_init.py (limited to 'day18/test_init.py') 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 @@ +# -*- coding: utf-8 -*- +from aoc.datastructures import Coordinate3 +from day18 import Assignment + + +class TestAssignment: + def test_open_sides(self): + blocks = {Coordinate3(0, 0, 0)} + + assert Assignment.open_sides(blocks) == 6 + + blocks = { + Coordinate3(0, 0, 0), + Coordinate3(1, 0, 0), + } + + assert Assignment.open_sides(blocks) == 10 + + blocks = { + Coordinate3(1, 1, 1), + Coordinate3(2, 1, 1), + } + + assert Assignment.open_sides(blocks) == 10 -- cgit v1.2.3