diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-02-17 21:55:16 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-02-17 21:55:16 +0000 |
commit | 850f46eeb6de286d4b079373104af87e3aca781c (patch) | |
tree | 9f5f3c7b73d1447487030112c03c112ca85c7e55 /c_parser/test | |
parent | ce93fb7754f4565f70fe5572bd7d4a2c368ea9cd (diff) | |
download | Compiler-850f46eeb6de286d4b079373104af87e3aca781c.tar.gz Compiler-850f46eeb6de286d4b079373104af87e3aca781c.zip |
Finished functions completely, now moving on to statements
Diffstat (limited to 'c_parser/test')
-rw-r--r-- | c_parser/test/in/05.c | 3 | ||||
-rw-r--r-- | c_parser/test/in/06.c | 6 | ||||
-rw-r--r-- | c_parser/test/out/01.stdout.txt | 9 | ||||
-rw-r--r-- | c_parser/test/out/05.diff.txt | 0 | ||||
-rw-r--r-- | c_parser/test/out/05.stderr.txt | 0 | ||||
-rw-r--r-- | c_parser/test/out/05.stdout.xml | 11 | ||||
-rw-r--r-- | c_parser/test/out/06.diff.txt | 0 | ||||
-rw-r--r-- | c_parser/test/out/06.stderr.txt | 0 | ||||
-rw-r--r-- | c_parser/test/out/06.stdout.xml | 14 | ||||
-rw-r--r-- | c_parser/test/ref/05.stdout.xml | 11 | ||||
-rw-r--r-- | c_parser/test/ref/06.stdout.xml | 14 |
11 files changed, 68 insertions, 0 deletions
diff --git a/c_parser/test/in/05.c b/c_parser/test/in/05.c new file mode 100644 index 0000000..a5ac579 --- /dev/null +++ b/c_parser/test/in/05.c @@ -0,0 +1,3 @@ +int foo(int x, int y) { + {} +} diff --git a/c_parser/test/in/06.c b/c_parser/test/in/06.c new file mode 100644 index 0000000..f182bd9 --- /dev/null +++ b/c_parser/test/in/06.c @@ -0,0 +1,6 @@ +int f(int a, int b, int c) { + int d; + { + int e; + } +} diff --git a/c_parser/test/out/01.stdout.txt b/c_parser/test/out/01.stdout.txt new file mode 100644 index 0000000..bd7cd1f --- /dev/null +++ b/c_parser/test/out/01.stdout.txt @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<Program> +<Variable id="a" /> +<Variable id="b" /> +<Variable id="c" /> +<Variable id="d" /> +<Variable id="e" /> +<Variable id="f" /> +</Program> diff --git a/c_parser/test/out/05.diff.txt b/c_parser/test/out/05.diff.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/c_parser/test/out/05.diff.txt diff --git a/c_parser/test/out/05.stderr.txt b/c_parser/test/out/05.stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/c_parser/test/out/05.stderr.txt diff --git a/c_parser/test/out/05.stdout.xml b/c_parser/test/out/05.stdout.xml new file mode 100644 index 0000000..7381e51 --- /dev/null +++ b/c_parser/test/out/05.stdout.xml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<Program> +<Function id="foo"> +<Parameter id="x" /> +<Parameter id="y" /> +<Scope> +<Scope> +</Scope> +</Scope> +</Function> +</Program> diff --git a/c_parser/test/out/06.diff.txt b/c_parser/test/out/06.diff.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/c_parser/test/out/06.diff.txt diff --git a/c_parser/test/out/06.stderr.txt b/c_parser/test/out/06.stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/c_parser/test/out/06.stderr.txt diff --git a/c_parser/test/out/06.stdout.xml b/c_parser/test/out/06.stdout.xml new file mode 100644 index 0000000..fbcbebd --- /dev/null +++ b/c_parser/test/out/06.stdout.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<Program> +<Function id="f"> +<Parameter id="a" /> +<Parameter id="b" /> +<Parameter id="c" /> +<Scope> +<Variable id="d" /> +<Scope> +<Variable id="e" /> +</Scope> +</Scope> +</Function> +</Program> diff --git a/c_parser/test/ref/05.stdout.xml b/c_parser/test/ref/05.stdout.xml new file mode 100644 index 0000000..7381e51 --- /dev/null +++ b/c_parser/test/ref/05.stdout.xml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<Program> +<Function id="foo"> +<Parameter id="x" /> +<Parameter id="y" /> +<Scope> +<Scope> +</Scope> +</Scope> +</Function> +</Program> diff --git a/c_parser/test/ref/06.stdout.xml b/c_parser/test/ref/06.stdout.xml new file mode 100644 index 0000000..fbcbebd --- /dev/null +++ b/c_parser/test/ref/06.stdout.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<Program> +<Function id="f"> +<Parameter id="a" /> +<Parameter id="b" /> +<Parameter id="c" /> +<Scope> +<Variable id="d" /> +<Scope> +<Variable id="e" /> +</Scope> +</Scope> +</Function> +</Program> |