Fixed tests

This commit is contained in:
Erik Ekman
2006-11-18 13:37:37 +00:00
parent 6fc460ded6
commit 8b81909b5b
4 changed files with 38 additions and 8 deletions

28
tests/Makefile Normal file
View File

@@ -0,0 +1,28 @@
CC = gcc
TESTSUITE = tester
TESTOBJS = test.o ../src/dns.o ../src/read.o ../src/encoding.o
OS = `uname | tr "a-z" "A-Z"`
LDFLAGS = -lz
CFLAGS = -c -g -Wall -D$(OS)
all: $(TESTSUITE)
test: $(TESTSUITE)
@./$(TESTSUITE)
$(TESTSUITE): $(TESTOBJS)
@echo LD $@
@$(CC) $(TESTOBJS) -o $(TESTSUITE) $(LDFLAGS)
@echo Running tests...
@./$(TESTSUITE)
.c.o:
@echo CC $<
@$(CC) $(CFLAGS) $< -o $@
clean:
@echo "Cleaning tests/"
@rm -f $(TESTSUITE) *~ *.o *.core

View File

@@ -28,10 +28,10 @@
#include <string.h>
#include <assert.h>
#include "structs.h"
#include "encoding.h"
#include "dns.h"
#include "read.h"
#include "../src/structs.h"
#include "../src/encoding.h"
#include "../src/dns.h"
#include "../src/read.h"
static void
test_readputshort()