citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 12bab1f71d08548b637c43ae8b06422f06096f40
parent f6ced226fa9ddef9c397485436caf47296326f1c
Author: kyle <kyle@getaddrinfo.net>
Date:   Sun,  1 Nov 2015 20:25:22 -0700

tests: add super simple for loop test

Diffstat:
Atests/for/Makefile | 11+++++++++++
Atests/for/for.c | 11+++++++++++
Atests/for/for.c.inst_good | 14++++++++++++++
Atests/for/test.sh | 0
4 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/tests/for/Makefile b/tests/for/Makefile @@ -0,0 +1,11 @@ +BIN = prog +SRCS = for.c +OBJS = $(SRCS:c=o) + +$(BIN): $(OBJS) + $(CC) -o $(BIN) $(OBJS) $(LDLIBS) + +diff: + diff -u for.c.inst_good for.c.inst + +.include "../Makefile.test" diff --git a/tests/for/for.c b/tests/for/for.c @@ -0,0 +1,11 @@ +int +main(void) +{ + int i; + + for (i = 0; i < 10; i++) { + i++; + } + + return i; +} diff --git a/tests/for/for.c.inst_good b/tests/for/for.c.inst_good @@ -0,0 +1,14 @@ +unsigned int lines[78]; +int size = 78; +char file_name[] = "/home/kyle/src/scv/tests/for/for.c"; +int +main(void) +{ + int i; + + for (i = 0; (lines[6] = 1, i < 10); i++) { + i++; + } + + return (lines[10] = 1, i); +} diff --git a/tests/for/test.sh b/tests/for/test.sh