summaryrefslogtreecommitdiff
path: root/test/generated_sources_test.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2025-12-28 21:48:09 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2026-01-02 13:20:17 +0100
commitfe9183b22f09254a756cb47d6897b1475ad811b1 (patch)
tree18fe5c6f16e97bfbf952cdbbcfb12a8f0b410042 /test/generated_sources_test.cc
parente4f612979e9361e006f049ff445e9c78497adbbd (diff)
WIPmsvc
Diffstat (limited to 'test/generated_sources_test.cc')
-rw-r--r--test/generated_sources_test.cc20
1 files changed, 18 insertions, 2 deletions
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;
}
}