Add testcase for put train around switches

This commit is contained in:
Arne Keller 2020-03-05 21:12:44 +01:00
parent 802c5deef5
commit 9d057dfde0
2 changed files with 107 additions and 0 deletions

54
spt_input.txt Normal file
View File

@ -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

53
spt_output.txt Normal file
View File

@ -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