summaryrefslogtreecommitdiffstats
path: root/ue4/mycpu/test
diff options
context:
space:
mode:
authormanuel <manuel@nc8430.lan>2009-05-28 19:22:52 +0200
committermanuel <manuel@nc8430.lan>2009-05-28 19:22:52 +0200
commitf67834dd18859ed333c88360f4141a99dc7db5dd (patch)
treef668d395e258ce9601ddde380b85e9369265dedb /ue4/mycpu/test
parent064eaaed391835d0e0d057466f6f552e43e79bd8 (diff)
downloadooprog-f67834dd18859ed333c88360f4141a99dc7db5dd.tar.gz
ooprog-f67834dd18859ed333c88360f4141a99dc7db5dd.tar.bz2
ooprog-f67834dd18859ed333c88360f4141a99dc7db5dd.zip
push for me
Diffstat (limited to 'ue4/mycpu/test')
-rwxr-xr-xue4/mycpu/test/test.sh11
-rw-r--r--ue4/mycpu/test/test1_args1
-rw-r--r--ue4/mycpu/test/test2_args1
-rw-r--r--ue4/mycpu/test/test2_memory1
-rw-r--r--ue4/mycpu/test/test2_output19
-rw-r--r--ue4/mycpu/test/test2_program13
-rw-r--r--ue4/mycpu/test/test3_args1
-rw-r--r--ue4/mycpu/test/test3_memory1
-rw-r--r--ue4/mycpu/test/test3_output21
-rw-r--r--ue4/mycpu/test/test3_program13
10 files changed, 80 insertions, 2 deletions
diff --git a/ue4/mycpu/test/test.sh b/ue4/mycpu/test/test.sh
index ff1076c..43ddb9a 100755
--- a/ue4/mycpu/test/test.sh
+++ b/ue4/mycpu/test/test.sh
@@ -10,13 +10,20 @@ do
10 10
11 programfile="$input" 11 programfile="$input"
12 args="-c $programfile" 12 args="-c $programfile"
13 argsfile="${input/_program/_args}"
13 memoryfile="${input/_program/_memory}" 14 memoryfile="${input/_program/_memory}"
14 reffile="${input/_program/_output}" 15 reffile="${input/_program/_output}"
15 if [ -e "$memoryfile" ] 16
17 if [ ! -e "$argsfile" ]
16 then 18 then
17 args+=" -m $memoryfile" 19 echo " ERROR: argsfile $argsfile doesn't exist"
20 exit 1
18 fi 21 fi
19 22
23 args=$(cat "$argsfile")
24 args=${args/\#program\#/$input}
25 args=${args/\#memory\#/$memoryfile}
26
20 if [ ! -e "$reffile" ] 27 if [ ! -e "$reffile" ]
21 then 28 then
22 echo " ERROR: reference file $reffile doesn't exist" 29 echo " ERROR: reference file $reffile doesn't exist"
diff --git a/ue4/mycpu/test/test1_args b/ue4/mycpu/test/test1_args
new file mode 100644
index 0000000..c494f4e
--- /dev/null
+++ b/ue4/mycpu/test/test1_args
@@ -0,0 +1 @@
-c #program# -m #memory#
diff --git a/ue4/mycpu/test/test2_args b/ue4/mycpu/test/test2_args
new file mode 100644
index 0000000..1ef5766
--- /dev/null
+++ b/ue4/mycpu/test/test2_args
@@ -0,0 +1 @@
-f s -c #program# -m #memory#
diff --git a/ue4/mycpu/test/test2_memory b/ue4/mycpu/test/test2_memory
new file mode 100644
index 0000000..bd9648e
--- /dev/null
+++ b/ue4/mycpu/test/test2_memory
@@ -0,0 +1 @@
oooooooooooooooooooo
diff --git a/ue4/mycpu/test/test2_output b/ue4/mycpu/test/test2_output
new file mode 100644
index 0000000..ac30dc2
--- /dev/null
+++ b/ue4/mycpu/test/test2_output
@@ -0,0 +1,19 @@
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
1515
1616
1717
1818
1919
diff --git a/ue4/mycpu/test/test2_program b/ue4/mycpu/test/test2_program
new file mode 100644
index 0000000..ae5e9d2
--- /dev/null
+++ b/ue4/mycpu/test/test2_program
@@ -0,0 +1,13 @@
1# set R2 = 10
2LOAD R2, R1
3
4# start of loop
5label Loop:
6inc R3
7sub R4, R3, R2
8test R4
9jumpz EndLoop
10write WDEZ, R3
11jumpa Loop
12
13label EndLoop:
diff --git a/ue4/mycpu/test/test3_args b/ue4/mycpu/test/test3_args
new file mode 100644
index 0000000..098d137
--- /dev/null
+++ b/ue4/mycpu/test/test3_args
@@ -0,0 +1 @@
-f 5 -c #program# -m #memory#
diff --git a/ue4/mycpu/test/test3_memory b/ue4/mycpu/test/test3_memory
new file mode 100644
index 0000000..fa8f08c
--- /dev/null
+++ b/ue4/mycpu/test/test3_memory
@@ -0,0 +1 @@
150
diff --git a/ue4/mycpu/test/test3_output b/ue4/mycpu/test/test3_output
new file mode 100644
index 0000000..d4de868
--- /dev/null
+++ b/ue4/mycpu/test/test3_output
@@ -0,0 +1,21 @@
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
1515
1616
1717
1818
1919
2020
2121
diff --git a/ue4/mycpu/test/test3_program b/ue4/mycpu/test/test3_program
new file mode 100644
index 0000000..ae5e9d2
--- /dev/null
+++ b/ue4/mycpu/test/test3_program
@@ -0,0 +1,13 @@
1# set R2 = 10
2LOAD R2, R1
3
4# start of loop
5label Loop:
6inc R3
7sub R4, R3, R2
8test R4
9jumpz EndLoop
10write WDEZ, R3
11jumpa Loop
12
13label EndLoop: