Мой test_main.cpp:
Код: Выделить всё
#define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"
#include "main.cpp"
TEST_CASE("BinaryRadixSort") {
// Define test data
std::vector input = {5, 2, 7, 1, 8, 3, 6, 4};
std::vector expected_output = {1, 2, 3, 4, 5, 6, 7, 8};
// Test binaryRadixSort function
binaryRadixSort(input);
REQUIRE(input == expected_output);
}
Если у меня нет #define CATCH_CONFIG_MAIN, я получаю неопределенные ошибки.
Что я могу сделать? Спасибо
Подробнее здесь: https://stackoverflow.com/questions/783 ... references