Skip to content

Commit

Permalink
Add another failing case
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbrooks committed Jan 18, 2025
1 parent a97c0c8 commit 581bb90
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,38 @@ class ParserTests {
)
}

@Test
fun testMultipleArcParametersWithoutCommaBetweenFlags() {
val pathCommandString = "M1,1 A 1,1,0,01,3,3 2,2,0,10,4,4"

val commands = CommandString(pathCommandString).toCommandList()

assertThat(commands).containsExactly(
moveToSingle,
EllipticalArcCurve(
CommandVariant.ABSOLUTE,
listOf(
EllipticalArcCurve.Parameter(
1f,
1f,
0f,
EllipticalArcCurve.ArcFlag.SMALL,
EllipticalArcCurve.SweepFlag.CLOCKWISE,
Point(3f, 3f),
),
EllipticalArcCurve.Parameter(
2f,
2f,
0f,
EllipticalArcCurve.ArcFlag.LARGE,
EllipticalArcCurve.SweepFlag.ANTICLOCKWISE,
Point(4f, 4f),
),
),
),
)
}

@Test
fun testParseRelativeCommandString() {
val pathCommandString = "l2 5"
Expand Down

0 comments on commit 581bb90

Please sign in to comment.