diff options
Diffstat (limited to 'aoc/tests/test_datastructures.py')
| -rw-r--r-- | aoc/tests/test_datastructures.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/aoc/tests/test_datastructures.py b/aoc/tests/test_datastructures.py new file mode 100644 index 0000000..a7965f5 --- /dev/null +++ b/aoc/tests/test_datastructures.py | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | # -*- coding: utf-8 -*- | ||
| 2 | from aoc.datastructures import Coordinate3 | ||
| 3 | |||
| 4 | |||
| 5 | class TestCoordinate3: | ||
| 6 | def test_neighbours_nodiagonal(self): | ||
| 7 | coordinate = Coordinate3(0, 0, 0) | ||
| 8 | |||
| 9 | assert set(coordinate.neighbours(True)) == { | ||
| 10 | Coordinate3(-1, 0, 0), | ||
| 11 | Coordinate3(1, 0, 0), | ||
| 12 | Coordinate3(0, -1, 0), | ||
| 13 | Coordinate3(0, 1, 0), | ||
| 14 | Coordinate3(0, 0, -1), | ||
| 15 | Coordinate3(0, 0, 1), | ||
| 16 | } | ||
