From af859d7085c92d803248d06647075c262a94bf16 Mon Sep 17 00:00:00 2001 From: Anthony Rabine Date: Sun, 9 Mar 2025 14:36:44 +0100 Subject: [PATCH] ast unit test --- core/story-manager/src/variable_node.cpp | 4 ++-- core/story-manager/tests/test_ast.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/story-manager/src/variable_node.cpp b/core/story-manager/src/variable_node.cpp index 1a979a2..05e5ecb 100644 --- a/core/story-manager/src/variable_node.cpp +++ b/core/story-manager/src/variable_node.cpp @@ -5,9 +5,9 @@ VariableNode::VariableNode(const std::string &type) - : BaseNode(type, "Function Node") + : BaseNode(type, "Variable Node") { - nlohmann::json j{ {"function", ""} }; + nlohmann::json j{ {"name", "i"}, {"value", 3} }; SetInternalData(j); } diff --git a/core/story-manager/tests/test_ast.cpp b/core/story-manager/tests/test_ast.cpp index ec33338..a8e0bac 100644 --- a/core/story-manager/tests/test_ast.cpp +++ b/core/story-manager/tests/test_ast.cpp @@ -53,6 +53,7 @@ TEST_CASE( "Check various indentations and typos" ) { std::vector> connections; auto cn1 = std::make_shared(); + cn1-> // // Création des nœuds // std::vector nodes = {