Skip to content

Commit d4e4d73

Browse files
committed
Day 24 tests
1 parent a82a05a commit d4e4d73

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

tests/data/day24/test_01_input.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
x00: 1
2+
x01: 1
3+
x02: 1
4+
y00: 0
5+
y01: 1
6+
y02: 0
7+
8+
x00 AND y00 -> z00
9+
x01 XOR y01 -> z01
10+
x02 OR y02 -> z02

tests/data/day24/test_02_input.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
x00: 0
2+
x01: 1
3+
x02: 0
4+
x03: 1
5+
x04: 0
6+
x05: 1
7+
y00: 0
8+
y01: 0
9+
y02: 1
10+
y03: 1
11+
y04: 0
12+
y05: 1
13+
14+
x00 AND y00 -> z05
15+
x01 AND y01 -> z02
16+
x02 AND y02 -> z01
17+
x03 AND y03 -> z03
18+
x04 AND y04 -> z04
19+
x05 AND y05 -> z00

tests/test_24.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from aoc.models.tester import TestSolutionUtility
2+
3+
4+
def test_day24_part1():
5+
TestSolutionUtility.run_test(
6+
day=24,
7+
is_raw=False,
8+
part_num=1,
9+
expected=4,
10+
)
11+
12+
13+
def test_day24_part2():
14+
TestSolutionUtility.run_test(
15+
day=24,
16+
is_raw=False,
17+
part_num=2,
18+
expected="z00,z01,z02,z05",
19+
)

0 commit comments

Comments
 (0)