summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-06-16 17:15:54 +0300
committerGitHub <noreply@github.com>2022-06-16 17:15:54 +0300
commit639d72735c2e9bfff013029e3c797a2102797e82 (patch)
treecf5cac5fd9fd67796f39cd4c21fc7ccabd03d76e /tests
parentef6511fbb4b280ca81f18f89d89be7a7b6c706ec (diff)
parent7da2a2142500242ef4356b6576cd8797e86def71 (diff)
Merge pull request #62099 from Chaosus/astar_64bit
Diffstat (limited to 'tests')
-rw-r--r--tests/core/math/test_astar.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/core/math/test_astar.h b/tests/core/math/test_astar.h
index 1306d3c20e..9f5e98ef94 100644
--- a/tests/core/math/test_astar.h
+++ b/tests/core/math/test_astar.h
@@ -58,7 +58,7 @@ public:
}
// Disable heuristic completely.
- real_t _compute_cost(int p_from, int p_to) {
+ real_t _compute_cost(int64_t p_from, int64_t p_to) {
if (p_from == A && p_to == C) {
return 1000;
}
@@ -68,7 +68,7 @@ public:
TEST_CASE("[AStar3D] ABC path") {
ABCX abcx;
- Vector<int> path = abcx.get_id_path(ABCX::A, ABCX::C);
+ Vector<int64_t> path = abcx.get_id_path(ABCX::A, ABCX::C);
REQUIRE(path.size() == 3);
CHECK(path[0] == ABCX::A);
CHECK(path[1] == ABCX::B);
@@ -77,7 +77,7 @@ TEST_CASE("[AStar3D] ABC path") {
TEST_CASE("[AStar3D] ABCX path") {
ABCX abcx;
- Vector<int> path = abcx.get_id_path(ABCX::X, ABCX::C);
+ Vector<int64_t> path = abcx.get_id_path(ABCX::X, ABCX::C);
REQUIRE(path.size() == 4);
CHECK(path[0] == ABCX::X);
CHECK(path[1] == ABCX::A);
@@ -318,7 +318,7 @@ TEST_CASE("[Stress][AStar3D] Find paths") {
for (int u = 0; u < N; u++) {
for (int v = 0; v < N; v++) {
if (u != v) {
- Vector<int> route = a.get_id_path(u, v);
+ Vector<int64_t> route = a.get_id_path(u, v);
if (!Math::is_inf(d[u][v])) {
// Reachable.
if (route.size() == 0) {