From 1e1758e8c30d30df0ebeefbada1e5a8f74d8a350 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 11 Jul 2024 13:22:16 +0200 Subject: Use static Create functions to construct ArtifactDescription ...instead of unobvious ctors relying on overload resolution. --- test/buildtool/common/action_description.test.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test/buildtool/common/action_description.test.cpp') diff --git a/test/buildtool/common/action_description.test.cpp b/test/buildtool/common/action_description.test.cpp index 61361c58..9d82ec9d 100644 --- a/test/buildtool/common/action_description.test.cpp +++ b/test/buildtool/common/action_description.test.cpp @@ -18,16 +18,17 @@ #include "nlohmann/json.hpp" #include "src/buildtool/common/action.hpp" #include "src/buildtool/common/action_description.hpp" +#include "src/buildtool/common/artifact_description.hpp" #include "src/buildtool/common/artifact_factory.hpp" TEST_CASE("From JSON", "[action_description]") { using path = std::filesystem::path; - auto desc = - ActionDescription{{"output0", "output1"}, - {"dir0", "dir1"}, - Action{"id", {"command", "line"}, {{"env", "vars"}}}, - {{"path0", ArtifactDescription{path{"input0"}}}, - {"path1", ArtifactDescription{path{"input1"}}}}}; + auto desc = ActionDescription{ + {"output0", "output1"}, + {"dir0", "dir1"}, + Action{"id", {"command", "line"}, {{"env", "vars"}}}, + {{"path0", ArtifactDescription::CreateTree(path{"input0"})}, + {"path1", ArtifactDescription::CreateTree(path{"input1"})}}}; auto const& action = desc.GraphAction(); auto json = ArtifactFactory::DescribeAction(desc.OutputFiles(), desc.OutputDirs(), -- cgit v1.2.3