Add examples

This commit is contained in:
Arne Keller 2020-02-15 15:25:18 +01:00
parent 16eae42fa3
commit 2267b3c5de
26 changed files with 671 additions and 0 deletions

23
basics_input.txt Normal file
View File

@ -0,0 +1,23 @@
add track (0,0) -> (-5,0)
add track (-5,0) -> (-5,5)
add switch (0,5) -> (0,0),(-5,5)
list tracks
set switch 3 position (0,0)
list tracks
add track (0,0) -> (5,0)
create train-set A B 6 true true
add train 1 A-B
put train 1 at (0,5) in direction 0,1
step 1
put train 1 at (-5,5) in direction 0,3
step 1
delete train 1
delete rolling stock A-B
create engine steam T1 Alpha 1 false false
create engine electrical T1 Beta 1 false false
add train 1 T1-Alpha
add train 2 T1-Beta
put train 1 at (0,5) in direction 0,1
put train 2 at (0,0) in direction 1,0
step 1
exit

26
basics_output.txt Normal file
View File

@ -0,0 +1,26 @@
1
2
3
t 1 (0,0) -> (-5,0) 5
t 2 (-5,0) -> (-5,5) 5
s 3 (0,5) -> (0,0),(-5,5)
OK
t 1 (0,0) -> (-5,0) 5
t 2 (-5,0) -> (-5,5) 5
s 3 (0,5) -> (0,0),(-5,5) 5
Error, track is not connected to other tracks
A-B
train-set A-B added to train 1
OK
Crash of train 1
OK
Crash of train 1
OK
OK
T1-Alpha
T1-Beta
steam engine T1-Alpha added to train 1
electrical engine T1-Beta added to train 2
OK
OK
Crash of train 1,2

64
example1ONLYoutput.txt Normal file
View File

@ -0,0 +1,64 @@
1
Error, track is not connected to other tracks
t 1 (1,1) -> (5,1) 4
2
Error, invalid track segment: not a straight line
3
4
5
6
7
8
9
10
T3-Emma
none s T3 Emma 1 false true
103-118
none e 103 118 3 true true
none s T3 Emma 1 false true
Error, could not delete rolling stock
OK
1
2
1 none p 1 true true
2 none p 1 true true
passenger coach W1 added to train 1
1 W1
____________________
| ___ ___ ___ ___ |
| |_| |_| |_| |_| |
|__________________|
|__________________|
(O) (O)
OK
No train exists
steam engine T3-Emma added to train 1
passenger coach W1 added to train 1
passenger coach W2 added to train 1
1 T3-Emma W1 W2
++ +------ ____________________ ____________________
|| |+-+ | | ___ ___ ___ ___ | | ___ ___ ___ ___ |
/---------|| | | | |_| |_| |_| |_| | | |_| |_| |_| |_| |
+ ======== +-+ | |__________________| |__________________|
_|--/~\------/~\-+ |__________________| |__________________|
//// \_/ \_/ (O) (O) (O) (O)
1 s T3 Emma 1 false true
403-145
train-set 403-145 added to train 2
OK
Error, rail tracks/switches not set up
OK
OK
OK
OK
OK
Train 1 at (3,1)
Train 2 at (10,0)
Train 1 at (1,1)
Train 2 at (10,-2)
Train 1 at (3,1)
Train 2 at (10,0)
Train 1 at (6,1)
Train 2 at (8,1)
Crash of train 1,2
OK

51
example1input.txt Normal file
View File

@ -0,0 +1,51 @@
add track (1,1) -> (5,1)
add track (10,10) -> (10,11)
list tracks
add switch (5,1) -> (8,1),(5,3)
add track (5,3) -> (8,1)
add track (10,1) -> (8,1)
add switch (10,-3) -> (10,1),(12,-3)
add track (10,-3) -> (1,-3)
add track (1,-3) -> (1,1)
add track (5,3) -> (10,3)
add track (10,3) -> (12,3)
add switch (12,3) -> (12,-3),(14,3)
add track (14,-1) -> (14,3)
create engine steam T3 Emma 1 false true
list engines
create engine electrical 103 118 3 true true
list engines
delete rolling stock 3
delete rolling stock 103-118
create coach passenger 1 true true
create coach passenger 1 true true
list coaches
add train 1 W1
list trains
show train 01
delete train 1
list trains
add train 1 T3-Emma
add train 1 W1
add train 1 W2
list trains
show train 01
list engines
create train-set 403 145 4 true true
add train 2 403-145
set switch 4 position (10,1)
step 1
set switch 2 position (8,1)
set switch 9 position (12,-3)
step 1
put train 1 at (1,1) in direction 1,0
put train 2 at (10,-2) in direction 0,1
step 2
step -2
step 2
step 3
step 1
put train 1 at (1,1) in direction 0,-1
exit
quit

108
example1output.txt Normal file
View File

@ -0,0 +1,108 @@
> add track (1,1) -> (5,1)
1
> add track (10,10) -> (10,11)
Error, track not connected to other track
> list tracks
t 1 (1,1) -> (5,1) 4
> add switch (5,1) -> (8,1),(5,3)
2
> add track (5,3) -> (8,1)
Error, creation not possible wrong position
> add track (10,1) -> (8,1)
3
> add switch (10,-3) -> (10,1),(12,-3)
4
> add track (10,-3) -> (1,-3)
5
> add track (1,-3) -> (1,1)
6
> add track (5,3) -> (10,3)
7
> add track (10,3) -> (12,3)
8
>add switch (12,3) -> (12,-3),(14,3)
9
>add track (14,-1) -> (14,3)
10
> create engine steam T3 Emma 1 false true
T3-Emma
> list engines
none s T3 Emma 1 false true
> create engine electrical 103 118 3 true true
103-118
> list engines
none e 103 118 3 true true
none s T3 Emma 1 false true
> delete rolling stock 3
Error, rolling stock with ID 03 not found
> delete rolling stock 103-118
OK
> create coach passenger 1 true true
1
> create coach passenger 1 true true
2
> list coaches
1 none p 1 true true
2 none p 1 true true
> add train 1 W1
passenger coach W1 added to train 1
> list trains
1 W1
> show train 01
____________________
| ___ ___ ___ ___ |
| |_| |_| |_| |_| |
|__________________|
|__________________|
(O) (O)
> delete train 1
OK
> list trains
No train exists
> add train 1 T3-Emma
steam engine T3-Emma added to train 1
> add train 1 W1
passenger coach W1 added to train 1
> add train 1 W2
passenger coach W2 added to train 1
> list trains
1 T3-Emma W1 W2
> show train 01
+++------ ____________________ ____________________|||+-+ | | ___ ___ ___ ___ | | ___ ___ ___ ___ |/---------|| | | | |_| |_| |_| |_| | | |_| |_| |_| |_| |+ ======== +-+ | |__________________| |__________________|_|--/~\------/~\-+ |__________________| |__________________|//// \_/\_/(O)(O)(O)(O)
> list engines
1 s T3 Emma 1 false true
> create train-set 403 145 4 true true
403-145
> add train 2 403-145
train-set 403-145 added to train 2
> set switch 4 position (10,1)
OK
> step 1
Error, position of switches not set
> set switch 2 position (8,1)
OK
> set switch 9 position (12,-3)
OK
> step 1
OK
> put train 1 at (1,1) in direction 1,0
OK
> put train 2 at (10,-2) in direction 0,1
OK
> step 2
Train 1 at (3,1)
Train 2 at (10,0)
> step -2
Train 1 at (1,1)
Train 2 at (10,-2)
> step 2
Train 1 at (3,1)
Train 2 at (10,0)
> step 3
Train 1 at (6,1)
Train 2 at (8,1)
> step 1
Crash of train 1,2
> put train 1 at (1,1) in direction 0,-1
OK
> exit

59
example2.txt Normal file
View File

@ -0,0 +1,59 @@
> step 32768
<e
> add track (2147483647,0) -> (-2147483648,0)
1
> add track (2147483648,0) -> (-2147483649,0)
<e
> delete track 2147483648
<e
> create engine diesel W aaa 32 true false
<e
> delete track 1
OK
> list tracks
No track exists
> add track (-5,0) -> (0,0)
1
> add track (0,0) -> (5,0)
2
> create engine diesel Reihe1 Name1 3 true true
Reihe1-Name1
> create train-set Reihe2 Name2 2 true true
Reihe2-Name2
> create train-set Reihe3 Name3 3 true true
Reihe3-Name3
> add train 1 Reihe2-Name2
train-set Reihe2-Name2 added to train 1
> add train 1 Reihe3-Name3
<e
> add train 2 Reihe1-Name1
diesel engine Reihe1-Name1 added to train 2
> add train 2 Reihe1-Name1
<e
> add train 2 Reihe3-Name3
<e
> create engine electrical Reihe1 Name4 11 true true
Reihe1-Name4
> add train 3 Reihe1-Name4
electrical engine Reihe1-Name4 added to train 3
> put train 3 at (0,0) in direction 1,0
<e
> delete train 3
OK
> delete train 3
<e
> put train 1 at (0,0) in direction 1,0
OK
> put train 2 at (0,0) in direction -1,0
OK
> step 1
Crash of train 1,2
> step 42
OK
> delete rolling stock Reihe1-Name1
<e
> delete train 2
OK
> delete rolling stock Reihe1-Name1
OK
> exit

31
example2input.txt Normal file
View File

@ -0,0 +1,31 @@
step 32768
add track (2147483647,0) -> (-2147483648,0)
add track (2147483648,0) -> (-2147483649,0)
delete track 2147483648
create engine diesel W aaa 32 true false
delete track 1
list tracks
add track (-5,0) -> (0,0)
add track (0,0) -> (5,0)
create engine diesel Reihe1 Name1 3 true true
create train-set Reihe2 Name2 2 true true
create train-set Reihe3 Name3 3 true true
add train 1 Reihe2-Name2
add train 1 Reihe3-Name3
add train 2 Reihe1-Name1
add train 2 Reihe1-Name1
add train 2 Reihe3-Name3
create engine electrical Reihe1 Name4 11 true true
add train 3 Reihe1-Name4
put train 3 at (0,0) in direction 1,0
delete train 3
delete train 3
put train 1 at (0,0) in direction 1,0
put train 2 at (0,0) in direction -1,0
step 1
step 42
delete rolling stock Reihe1-Name1
delete train 2
delete rolling stock Reihe1-Name1
exit

29
example2output.txt Normal file
View File

@ -0,0 +1,29 @@
Error, number too big
1
Error, number too big
Error, number too big
Error, invalid engine class/series
OK
No track exists
1
2
Reihe1-Name1
Reihe2-Name2
Reihe3-Name3
train-set Reihe2-Name2 added to train 1
Error, could not modify train
diesel engine Reihe1-Name1 added to train 2
Error, could not modify train
Error, could not modify train
Reihe1-Name4
electrical engine Reihe1-Name4 added to train 3
Error, could not place train
OK
Error, could not remove train
OK
Error, could not place train
Train 1 at (1,0)
Crash of train 1
Error, could not delete rolling stock
OK
OK

20
fuzz1_input.txt Normal file
View File

@ -0,0 +1,20 @@
add track (0,0) -> (0,14)
add track (0,340282366920938463463374607431768211457) -> (0,15)
add track (0,15) -> (1,15)
add track (1,1) -> (1,14)
add switch (1,14) -> (0,14),(1,0)
set switch 5 positio (1,0)
create engine diesel T3 Emma 1 false true
add train 1 T3-Emma
create coach passenger 1906 true true
create coach passenger 2 true false
create coach passenger 2 true true
add train 1 W1
add train 1 W2
add train 1 W3
put train 1 at (0,0) in direction 0,-1
step -20
step 20
set switch 5 position (0,14)
step -20
exit

19
fuzz1_output.txt Normal file
View File

@ -0,0 +1,19 @@
1
Error, number too big
Error, track is not connected to other tracks
Error, track is not connected to other tracks
2
Error, invalid set switch argument syntax
T3-Emma
diesel engine T3-Emma added to train 1
1
2
3
passenger coach W1 added to train 1
passenger coach W2 added to train 1
Error, could not modify train
Error, could not place train
Error, rail tracks/switches not set up
Error, rail tracks/switches not set up
Error, could not set switch
Error, rail tracks/switches not set up

2
fuzz2_input.txt Normal file
View File

@ -0,0 +1,2 @@
add train 1 W2147483649
exit

1
fuzz2_output.txt Normal file
View File

@ -0,0 +1 @@
Error, number too big

13
fuzz3_input.txt Normal file
View File

@ -0,0 +1,13 @@
add track (1,1) -> (5,1)
add track (1,-3) -> (1,1)
add switch (5,1) -> (8,1),(5,3)
create engine diesel T3 Emma 1 false true
create coach freight 2 true true
create coach special 3 true true
create coach passenger 2 true false
add train 1 T3-Emma
add train 1 W1
add train 1 W2
add train 1 W3
put train 1 at (1,1) in direction 0,-1
exit

12
fuzz3_output.txt Normal file
View File

@ -0,0 +1,12 @@
1
2
3
T3-Emma
1
2
3
diesel engine T3-Emma added to train 1
freight coach W1 added to train 1
special coach W2 added to train 1
passenger coach W3 added to train 1
Error, could not place train

19
fuzz4_input.txt Normal file
View File

@ -0,0 +1,19 @@
# create really small loop
add track (0,0) -> (0,0)
# create loop
add track (0,0) -> (2,0)
add track (2,0) -> (2,2)
add track (2,2) -> (0,2)
add track (0,2) -> (0,0)
# try to create 3-way
add track (0,0) -> (-2,0)
create engine diesel T3 Emma 1 false true
create coach passenger 2 true true
create coach passenger 3 true true
create coach passenger 138549970 true false
add train 1 T3-Emma
add train 1 W+1
add train 1 W2
add train 1 W3
put train 1 at (0,0) in direction 1,0
exit

15
fuzz4_output.txt Normal file
View File

@ -0,0 +1,15 @@
Error, track has length 0
1
2
3
4
Error, track is not connected to other tracks
T3-Emma
1
2
3
diesel engine T3-Emma added to train 1
passenger coach W1 added to train 1
passenger coach W2 added to train 1
passenger coach W3 added to train 1
Error, could not place train

16
fuzz5_input.txt Normal file
View File

@ -0,0 +1,16 @@
# create three rails
add track (0,2) -> (0,0)
add track (0,0) -> (0,-2)
add track (0,-2) -> (0,-4)
delete track 2
delete track 1
delete track 2
delete track 3
# try to delete track under train
add track (-5,0) -> (0,0)
add track (0,0) -> (5,0)
create engine diesel ABC DEF 1 true true
add train 1 ABC-DEF
put train 1 at (0,0) in direction 1,0
delete track 1
exit

13
fuzz5_output.txt Normal file
View File

@ -0,0 +1,13 @@
1
2
3
Error, could not delete rail segment
OK
OK
OK
1
2
ABC-DEF
diesel engine ABC-DEF added to train 1
OK
Error, could not delete rail segment

28
fuzz6_input.txt Normal file
View File

@ -0,0 +1,28 @@
add track (1,1) -> (5,1)
add switch (6,1) -> (8,1),(5,1)
add track (10,1) -> (8,1)
add switch (10,-3) -> (10,1),(12,-3)
add track (10,-3) -> (1,-3)
add track (1,-3) -> (1,1)
create engine steam T3 Emma 1 false true
create engine electrical 103 118 4294967300 true true
list engines
delete rolling stock 103-118
create coach passenger 1 true true
create coach passenger 1 true true
list coaches
add train 1 W1
delete train 1
list trains
add train 1 T3-Emma
add train 1 W1
add train 1 W2
list trains
list engines
create train-set 403 145 4 true true
set switch 4 position (10,1)
set switch 2 position (8,1)
put train 1 at (1,1) in direction 2,0
put train 2 at (10,-2) in direction 0,1
step 5
exit

28
fuzz6_output.txt Normal file
View File

@ -0,0 +1,28 @@
1
2
3
4
5
6
T3-Emma
Error, number too big
none s T3 Emma 1 false true
Error, could not delete rolling stock
1
2
1 none p 1 true true
2 none p 1 true true
passenger coach W1 added to train 1
OK
No train exists
steam engine T3-Emma added to train 1
passenger coach W1 added to train 1
passenger coach W2 added to train 1
1 T3-Emma W1 W2
1 s T3 Emma 1 false true
403-145
OK
OK
OK
Error, could not place train
Crash of train 1

21
loopyinput.txt Normal file
View File

@ -0,0 +1,21 @@
# create loop
add track (0,0) -> (2,0)
add track (2,0) -> (2,2)
add track (2,2) -> (0,2)
add track (0,2) -> (0,0)
create engine diesel T3 Emma 1 false true
create coach passenger 2 true true
create coach passenger 3 true true
create coach passenger 2 true false
add train 1 T3-Emma
add train 1 W1
add train 1 W2
add train 1 W3
show train 1
put train 1 at (0,0) in direction 1,0
step 64
delete track 1
delete track 2
delete track 3
delete track 4
exit

24
loopyoutput.txt Normal file
View File

@ -0,0 +1,24 @@
1
2
3
4
T3-Emma
1
2
3
diesel engine T3-Emma added to train 1
passenger coach W1 added to train 1
passenger coach W2 added to train 1
passenger coach W3 added to train 1
_____________|____ ____________________ ____________________ ____________________
/_| ____________ |_\ | ___ ___ ___ ___ | | ___ ___ ___ ___ | | ___ ___ ___ ___ |
/ |____________| \ | |_| |_| |_| |_| | | |_| |_| |_| |_| | | |_| |_| |_| |_| |
\ / |__________________| |__________________| |__________________|
\__________________/ |__________________| |__________________| |__________________|
(O)(O) (O)(O) (O) (O) (O) (O) (O) (O)
OK
Train 1 at (0,0)
Error, could not delete rail segment
Error, could not delete rail segment
Error, could not delete rail segment
Error, could not delete rail segment

View File

@ -0,0 +1,5 @@
add track (0,0) -> (0,14)
add track (0,14) -> (0,15)
add track (0,15) -> (1,15)
add track (1,15) -> (1,14)
add switch (1,14) -> (0,14),(1,0)

View File

@ -0,0 +1,20 @@
add track (0,0) -> (0,14)
add track (0,14) -> (0,15)
add track (0,15) -> (1,15)
add track (1,15) -> (1,14)
add switch (1,14) -> (0,14),(1,0)
set switch 5 position (1,0)
create engine diesel T3 Emma 1 false true
create coach passenger 2 true true
create coach passenger 3 true true
create coach passenger 2 true false
add train 1 T3-Emma
add train 1 W1
add train 1 W2
add train 1 W3
put train 1 at (0,0) in direction 0,-1
step -20
step 20
set switch 5 position (0,14)
step -20
exit

View File

@ -0,0 +1,19 @@
1
2
3
4
5
OK
T3-Emma
1
2
3
diesel engine T3-Emma added to train 1
passenger coach W1 added to train 1
passenger coach W2 added to train 1
passenger coach W3 added to train 1
OK
Train 1 at (1,11)
Train 1 at (0,0)
OK
Crash of train 1

View File

@ -0,0 +1,5 @@
1
2
3
4
Error, switch not connected to existing rails