diff --git a/hgeometry/data/test-with-ipe/LineSegment/Intersection/open_bug.ipe b/hgeometry/data/test-with-ipe/LineSegment/Intersection/open_bug.ipe index 42261ec1d..c56b348bf 100644 --- a/hgeometry/data/test-with-ipe/LineSegment/Intersection/open_bug.ipe +++ b/hgeometry/data/test-with-ipe/LineSegment/Intersection/open_bug.ipe @@ -1,7 +1,7 @@ - + diff --git a/hgeometry/kernel/test/HGeometry/LineSegmentSpec.hs b/hgeometry/kernel/test/HGeometry/LineSegmentSpec.hs index 173ac0ba0..c35a23182 100644 --- a/hgeometry/kernel/test/HGeometry/LineSegmentSpec.hs +++ b/hgeometry/kernel/test/HGeometry/LineSegmentSpec.hs @@ -216,6 +216,16 @@ testI = describe "some manual intersection tests" $ do it "manual intersection 24" $ (test2 `intersects` test4 ) `shouldBe` True it "manual intersection 25" $ (test2 `intersects` test5 ) `shouldBe` False + it "contained open segments" $ + let + segA, segB, answ :: OpenLineSegment (Point 2 R) + segA = OpenLineSegment (Point2 48 56) (Point2 14 0) + segB = OpenLineSegment (Point2 48 56) (Point2 31 28) + answ = OpenLineSegment (Point2 31 28) (Point2 48 56) + in segA `intersect` segB + `shouldBe` + Just (LineSegment_x_LineSegment_LineSegment answ) + -- it "bug 12" $ -- let -- l1 = supportingLine test1