added 'tests' directory with tests for the pikotools library

currently only tests for convert/text functions
This commit is contained in:
2021-05-10 20:08:50 +02:00
parent cd9e501f48
commit ce81670bb6
7 changed files with 2372 additions and 0 deletions

46
tests/Makefile Normal file
View File

@@ -0,0 +1,46 @@
sourcefiles:=$(shell find . -name "*.cpp")
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
ifndef CXX
CXX = g++
endif
ifndef CXXFLAGS
CXXFLAGS = -Wall -pedantic -O2 -std=c++20 -I../src -I/usr/local/include
endif
progname = tests
all: $(progname) pikotools
$(progname): $(objfiles) pikotools
$(CXX) $(CXXFLAGS) -o $(progname) $(objfiles) ../src/pikotools.a
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) -o $@ $<
pikotools: FORCE
$(MAKE) -C ../src
FORCE:
clean:
rm -f $(objfiles)
rm -f $(progname)
depend:
makedepend -Y. -I../src -f- $(sourcefiles) > Makefile.dep
-include Makefile.dep