]> rtime.felk.cvut.cz Git - hubacji1/psp.git/commitdiff
Reorder tests
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 24 Jul 2019 06:14:04 +0000 (08:14 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 24 Jul 2019 09:41:32 +0000 (11:41 +0200)
ut/psp.t.cc

index 13bfde772ce8f06e88eaf6831952d6576a6c2de2..04118e2e60d255c77f0b76fc326ca81c89fee515 100644 (file)
@@ -35,18 +35,7 @@ WVTEST_MAIN("parallel parking slot planner")
         WVPASS(inside(psp.gc().rrx(), psp.gc().rry(), slot));
         WVPASS(inside(psp.gc().rfx(), psp.gc().rfy(), slot));
 
-        // entry point found by reverse
-        WVPASS(!psp.left());
-        psp.fer();
-        WVPASS(psp.left());
-
-        // find entry
-        psp.cc() = BicycleCar(psp.gc());
-        WVPASS(!psp.left());
-        psp.fe();
-        WVPASS(psp.left());
-
-        // collide
+        // init collide
         auto tmpi1 = intersect(1, 1, 3, 3, 1, 3, 3, 1);
         WVPASS(std::get<0>(tmpi1));
         WVPASSEQ_DOUBLE(std::get<1>(tmpi1), 2, 0.00001);
@@ -61,6 +50,17 @@ WVTEST_MAIN("parallel parking slot planner")
         WVPASS(!tpsp.left());
         tpsp.ps().border(3, 4.1, 3, 2.1, 8, 2.1, 8, 4.1);
         WVPASS(tpsp.left());
+
+        // entry point found by reverse
+        WVPASS(!psp.left());
+        psp.fer();
+        WVPASS(psp.left());
+
+        // find entry
+        psp.cc() = BicycleCar(psp.gc());
+        WVPASS(!psp.left());
+        psp.fe();
+        WVPASS(psp.left());
 }
 
 WVTEST_MAIN("backward perpendicullar parking slot planner")