added test framework
This commit is contained in:
parent
2745a618f1
commit
b20474107e
24
test/Makefile
Normal file
24
test/Makefile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
TARGET = tests
|
||||||
|
LIBS = -lm
|
||||||
|
CC = c++
|
||||||
|
CFLAGS = -g -Wall
|
||||||
|
|
||||||
|
.PHONY: default all clean
|
||||||
|
|
||||||
|
default: $(TARGET)
|
||||||
|
all: default
|
||||||
|
|
||||||
|
OBJECTS = $(patsubst %.cpp, %.o, $(wildcard *.cpp))
|
||||||
|
HEADERS = $(wildcard *.hpp)
|
||||||
|
|
||||||
|
%.o: %.cpp $(HEADERS)
|
||||||
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
.PRECIOUS: $(TARGET) $(OBJECTS)
|
||||||
|
|
||||||
|
$(TARGET): $(OBJECTS)
|
||||||
|
$(CC) $(OBJECTS) -Wall $(LIBS) -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-rm -f *.o
|
||||||
|
-rm -f $(TARGET)
|
2
test/all.cpp
Normal file
2
test/all.cpp
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#define CATCH_CONFIG_MAIN
|
||||||
|
#include "catch.hpp"
|
7
test/install.sh
Executable file
7
test/install.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Installing Catch..."
|
||||||
|
|
||||||
|
wget https://raw.githubusercontent.com/philsquared/Catch/develop/single_include/catch.hpp
|
||||||
|
|
||||||
|
echo "All done!"
|
Loading…
Reference in New Issue
Block a user