summaryrefslogtreecommitdiff
path: root/test/ctor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/ctor.cc')
-rw-r--r--test/ctor.cc43
1 files changed, 32 insertions, 11 deletions
diff --git a/test/ctor.cc b/test/ctor.cc
index 9b690a2..ccf1c31 100644
--- a/test/ctor.cc
+++ b/test/ctor.cc
@@ -1,25 +1,41 @@
// -*- c++ -*-
// Distributed under the BSD 2-Clause License.
// See accompanying file LICENSE for details.
-#include <libctor.h>
+#include <ctor.h>
namespace
{
-BuildConfigurations ctorTestConfigs(const Settings& settings)
+ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
{
return
{
{
- .type = TargetType::UnitTest,
+ .type = ctor::target_type::unit_test,
+ .system = ctor::output_system::build,
+ .target = "testprog",
+ .sources = {
+ "testprog.cc",
+ },
+ .flags = {
+ .cxxflags = {
+ "-std=c++20", "-O3", "-Wall", "-Werror",
+ },
+ },
+ },
+ {
+ .type = ctor::target_type::unit_test,
+ .system = ctor::output_system::build,
.target = "execute_test",
.sources = {
"execute_test.cc",
"testmain.cc",
"../src/execute.cc",
+ "../src/util.cc",
},
+ .depends = { "testprog", },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-s", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall", "-Werror",
"-I../src", "-Iuunit",
"-DOUTPUT=\"execute\"",
},
@@ -27,7 +43,8 @@ BuildConfigurations ctorTestConfigs(const Settings& settings)
},
},
{
- .type = TargetType::UnitTest,
+ .type = ctor::target_type::unit_test,
+ .system = ctor::output_system::build,
.target = "tasks_test",
.sources = {
"tasks_test.cc",
@@ -36,7 +53,7 @@ BuildConfigurations ctorTestConfigs(const Settings& settings)
.depends = { "libctor_nomain.a" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-s", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall", "-Werror",
"-I../src", "-Iuunit",
"-DOUTPUT=\"tasks\"",
},
@@ -44,7 +61,8 @@ BuildConfigurations ctorTestConfigs(const Settings& settings)
},
},
{
- .type = TargetType::UnitTest,
+ .type = ctor::target_type::unit_test,
+ .system = ctor::output_system::build,
.target = "source_type_test",
.sources = {
"source_type_test.cc",
@@ -53,7 +71,7 @@ BuildConfigurations ctorTestConfigs(const Settings& settings)
.depends = { "libctor_nomain.a" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-s", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall", "-Werror",
"-I../src", "-Iuunit",
"-DOUTPUT=\"source_type\"",
},
@@ -61,11 +79,13 @@ BuildConfigurations ctorTestConfigs(const Settings& settings)
},
},
{
- .type = TargetType::UnitTest,
+ .type = ctor::target_type::unit_test,
+ .system = ctor::output_system::build,
.target = "tools_test",
.sources = {
"tools_test.cc",
"testmain.cc",
+ "../src/util.cc",
"../src/tools.cc",
},
//.depends = { "libctor_nomain.a" },
@@ -78,7 +98,8 @@ BuildConfigurations ctorTestConfigs(const Settings& settings)
},
},
{
- .type = TargetType::UnitTestLib,
+ .type = ctor::target_type::unit_test_library,
+ .system = ctor::output_system::build,
.target = "libctor_nomain.a",
.sources = {
"../src/build.cc",
@@ -98,7 +119,7 @@ BuildConfigurations ctorTestConfigs(const Settings& settings)
},
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-s", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall", "-Werror",
"-I../src",
},
.ldflags = { "-pthread" },