|
3 | 3 | import static org.junit.jupiter.api.Assertions.assertArrayEquals; |
4 | 4 | import static org.junit.jupiter.api.Assertions.assertEquals; |
5 | 5 | import static org.junit.jupiter.api.Assertions.assertFalse; |
6 | | -import static org.junit.jupiter.api.Assertions.assertNotNull; |
7 | 6 | import static org.junit.jupiter.api.Assertions.assertNull; |
8 | 7 | import static org.junit.jupiter.api.Assertions.assertTrue; |
9 | 8 | import static org.opentripplanner.street.model.StreetTraversalPermission.ALL; |
10 | 9 | import static org.opentripplanner.street.model._data.StreetModelForTest.intersectionVertex; |
11 | 10 | import static org.opentripplanner.street.model._data.StreetModelForTest.streetEdge; |
12 | 11 | import static org.opentripplanner.street.model._data.StreetModelForTest.streetEdgeBuilder; |
13 | 12 |
|
14 | | -import java.time.Instant; |
15 | 13 | import org.junit.jupiter.api.BeforeEach; |
16 | 14 | import org.junit.jupiter.api.Test; |
17 | 15 | import org.locationtech.jts.geom.Coordinate; |
|
25 | 23 | import org.opentripplanner.routing.util.ElevationUtils; |
26 | 24 | import org.opentripplanner.routing.util.SlopeCosts; |
27 | 25 | import org.opentripplanner.street.model.StreetTraversalPermission; |
28 | | -import org.opentripplanner.street.model.TurnRestriction; |
29 | 26 | import org.opentripplanner.street.model._data.StreetModelForTest; |
30 | 27 | import org.opentripplanner.street.model.vertex.IntersectionVertex; |
31 | 28 | import org.opentripplanner.street.model.vertex.LabelledIntersectionVertex; |
|
35 | 32 | import org.opentripplanner.street.search.request.StreetSearchRequest; |
36 | 33 | import org.opentripplanner.street.search.request.StreetSearchRequestBuilder; |
37 | 34 | import org.opentripplanner.street.search.state.State; |
38 | | -import org.opentripplanner.street.search.state.StateData; |
39 | 35 |
|
40 | 36 | public class StreetEdgeTest { |
41 | 37 |
|
@@ -68,15 +64,15 @@ void testInAndOutAngles() { |
68 | 64 | StreetEdge e1 = streetEdge(v1, v2, 1.0, ALL); |
69 | 65 |
|
70 | 66 | // Edge has same first and last angle. |
71 | | - assertEquals(90, e1.getInAngle()); |
72 | | - assertEquals(90, e1.getOutAngle()); |
| 67 | + assertEquals(-90, e1.getInAngle()); |
| 68 | + assertEquals(-90, e1.getOutAngle()); |
73 | 69 |
|
74 | 70 | // 2 new ones |
75 | 71 | StreetVertex u = intersectionVertex("test1", 1.0, 2.0); |
76 | 72 | StreetVertex v = intersectionVertex("test2", 2.0, 2.0); |
77 | 73 |
|
78 | | - // Second edge, heading straight North |
79 | | - StreetEdge e2 = streetEdge(u, v, 1.0, ALL); |
| 74 | + // Second edge, heading straight South |
| 75 | + StreetEdge e2 = streetEdge(v, u, 1.0, ALL); |
80 | 76 |
|
81 | 77 | // 180 degrees could be expressed as 180 or -180. Our implementation happens to use -180. |
82 | 78 | assertEquals(180, Math.abs(e2.getInAngle())); |
|
0 commit comments