citrun

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

commit 872a978942e9826434af964b94b99410d2d34cd7
parent e7aac39d6918aba635f3468dfedec16bcc381459
Author: kyle <kyle@getaddrinfo.net>
Date:   Sun,  1 Nov 2015 20:14:36 -0700

tests: bring while loops up to date

Diffstat:
Mtests/while_loops/Makefile | 14++++++++++----
Dtests/while_loops/instrumented.c | 14--------------
Rtests/while_loops/prog.c -> tests/while_loops/while.c | 0
Atests/while_loops/while.c.inst_good | 15+++++++++++++++
4 files changed, 25 insertions(+), 18 deletions(-)

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