Skip to content

Commit

Permalink
Write a small set of unit tests aiming for high coverage
Browse files Browse the repository at this point in the history
These currently cover most reachable lines and branches, except the
case where malloc fails in timeouts_open(), the if() branch in
timeouts_readd() (see issue wahern#7) , and some failure cases in
timeouts_check().
  • Loading branch information
nmathewson committed Feb 20, 2016
1 parent bafeec9 commit b47e433
Show file tree
Hide file tree
Showing 2 changed files with 458 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: bench bench-wheel.so bench-heap.so
all: bench bench-wheel.so bench-heap.so test-timeout

WHEEL_BIT = 6
WHEEL_NUM = 4
Expand Down Expand Up @@ -27,6 +27,8 @@ timeout.o: timeout.c
bench: bench.c timeout.h
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -ldl

test-timeout: timeout.o test-timeout.o
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ timeout.o test-timeout.o

ifeq ($(shell uname -s), Darwin)
SOFLAGS = -bundle -undefined dynamic_lookup
Expand Down
Loading

0 comments on commit b47e433

Please sign in to comment.