Skip to content

Commit b6f913f

Browse files
committed
Complete Coordinates' test coverage
1 parent 98f0e3a commit b6f913f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/kotlin/de/ronny_h/aoc/extensions/CoordinatesTest.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ class CoordinatesTest : StringSpec({
109109
SOUTH.isOpposite(NORTH) shouldBe true
110110
EAST.isOpposite(WEST) shouldBe true
111111
WEST.isOpposite(EAST) shouldBe true
112+
113+
NORTH.isOpposite(EAST) shouldBe false
114+
SOUTH.isOpposite(EAST) shouldBe false
115+
EAST.isOpposite(SOUTH) shouldBe false
116+
WEST.isOpposite(SOUTH) shouldBe false
112117
}
113118

114119
"Difference between directions" {
@@ -117,4 +122,11 @@ class CoordinatesTest : StringSpec({
117122
NORTH - SOUTH shouldBe 2
118123
NORTH - WEST shouldBe 1
119124
}
125+
126+
"toString returns the abbreviation letter" {
127+
NORTH.toString() shouldBe "N"
128+
SOUTH.toString() shouldBe "S"
129+
EAST.toString() shouldBe "E"
130+
WEST.toString() shouldBe "W"
131+
}
120132
})

0 commit comments

Comments
 (0)