Skip to content

Commit 451a87d

Browse files
committed
test: add testcases where the line is parallel to the Y-axis
1 parent ab59a23 commit 451a87d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Spatial.Tests/Euclidean/Circle2DTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,18 @@ public void CircleFromThreePointsArgumentException()
6060
Assert.Throws<ArgumentException>(() => { Circle2D.FromPoints(p1, p2, p3); });
6161
}
6262

63+
//parallel to the X-axis
6364
[TestCase("0,0", 1, "-10,+10", "+10,+10", "empty")]
6465
[TestCase("0,0", 1, "-10,+1", "+10,+1", "0,+1")]
6566
[TestCase("0,0", 1, "-10,0", "+10,0", "-1,0;+1,0")]
6667
[TestCase("0,0", 1, "-10,-1", "+10,-1", "0,-1" )]
6768
[TestCase("0,0", 1, "-10,-10", "+10,-10", "empty")]
69+
//parallel to the Y-axis
70+
[TestCase("0,0", 1, "-10,-10", "-10,+10", "empty")]
71+
[TestCase("0,0", 1, "-1,-10", "-1,+10", "-1,0")]
72+
[TestCase("0,0", 1, "0,-10", "0,+10", "0,-1;0,+1")]
73+
[TestCase("0,0", 1, "+1,-10", "+1,+10", "+1,0")]
74+
[TestCase("0,0", 1, "+10,-10", "+10,+10", "empty")]
6875
public void CircleIntersectWithLine2D_NumberOfIntersections(string sc, double radius, string sps, string spe, string expectedIntersectionsAsString)
6976
{
7077
var circle = new Circle2D(Point2D.Parse(sc), radius);

0 commit comments

Comments
 (0)