Skip to content

Commit 1960302

Browse files
committed
✅ update goap test suite
1 parent c6cd622 commit 1960302

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/goap.spec.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,15 @@ TEST_CASE("goap planning") {
141141
std::make_shared<mine_stone>()
142142
};
143143

144-
auto p = plan<blackboard_type>(actions, initial, goal);
144+
auto p = planner<blackboard_type>(actions, initial, goal);
145145
CHECK(p);
146146

147147
// 10 chop wood, 1 build storage, 3 gather food, 2 mine gold, 1 mine stone
148148
CHECK(p.size() == 17);
149149

150-
p.run(initial);
150+
while (p) {
151+
p.run_next(initial);
152+
}
151153
CHECK(initial == goal);
152154
}
153155

@@ -176,7 +178,7 @@ TEST_CASE("goap planning") {
176178
std::make_shared<mine_stone>()
177179
};
178180

179-
auto p = plan<blackboard_type>(actions, initial, goal, 1000);
181+
auto p = planner<blackboard_type>(actions, initial, goal, 1000);
180182
CHECK(!p);
181183
}
182184
}

0 commit comments

Comments
 (0)