From 9d057dfde0eb2357a9b05c50cdb4042446ee47d2 Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Thu, 5 Mar 2020 21:12:44 +0100 Subject: [PATCH] Add testcase for put train around switches --- spt_input.txt | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ spt_output.txt | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 spt_input.txt create mode 100644 spt_output.txt diff --git a/spt_input.txt b/spt_input.txt new file mode 100644 index 0000000..0e88994 --- /dev/null +++ b/spt_input.txt @@ -0,0 +1,54 @@ +create engine steam inconsistent max 1 true true +add train 1 inconsistent-max +add switch (0,0) -> (-5,0),(0,5) +set switch 1 position (0,5) +put train 1 at (0,0) in direction 0,1 +put train 1 at (0,0) in direction 1,0 +put train 1 at (0,0) in direction 0,-1 +step 1 +put train 1 at (0,0) in direction -1,0 +step 1 +add track (0,0) -> (5,0) +put train 1 at (0,0) in direction 0,1 +step 6 +put train 1 at (0,0) in direction 0,-1 +step 6 +put train 1 at (0,0) in direction 1,0 +step 6 +put train 1 at (0,0) in direction -1,0 +step 6 +delete track 2 +add track (0,0) -> (0,-5) +put train 1 at (0,0) in direction 1,0 +put train 1 at (0,0) in direction 0,1 +step 6 +put train 1 at (0,0) in direction 0,-1 +step 6 +delete track 2 +add switch (0,0) -> (5,0),(0,-5) +set switch 2 position (5,0) +put train 1 at (0,0) in direction 0,1 +step 6 +put train 1 at (0,0) in direction 0,-1 +step 6 +put train 1 at (0,0) in direction 1,0 +step 6 +put train 1 at (0,0) in direction -1,0 +step 6 +set switch 2 position (0,-5) +put train 1 at (0,0) in direction 0,1 +step 6 +put train 1 at (0,0) in direction 0,-1 +step 6 +delete track 1 +delete track 2 +add switch (5,0) -> (0,0),(5,5) +set switch 1 position (5,5) +add track (0,0) -> (0,-5) +put train 1 at (0,0) in direction 0,-1 +put train 1 at (0,0) in direction -1,0 +put train 1 at (0,0) in direction 0,1 +step 1 +put train 1 at (0,0) in direction 1,0 +step 1 +exit diff --git a/spt_output.txt b/spt_output.txt new file mode 100644 index 0000000..1769d31 --- /dev/null +++ b/spt_output.txt @@ -0,0 +1,53 @@ +inconsistent-max +steam engine inconsistent-max added to train 1 +1 +OK +Error, could not place train +Error, could not place train +OK +Crash of train 1 +OK +Crash of train 1 +2 +OK +Crash of train 1 +OK +Crash of train 1 +OK +Crash of train 1 +OK +Crash of train 1 +OK +2 +Error, could not place train +OK +Crash of train 1 +OK +Crash of train 1 +OK +2 +OK +OK +Crash of train 1 +OK +Crash of train 1 +OK +Crash of train 1 +OK +Crash of train 1 +OK +OK +Crash of train 1 +OK +Crash of train 1 +OK +OK +1 +OK +2 +Error, could not place train +Error, could not place train +OK +Crash of train 1 +OK +Crash of train 1