summaryrefslogtreecommitdiff
path: root/test/buildtool/common/action_description.test.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-07-11 13:22:16 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-12 15:43:37 +0200
commit1e1758e8c30d30df0ebeefbada1e5a8f74d8a350 (patch)
treeb5b87ab3d7b61a0dc0e89e14e28af78293c4a423 /test/buildtool/common/action_description.test.cpp
parent9362f6c426a6e10d0f77282364a0061ebf192375 (diff)
downloadjustbuild-1e1758e8c30d30df0ebeefbada1e5a8f74d8a350.tar.gz
Use static Create functions to construct ArtifactDescription
...instead of unobvious ctors relying on overload resolution.
Diffstat (limited to 'test/buildtool/common/action_description.test.cpp')
-rw-r--r--test/buildtool/common/action_description.test.cpp13
1 files changed, 7 insertions, 6 deletions
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(),