From 6accb227b75fef7e99257b0078eb95f9aa0823cc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 2 Feb 2026 18:30:58 +0100 Subject: New syntax --- test/generated_sources_test.cc | 56 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'test/generated_sources_test.cc') diff --git a/test/generated_sources_test.cc b/test/generated_sources_test.cc index 8c46983..626a102 100644 --- a/test/generated_sources_test.cc +++ b/test/generated_sources_test.cc @@ -32,24 +32,24 @@ public: { return ctor::build_configurations{ { - .target = "test1", - .sources = { - {"foo.cc", ctor::source_type::generated} - } + ctor::target("test1"), + ctor::sources{ + {"foo.cc", ctor::source_type::generated} + }, }, { - .target = "this_is_unused", - .sources = { - {"bar.x", ctor::output_file{"foo.cc"}}, - {"bar.y", ctor::output_file{"bar.cc"}}, - }, - .function = []([[maybe_unused]]const std::string& input, - [[maybe_unused]]const std::string& output, - [[maybe_unused]]const ctor::build_configuration& config, - [[maybe_unused]]const ctor::settings& settings) + ctor::target("this_is_unused"), + ctor::sources{ + {"bar.x", ctor::output_file{"foo.cc"}}, + {"bar.y", ctor::output_file{"bar.cc"}}, + }, + ctor::GeneratorOneToOne([]([[maybe_unused]]const std::string& input, + [[maybe_unused]]const std::string& output, + [[maybe_unused]]const ctor::build_configuration& config, + [[maybe_unused]]const ctor::settings& settings) { return 0; - } + }), }, }; }); @@ -85,24 +85,24 @@ public: { return ctor::build_configurations{ { - .target = "test1", - .sources = { - {"foo.cc", ctor::source_type::generated} - } + ctor::target("test1"), + ctor::sources{ + {"foo.cc", ctor::source_type::generated} + }, }, { - .target = "foo.cc", - .sources = { - {"bar.x"}, - {"bar.y"}, - }, - .function = [](const std::vector& input, - const std::string& output, - const ctor::build_configuration& config, - const ctor::settings& settings) + ctor::target("foo.cc"), + ctor::sources{ + {"bar.x"}, + {"bar.y"}, + }, + ctor::GeneratorManyToOne([](const std::vector& input, + const std::string& output, + const ctor::build_configuration& config, + const ctor::settings& settings) { return 0; - } + }), }, }; }); -- cgit v1.2.3