From 0333f2eca72dfa464a71033363bfd15773718b48 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 2 Apr 2025 21:54:55 +0200 Subject: WIP --- test/generated_sources_test.cc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'test/generated_sources_test.cc') diff --git a/test/generated_sources_test.cc b/test/generated_sources_test.cc index 1ea7538..82b2de8 100644 --- a/test/generated_sources_test.cc +++ b/test/generated_sources_test.cc @@ -26,6 +26,21 @@ public: { using namespace std::string_literals; + const auto& c = ctor::get_configuration(); + std::string ext; + switch(c.build_arch) + { + case ctor::arch::unix: + case ctor::arch::apple: + ext = ""; + break; + case ctor::arch::windows: + ext = ".exe"; + break; + case ctor::arch::unknown: + break; + } + ctor::reg( [](const ctor::settings&) { @@ -62,13 +77,14 @@ public: bool found{false}; for(const auto& task : tasks) { - if(task->target() == "test1") + if(task->target() == "test1"+ext) { auto deps_test1 = task->getDependsTasks(); uASSERT_EQUAL(1u, deps_test1.size()); auto deps_foo_o = deps_test1[0]->getDependsTasks(); uASSERT_EQUAL(1u, deps_foo_o.size()); - uASSERT_EQUAL("test/bar.x"s, deps_foo_o[0]->source()); + uASSERT_EQUAL(std::filesystem::path("test/bar.x"), + std::filesystem::path(deps_foo_o[0]->source())); found = true; } } -- cgit v1.2.3