fix: GarminMapperTest
This commit is contained in:
parent
30dc5c623e
commit
028f1b6082
1 changed files with 8 additions and 8 deletions
|
@ -9,8 +9,8 @@ class GarminMapperTest {
|
||||||
@Test
|
@Test
|
||||||
fun linesTest() {
|
fun linesTest() {
|
||||||
linesTest(
|
linesTest(
|
||||||
listOf(Lane.DotsLeft),
|
setOf(Lane.DotsLeft),
|
||||||
listOf(),
|
setOf(),
|
||||||
intArrayOf(2, 128, 0),
|
intArrayOf(2, 128, 0),
|
||||||
intArrayOf(16, 123, 9, 3, 0, 0, 0, 85, 21, 2, 128, 0, 141, 16, 3)
|
intArrayOf(16, 123, 9, 3, 0, 0, 0, 85, 21, 2, 128, 0, 141, 16, 3)
|
||||||
)
|
)
|
||||||
|
@ -51,14 +51,14 @@ class GarminMapperTest {
|
||||||
intArrayOf(16, 123, 9, 3, 0, 0, 0, 85, 21, 2, 64, 2, 203, 16, 3)
|
intArrayOf(16, 123, 9, 3, 0, 0, 0, 85, 21, 2, 64, 2, 203, 16, 3)
|
||||||
)
|
)
|
||||||
linesTest(
|
linesTest(
|
||||||
listOf(Lane.DotsRight),
|
setOf(Lane.DotsRight),
|
||||||
listOf(Lane.OuterRight, Lane.MiddleRight, Lane.InnerRight, Lane.InnerLeft, Lane.MiddleLeft, Lane.OuterLeft),
|
setOf(Lane.OuterRight, Lane.MiddleRight, Lane.InnerRight, Lane.InnerLeft, Lane.MiddleLeft, Lane.OuterLeft),
|
||||||
intArrayOf(2, 1, 126),
|
intArrayOf(2, 1, 126),
|
||||||
intArrayOf(16, 123, 9, 3, 0, 0, 0, 85, 21, 2, 1, 126, 142, 16, 3)
|
intArrayOf(16, 123, 9, 3, 0, 0, 0, 85, 21, 2, 1, 126, 142, 16, 3)
|
||||||
)
|
)
|
||||||
linesTest(
|
linesTest(
|
||||||
listOf(),
|
setOf(),
|
||||||
listOf(),
|
setOf(),
|
||||||
intArrayOf(2, 0, 0),
|
intArrayOf(2, 0, 0),
|
||||||
intArrayOf(16, 123, 9, 3, 0, 0, 0, 85, 21, 2, 0, 0, 13, 16, 3)
|
intArrayOf(16, 123, 9, 3, 0, 0, 0, 85, 21, 2, 0, 0, 13, 16, 3)
|
||||||
)
|
)
|
||||||
|
@ -249,10 +249,10 @@ class GarminMapperTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun linesTest(outlines: Lane, arrows: Lane, expectedRaw: IntArray, expectedBoxed: IntArray) {
|
private fun linesTest(outlines: Lane, arrows: Lane, expectedRaw: IntArray, expectedBoxed: IntArray) {
|
||||||
linesTest(listOf(outlines), listOf(arrows), expectedRaw, expectedBoxed)
|
linesTest(setOf(outlines), setOf(arrows), expectedRaw, expectedBoxed)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun linesTest(outlines: List<Lane>, arrows: List<Lane>, expectedRaw: IntArray, expectedBoxed: IntArray) {
|
private fun linesTest(outlines: Set<Lane>, arrows: Set<Lane>, expectedRaw: IntArray, expectedBoxed: IntArray) {
|
||||||
val lanes = Lanes(Arrows(arrows), Arrows(outlines))
|
val lanes = Lanes(Arrows(arrows), Arrows(outlines))
|
||||||
makeAssertions(GarminMapper.map(lanes), expectedRaw, expectedBoxed)
|
makeAssertions(GarminMapper.map(lanes), expectedRaw, expectedBoxed)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue