Commit b47e4333 authored by Nick Mathewson's avatar Nick Mathewson

Write a small set of unit tests aiming for high coverage

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 #7) , and some failure cases in
timeouts_check().
parent bafeec9c
all: bench bench-wheel.so bench-heap.so
all: bench bench-wheel.so bench-heap.so test-timeout
WHEEL_BIT = 6
WHEEL_NUM = 4
......@@ -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
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment