From cdc47832ef3a808cc82b199c176c8b1984136f12 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 2 Nov 2023 08:30:04 +0100 Subject: [PATCH] test: use shared boxed_int type --- test/entt/core/algorithm.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/entt/core/algorithm.cpp b/test/entt/core/algorithm.cpp index 7a0a68adc..d0ac1658d 100644 --- a/test/entt/core/algorithm.cpp +++ b/test/entt/core/algorithm.cpp @@ -3,10 +3,7 @@ #include #include #include - -struct boxed_int { - int value; -}; +#include "../common/boxed_int.h" TEST(Algorithm, StdSort) { // well, I'm pretty sure it works, it's std::sort!! @@ -22,7 +19,7 @@ TEST(Algorithm, StdSort) { TEST(Algorithm, StdSortBoxedInt) { // well, I'm pretty sure it works, it's std::sort!! - std::array arr{{{4}, {1}, {3}, {2}, {0}, {6}}}; + std::array arr{{{4}, {1}, {3}, {2}, {0}, {6}}}; entt::std_sort sort; sort(arr.begin(), arr.end(), [](const auto &lhs, const auto &rhs) { @@ -46,7 +43,7 @@ TEST(Algorithm, InsertionSort) { } TEST(Algorithm, InsertionSortBoxedInt) { - std::array arr{{{4}, {1}, {3}, {2}, {0}, {6}}}; + std::array arr{{{4}, {1}, {3}, {2}, {0}, {6}}}; entt::insertion_sort sort; sort(arr.begin(), arr.end(), [](const auto &lhs, const auto &rhs) { @@ -79,7 +76,7 @@ TEST(Algorithm, RadixSort) { } TEST(Algorithm, RadixSortBoxedInt) { - std::array arr{{{4}, {1}, {3}, {2}, {0}, {6}}}; + std::array arr{{{4}, {1}, {3}, {2}, {0}, {6}}}; entt::radix_sort<2, 6> sort; sort(arr.rbegin(), arr.rend(), [](const auto &instance) {