aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/test
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-07 18:38:56 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-07 18:38:56 +0000
commit1e0edabcca97b60371d84879ad69f569eb9127f5 (patch)
tree2357bdf40cbd3f605b591ececda6bf2785738f09 /c_compiler/test
parent81c4d63a74dd2c6d7395d2d1aeae93fbd22d4b16 (diff)
parentb810b59783a3dd32837fe4c458229cc771bd6877 (diff)
downloadCompiler-1e0edabcca97b60371d84879ad69f569eb9127f5.tar.gz
Compiler-1e0edabcca97b60371d84879ad69f569eb9127f5.zip
Merge branch 'master' into compiler
Diffstat (limited to 'c_compiler/test')
-rw-r--r--c_compiler/test/.gitignore2
-rw-r--r--c_compiler/test/in/02.c4
-rw-r--r--c_compiler/test/in/03.c5
-rw-r--r--c_compiler/test/in/04.c9
-rw-r--r--c_compiler/test/out/01.diff.txt0
-rw-r--r--c_compiler/test/out/01.pretty.xml1
-rw-r--r--c_compiler/test/out/01.stderr.txt1
-rw-r--r--c_compiler/test/out/01.stdout.s0
-rw-r--r--c_compiler/test/out/01.stdout.xml0
-rwxr-xr-xc_compiler/test/ref/01bin2929088 -> 0 bytes
-rw-r--r--c_compiler/test/ref/01.s38
11 files changed, 20 insertions, 40 deletions
diff --git a/c_compiler/test/.gitignore b/c_compiler/test/.gitignore
new file mode 100644
index 0000000..9ff5da3
--- /dev/null
+++ b/c_compiler/test/.gitignore
@@ -0,0 +1,2 @@
+out/
+ref/
diff --git a/c_compiler/test/in/02.c b/c_compiler/test/in/02.c
new file mode 100644
index 0000000..95c954c
--- /dev/null
+++ b/c_compiler/test/in/02.c
@@ -0,0 +1,4 @@
+int main() {
+ int x = 26;
+ return x;
+}
diff --git a/c_compiler/test/in/03.c b/c_compiler/test/in/03.c
new file mode 100644
index 0000000..911f7e2
--- /dev/null
+++ b/c_compiler/test/in/03.c
@@ -0,0 +1,5 @@
+int main() {
+ int x;
+ x = 15;
+ return x;
+}
diff --git a/c_compiler/test/in/04.c b/c_compiler/test/in/04.c
new file mode 100644
index 0000000..57cf697
--- /dev/null
+++ b/c_compiler/test/in/04.c
@@ -0,0 +1,9 @@
+int main() {
+ int a = 3;
+ int b = 5;
+ return a + b;
+}
+
+int f(int a, int v) {
+ return a + v;
+}
diff --git a/c_compiler/test/out/01.diff.txt b/c_compiler/test/out/01.diff.txt
deleted file mode 100644
index e69de29..0000000
--- a/c_compiler/test/out/01.diff.txt
+++ /dev/null
diff --git a/c_compiler/test/out/01.pretty.xml b/c_compiler/test/out/01.pretty.xml
deleted file mode 100644
index 8b13789..0000000
--- a/c_compiler/test/out/01.pretty.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/c_compiler/test/out/01.stderr.txt b/c_compiler/test/out/01.stderr.txt
deleted file mode 100644
index 37006dc..0000000
--- a/c_compiler/test/out/01.stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-./test_compiler.sh: line 28: ./bin/c_compiler: No such file or directory
diff --git a/c_compiler/test/out/01.stdout.s b/c_compiler/test/out/01.stdout.s
deleted file mode 100644
index e69de29..0000000
--- a/c_compiler/test/out/01.stdout.s
+++ /dev/null
diff --git a/c_compiler/test/out/01.stdout.xml b/c_compiler/test/out/01.stdout.xml
deleted file mode 100644
index e69de29..0000000
--- a/c_compiler/test/out/01.stdout.xml
+++ /dev/null
diff --git a/c_compiler/test/ref/01 b/c_compiler/test/ref/01
deleted file mode 100755
index 9655601..0000000
--- a/c_compiler/test/ref/01
+++ /dev/null
Binary files differ
diff --git a/c_compiler/test/ref/01.s b/c_compiler/test/ref/01.s
deleted file mode 100644
index db5d0b4..0000000
--- a/c_compiler/test/ref/01.s
+++ /dev/null
@@ -1,38 +0,0 @@
- .file 1 "01.c"
- .section .mdebug.abi32
- .previous
- .nan legacy
- .module fp=xx
- .module nooddspreg
- .abicalls
- .option pic0
- .text
- .align 2
- .globl main
- .set nomips16
- .set nomicromips
- .ent main
- .type main, @function
-main:
- .frame $fp,24,$31 # vars= 8, regs= 1/0, args= 0, gp= 8
- .mask 0x40000000,-4
- .fmask 0x00000000,0
- .set noreorder
- .set nomacro
- addiu $sp,$sp,-24
- sw $fp,20($sp)
- move $fp,$sp
- li $2,13 # 0xd
- sw $2,8($fp)
- lw $2,8($fp)
- move $sp,$fp
- lw $fp,20($sp)
- addiu $sp,$sp,24
- jr $31
- nop
-
- .set macro
- .set reorder
- .end main
- .size main, .-main
- .ident "GCC: (Codescape GNU Tools 2016.05-03 for MIPS MTI Linux) 4.9.2"