From 6fec208922f2fcdf0b4bd990efeb3c6547071d54 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 23 Feb 2026 17:43:20 -0500 Subject: [PATCH] Start basic test infrastructure --- .gitignore | 1 + Makefile | 7 +++++++ test/Makefile | 13 +++++++++++++ test/tests.cpp | 6 ++++++ 4 files changed, 27 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 test/Makefile create mode 100644 test/tests.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f3506f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/test/build/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fdf8655 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +.PHONY: test +test: + $(MAKE) -C test + +.PHONY: clean +clean: + $(MAKE) -C test clean diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..0519cc3 --- /dev/null +++ b/test/Makefile @@ -0,0 +1,13 @@ +INCLUDE := ../include + +.PHONY: all +all: build/tests + build/tests + valgrind build/tests + +build/tests: tests.cpp $(INCLUDE)/rcp.h + $(CC) -std=c++20 -g -Wall -I$(INCLUDE) -o $@ $< + +.PHONY: clean +clean: + rm -rf build diff --git a/test/tests.cpp b/test/tests.cpp new file mode 100644 index 0000000..519a476 --- /dev/null +++ b/test/tests.cpp @@ -0,0 +1,6 @@ +#include + +int main(int argc, char * argv[]) +{ + return 0; +}