aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMerry <[email protected]>2022-12-31 16:26:55 +0000
committerMerry <[email protected]>2022-12-31 17:28:34 +0000
commit31a684361fb1bd1c1f03f3d833d7630b5b8d47b5 (patch)
treed7f251d1e7b1c36157ef78eafa9bd55966700e58 /tests
parentf397c4434f52836dddd4c08becf5a8e40228bcf1 (diff)
downloaddynarmic-31a684361fb1bd1c1f03f3d833d7630b5b8d47b5.tar.gz
dynarmic-31a684361fb1bd1c1f03f3d833d7630b5b8d47b5.zip
tests: Update to Catch2 v3
Diffstat (limited to 'tests')
-rw-r--r--tests/A32/fuzz_arm.cpp2
-rw-r--r--tests/A32/fuzz_thumb.cpp2
-rw-r--r--tests/A32/test_arm_disassembler.cpp2
-rw-r--r--tests/A32/test_arm_instructions.cpp2
-rw-r--r--tests/A32/test_coprocessor.cpp2
-rw-r--r--tests/A32/test_svc.cpp2
-rw-r--r--tests/A32/test_thumb_instructions.cpp2
-rw-r--r--tests/A64/a64.cpp2
-rw-r--r--tests/A64/fp_min_max.cpp2
-rw-r--r--tests/A64/fuzz_with_unicorn.cpp2
-rw-r--r--tests/A64/misaligned_page_table.cpp2
-rw-r--r--tests/A64/test_invalidation.cpp2
-rw-r--r--tests/A64/verify_unicorn.cpp2
-rw-r--r--tests/CMakeLists.txt7
-rw-r--r--tests/decoder_tests.cpp2
-rw-r--r--tests/fp/FPToFixed.cpp2
-rw-r--r--tests/fp/mantissa_util_tests.cpp2
-rw-r--r--tests/fp/unpacked_tests.cpp2
-rw-r--r--tests/main.cpp7
-rw-r--r--tests/rsqrt_test.cpp3
-rw-r--r--tests/x64_cpu_info.cpp2
21 files changed, 23 insertions, 30 deletions
diff --git a/tests/A32/fuzz_arm.cpp b/tests/A32/fuzz_arm.cpp
index 914d33cd..cda424e2 100644
--- a/tests/A32/fuzz_arm.cpp
+++ b/tests/A32/fuzz_arm.cpp
@@ -11,7 +11,7 @@
#include <type_traits>
#include <vector>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/bit/bit_count.hpp>
#include <mcl/bit/swap.hpp>
#include <mcl/scope_exit.hpp>
diff --git a/tests/A32/fuzz_thumb.cpp b/tests/A32/fuzz_thumb.cpp
index ff68f2f2..3733dbb3 100644
--- a/tests/A32/fuzz_thumb.cpp
+++ b/tests/A32/fuzz_thumb.cpp
@@ -12,7 +12,7 @@
#include <string_view>
#include <tuple>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/bit/bit_field.hpp>
#include <mcl/stdint.hpp>
diff --git a/tests/A32/test_arm_disassembler.cpp b/tests/A32/test_arm_disassembler.cpp
index e8614d1f..5cefc0be 100644
--- a/tests/A32/test_arm_disassembler.cpp
+++ b/tests/A32/test_arm_disassembler.cpp
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: 0BSD
*/
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include "dynarmic/frontend/A32/disassembler/disassembler.h"
diff --git a/tests/A32/test_arm_instructions.cpp b/tests/A32/test_arm_instructions.cpp
index 1878f961..a4a07f92 100644
--- a/tests/A32/test_arm_instructions.cpp
+++ b/tests/A32/test_arm_instructions.cpp
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: 0BSD
*/
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include "./testenv.h"
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
diff --git a/tests/A32/test_coprocessor.cpp b/tests/A32/test_coprocessor.cpp
index 75017b0b..24d54efe 100644
--- a/tests/A32/test_coprocessor.cpp
+++ b/tests/A32/test_coprocessor.cpp
@@ -5,7 +5,7 @@
#include <memory>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include "./testenv.h"
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
diff --git a/tests/A32/test_svc.cpp b/tests/A32/test_svc.cpp
index 367b89b3..bec02b76 100644
--- a/tests/A32/test_svc.cpp
+++ b/tests/A32/test_svc.cpp
@@ -5,7 +5,7 @@
#include <optional>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include "./testenv.h"
diff --git a/tests/A32/test_thumb_instructions.cpp b/tests/A32/test_thumb_instructions.cpp
index 6ed59e25..dda0fc46 100644
--- a/tests/A32/test_thumb_instructions.cpp
+++ b/tests/A32/test_thumb_instructions.cpp
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: 0BSD
*/
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/stdint.hpp>
#include "./testenv.h"
diff --git a/tests/A64/a64.cpp b/tests/A64/a64.cpp
index 395482c2..8edbf0c3 100644
--- a/tests/A64/a64.cpp
+++ b/tests/A64/a64.cpp
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: 0BSD
*/
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include "./testenv.h"
#include "dynarmic/common/fp/fpsr.h"
diff --git a/tests/A64/fp_min_max.cpp b/tests/A64/fp_min_max.cpp
index 1644fb64..7aa1ef44 100644
--- a/tests/A64/fp_min_max.cpp
+++ b/tests/A64/fp_min_max.cpp
@@ -5,7 +5,7 @@
#include <vector>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/stdint.hpp>
#include "./testenv.h"
diff --git a/tests/A64/fuzz_with_unicorn.cpp b/tests/A64/fuzz_with_unicorn.cpp
index 847a2ae9..7343f87e 100644
--- a/tests/A64/fuzz_with_unicorn.cpp
+++ b/tests/A64/fuzz_with_unicorn.cpp
@@ -8,7 +8,7 @@
#include <string>
#include <vector>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/scope_exit.hpp>
#include <mcl/stdint.hpp>
diff --git a/tests/A64/misaligned_page_table.cpp b/tests/A64/misaligned_page_table.cpp
index 5f49d90b..f54aa586 100644
--- a/tests/A64/misaligned_page_table.cpp
+++ b/tests/A64/misaligned_page_table.cpp
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: 0BSD
*/
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include "./testenv.h"
#include "dynarmic/interface/A64/a64.h"
diff --git a/tests/A64/test_invalidation.cpp b/tests/A64/test_invalidation.cpp
index c1ac6665..fa35b02b 100644
--- a/tests/A64/test_invalidation.cpp
+++ b/tests/A64/test_invalidation.cpp
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: 0BSD
*/
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include "./testenv.h"
#include "dynarmic/interface/A64/a64.h"
diff --git a/tests/A64/verify_unicorn.cpp b/tests/A64/verify_unicorn.cpp
index d367e3cb..5ffe4f15 100644
--- a/tests/A64/verify_unicorn.cpp
+++ b/tests/A64/verify_unicorn.cpp
@@ -5,7 +5,7 @@
#include <array>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include "../rand_int.h"
#include "../unicorn_emu/a64_unicorn.h"
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index ce898c87..b667aca6 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -3,7 +3,6 @@ add_executable(dynarmic_tests
fp/FPValue.cpp
fp/mantissa_util_tests.cpp
fp/unpacked_tests.cpp
- main.cpp
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)
- 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_compile_options(dynarmic_print_info PRIVATE ${DYNARMIC_CXX_FLAGS})
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)
- 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_compile_options(dynarmic_test_generator PRIVATE ${DYNARMIC_CXX_FLAGS})
target_compile_definitions(dynarmic_test_generator PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
@@ -103,7 +102,7 @@ endif()
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_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)
diff --git a/tests/decoder_tests.cpp b/tests/decoder_tests.cpp
index 519d2b17..2028ac98 100644
--- a/tests/decoder_tests.cpp
+++ b/tests/decoder_tests.cpp
@@ -7,7 +7,7 @@
#include <iomanip>
#include <iostream>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/assert.hpp>
#include "dynarmic/frontend/A32/decoder/asimd.h"
diff --git a/tests/fp/FPToFixed.cpp b/tests/fp/FPToFixed.cpp
index 9375003f..2d1deb5e 100644
--- a/tests/fp/FPToFixed.cpp
+++ b/tests/fp/FPToFixed.cpp
@@ -6,7 +6,7 @@
#include <tuple>
#include <vector>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/stdint.hpp>
#include "../rand_int.h"
diff --git a/tests/fp/mantissa_util_tests.cpp b/tests/fp/mantissa_util_tests.cpp
index 76311f1f..cff942c7 100644
--- a/tests/fp/mantissa_util_tests.cpp
+++ b/tests/fp/mantissa_util_tests.cpp
@@ -6,7 +6,7 @@
#include <tuple>
#include <vector>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/stdint.hpp>
#include "../rand_int.h"
diff --git a/tests/fp/unpacked_tests.cpp b/tests/fp/unpacked_tests.cpp
index d61f514f..827b85ac 100644
--- a/tests/fp/unpacked_tests.cpp
+++ b/tests/fp/unpacked_tests.cpp
@@ -6,7 +6,7 @@
#include <tuple>
#include <vector>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <mcl/stdint.hpp>
#include "../rand_int.h"
diff --git a/tests/main.cpp b/tests/main.cpp
deleted file mode 100644
index 73eaf605..00000000
--- a/tests/main.cpp
+++ /dev/null
@@ -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>
diff --git a/tests/rsqrt_test.cpp b/tests/rsqrt_test.cpp
index cb49ca0c..7adbe39e 100644
--- a/tests/rsqrt_test.cpp
+++ b/tests/rsqrt_test.cpp
@@ -3,7 +3,8 @@
* 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 <mcl/stdint.hpp>
diff --git a/tests/x64_cpu_info.cpp b/tests/x64_cpu_info.cpp
index 70ab41c2..b17aa037 100644
--- a/tests/x64_cpu_info.cpp
+++ b/tests/x64_cpu_info.cpp
@@ -6,7 +6,7 @@
#include <array>
#include <utility>
-#include <catch2/catch.hpp>
+#include <catch2/catch_test_macros.hpp>
#include <xbyak/xbyak_util.h>
TEST_CASE("Host CPU supports", "[a64]") {