tests: Update to Catch2 v3
This commit is contained in:
parent
f397c4434f
commit
31a684361f
22 changed files with 24 additions and 31 deletions
|
@ -145,7 +145,7 @@ if (DYNARMIC_USE_LLVM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DYNARMIC_TESTS)
|
if (DYNARMIC_TESTS)
|
||||||
find_package(Catch2 2 QUIET)
|
find_package(Catch2 3 QUIET)
|
||||||
if (DYNARMIC_TESTS_USE_UNICORN)
|
if (DYNARMIC_TESTS_USE_UNICORN)
|
||||||
find_package(Unicorn REQUIRED)
|
find_package(Unicorn REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/bit/bit_count.hpp>
|
#include <mcl/bit/bit_count.hpp>
|
||||||
#include <mcl/bit/swap.hpp>
|
#include <mcl/bit/swap.hpp>
|
||||||
#include <mcl/scope_exit.hpp>
|
#include <mcl/scope_exit.hpp>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/bit/bit_field.hpp>
|
#include <mcl/bit/bit_field.hpp>
|
||||||
#include <mcl/stdint.hpp>
|
#include <mcl/stdint.hpp>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* SPDX-License-Identifier: 0BSD
|
* SPDX-License-Identifier: 0BSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "dynarmic/frontend/A32/disassembler/disassembler.h"
|
#include "dynarmic/frontend/A32/disassembler/disassembler.h"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* SPDX-License-Identifier: 0BSD
|
* SPDX-License-Identifier: 0BSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "./testenv.h"
|
#include "./testenv.h"
|
||||||
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
|
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "./testenv.h"
|
#include "./testenv.h"
|
||||||
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
|
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "./testenv.h"
|
#include "./testenv.h"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* SPDX-License-Identifier: 0BSD
|
* SPDX-License-Identifier: 0BSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/stdint.hpp>
|
#include <mcl/stdint.hpp>
|
||||||
|
|
||||||
#include "./testenv.h"
|
#include "./testenv.h"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* SPDX-License-Identifier: 0BSD
|
* SPDX-License-Identifier: 0BSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "./testenv.h"
|
#include "./testenv.h"
|
||||||
#include "dynarmic/common/fp/fpsr.h"
|
#include "dynarmic/common/fp/fpsr.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/stdint.hpp>
|
#include <mcl/stdint.hpp>
|
||||||
|
|
||||||
#include "./testenv.h"
|
#include "./testenv.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/scope_exit.hpp>
|
#include <mcl/scope_exit.hpp>
|
||||||
#include <mcl/stdint.hpp>
|
#include <mcl/stdint.hpp>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* SPDX-License-Identifier: 0BSD
|
* SPDX-License-Identifier: 0BSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "./testenv.h"
|
#include "./testenv.h"
|
||||||
#include "dynarmic/interface/A64/a64.h"
|
#include "dynarmic/interface/A64/a64.h"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* SPDX-License-Identifier: 0BSD
|
* SPDX-License-Identifier: 0BSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "./testenv.h"
|
#include "./testenv.h"
|
||||||
#include "dynarmic/interface/A64/a64.h"
|
#include "dynarmic/interface/A64/a64.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "../rand_int.h"
|
#include "../rand_int.h"
|
||||||
#include "../unicorn_emu/a64_unicorn.h"
|
#include "../unicorn_emu/a64_unicorn.h"
|
||||||
|
|
|
@ -3,7 +3,6 @@ add_executable(dynarmic_tests
|
||||||
fp/FPValue.cpp
|
fp/FPValue.cpp
|
||||||
fp/mantissa_util_tests.cpp
|
fp/mantissa_util_tests.cpp
|
||||||
fp/unpacked_tests.cpp
|
fp/unpacked_tests.cpp
|
||||||
main.cpp
|
|
||||||
rand_int.h
|
rand_int.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -80,7 +79,7 @@ if (("A32" IN_LIST DYNARMIC_FRONTENDS) AND ("A64" IN_LIST DYNARMIC_FRONTENDS))
|
||||||
|
|
||||||
create_target_directory_groups(dynarmic_print_info)
|
create_target_directory_groups(dynarmic_print_info)
|
||||||
|
|
||||||
target_link_libraries(dynarmic_print_info PRIVATE dynarmic Boost::boost Catch2::Catch2 fmt::fmt merry::mcl)
|
target_link_libraries(dynarmic_print_info PRIVATE dynarmic Boost::boost fmt::fmt merry::mcl)
|
||||||
target_include_directories(dynarmic_print_info PRIVATE . ../src)
|
target_include_directories(dynarmic_print_info PRIVATE . ../src)
|
||||||
target_compile_options(dynarmic_print_info PRIVATE ${DYNARMIC_CXX_FLAGS})
|
target_compile_options(dynarmic_print_info PRIVATE ${DYNARMIC_CXX_FLAGS})
|
||||||
target_compile_definitions(dynarmic_print_info PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
target_compile_definitions(dynarmic_print_info PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
||||||
|
@ -95,7 +94,7 @@ if (("A32" IN_LIST DYNARMIC_FRONTENDS) AND ("A64" IN_LIST DYNARMIC_FRONTENDS))
|
||||||
|
|
||||||
create_target_directory_groups(dynarmic_test_generator)
|
create_target_directory_groups(dynarmic_test_generator)
|
||||||
|
|
||||||
target_link_libraries(dynarmic_test_generator PRIVATE dynarmic Boost::boost Catch2::Catch2 fmt::fmt merry::mcl)
|
target_link_libraries(dynarmic_test_generator PRIVATE dynarmic Boost::boost fmt::fmt merry::mcl)
|
||||||
target_include_directories(dynarmic_test_generator PRIVATE . ../src)
|
target_include_directories(dynarmic_test_generator PRIVATE . ../src)
|
||||||
target_compile_options(dynarmic_test_generator PRIVATE ${DYNARMIC_CXX_FLAGS})
|
target_compile_options(dynarmic_test_generator PRIVATE ${DYNARMIC_CXX_FLAGS})
|
||||||
target_compile_definitions(dynarmic_test_generator PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
target_compile_definitions(dynarmic_test_generator PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
||||||
|
@ -103,7 +102,7 @@ endif()
|
||||||
|
|
||||||
create_target_directory_groups(dynarmic_tests)
|
create_target_directory_groups(dynarmic_tests)
|
||||||
|
|
||||||
target_link_libraries(dynarmic_tests PRIVATE dynarmic Boost::boost Catch2::Catch2 fmt::fmt merry::mcl)
|
target_link_libraries(dynarmic_tests PRIVATE dynarmic Boost::boost Catch2::Catch2WithMain fmt::fmt merry::mcl)
|
||||||
target_include_directories(dynarmic_tests PRIVATE . ../src)
|
target_include_directories(dynarmic_tests PRIVATE . ../src)
|
||||||
target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})
|
target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})
|
||||||
target_compile_definitions(dynarmic_tests PRIVATE FMT_USE_USER_DEFINED_LITERALS=1 CATCH_CONFIG_ENABLE_BENCHMARKING=1)
|
target_compile_definitions(dynarmic_tests PRIVATE FMT_USE_USER_DEFINED_LITERALS=1 CATCH_CONFIG_ENABLE_BENCHMARKING=1)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/assert.hpp>
|
#include <mcl/assert.hpp>
|
||||||
|
|
||||||
#include "dynarmic/frontend/A32/decoder/asimd.h"
|
#include "dynarmic/frontend/A32/decoder/asimd.h"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/stdint.hpp>
|
#include <mcl/stdint.hpp>
|
||||||
|
|
||||||
#include "../rand_int.h"
|
#include "../rand_int.h"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/stdint.hpp>
|
#include <mcl/stdint.hpp>
|
||||||
|
|
||||||
#include "../rand_int.h"
|
#include "../rand_int.h"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <mcl/stdint.hpp>
|
#include <mcl/stdint.hpp>
|
||||||
|
|
||||||
#include "../rand_int.h"
|
#include "../rand_int.h"
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
/* This file is part of the dynarmic project.
|
|
||||||
* Copyright (c) 2016 MerryMage
|
|
||||||
* SPDX-License-Identifier: 0BSD
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
|
|
||||||
#include <catch2/catch.hpp>
|
|
|
@ -3,7 +3,8 @@
|
||||||
* SPDX-License-Identifier: 0BSD
|
* SPDX-License-Identifier: 0BSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/benchmark/catch_benchmark.hpp>
|
||||||
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <fmt/printf.h>
|
#include <fmt/printf.h>
|
||||||
#include <mcl/stdint.hpp>
|
#include <mcl/stdint.hpp>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <catch2/catch.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <xbyak/xbyak_util.h>
|
#include <xbyak/xbyak_util.h>
|
||||||
|
|
||||||
TEST_CASE("Host CPU supports", "[a64]") {
|
TEST_CASE("Host CPU supports", "[a64]") {
|
||||||
|
|
Loading…
Reference in a new issue