From ba04d2889a4e017c6043bac9951f722e60b63bc5 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 14 Sep 2021 07:46:43 +0200 Subject: Add suport for building and running unittests with the 'check' target. --- test/ctor.cc | 28 ++++++++++++++++++++++++++++ test/uunit | 1 + 2 files changed, 29 insertions(+) create mode 100644 test/ctor.cc create mode 160000 test/uunit (limited to 'test') diff --git a/test/ctor.cc b/test/ctor.cc new file mode 100644 index 0000000..aed3ee5 --- /dev/null +++ b/test/ctor.cc @@ -0,0 +1,28 @@ +#include "libctor.h" + +namespace +{ +BuildConfigurations ctorTestConfigs() +{ + return + { + { + .type = TargetType::UnitTest, + .target = "execute_test", + .sources = { + "execute_test.cc", + "uunit/uunit.cc", + "../src/execute.cc", + }, + .cxxflags = { + "-std=c++17", "-O3", "-s", "-Wall", "-Werror", + "-I../src", "-Iuunit", + "-DOUTPUT=\"execute\"", + }, + } + }; +} +} + +// Convenience macro +REG(ctorTestConfigs); diff --git a/test/uunit b/test/uunit new file mode 160000 index 0000000..fd83de8 --- /dev/null +++ b/test/uunit @@ -0,0 +1 @@ +Subproject commit fd83de802d05a227cc00489f66ea70fccb4dda05 -- cgit v1.2.3