From 1960302def409a94bb225f086b02e09854af140a Mon Sep 17 00:00:00 2001 From: David Delassus Date: Tue, 9 Jan 2024 13:27:07 +0100 Subject: [PATCH] :white_check_mark: update goap test suite --- tests/goap.spec.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/goap.spec.cpp b/tests/goap.spec.cpp index 7c130fe..26176d5 100644 --- a/tests/goap.spec.cpp +++ b/tests/goap.spec.cpp @@ -141,13 +141,15 @@ TEST_CASE("goap planning") { std::make_shared() }; - auto p = plan(actions, initial, goal); + auto p = planner(actions, initial, goal); CHECK(p); // 10 chop wood, 1 build storage, 3 gather food, 2 mine gold, 1 mine stone CHECK(p.size() == 17); - p.run(initial); + while (p) { + p.run_next(initial); + } CHECK(initial == goal); } @@ -176,7 +178,7 @@ TEST_CASE("goap planning") { std::make_shared() }; - auto p = plan(actions, initial, goal, 1000); + auto p = planner(actions, initial, goal, 1000); CHECK(!p); } }