From 534ce6a0a096cede9aff88dd433b4c513003c189 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 11 Jul 2024 15:38:22 +0200 Subject: Remove redundant ArtifactFactory class used in tests only ...and move the related tests to artifact_description.test --- test/buildtool/common/action_description.test.cpp | 12 ++++++------ 1 file changed, 6 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 9d82ec9d..c79caeaa 100644 --- a/test/buildtool/common/action_description.test.cpp +++ b/test/buildtool/common/action_description.test.cpp @@ -19,7 +19,6 @@ #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; @@ -30,11 +29,12 @@ TEST_CASE("From JSON", "[action_description]") { {{"path0", ArtifactDescription::CreateTree(path{"input0"})}, {"path1", ArtifactDescription::CreateTree(path{"input1"})}}}; auto const& action = desc.GraphAction(); - auto json = ArtifactFactory::DescribeAction(desc.OutputFiles(), - desc.OutputDirs(), - action.Command(), - desc.Inputs(), - action.Env()); + auto json = + ActionDescription{desc.OutputFiles(), + desc.OutputDirs(), + Action{"unused", action.Command(), action.Env()}, + desc.Inputs()} + .ToJson(); SECTION("Parse full action") { auto description = ActionDescription::FromJson("id", json); -- cgit v1.2.3