diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 418820a4..440f533b 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -42,7 +42,7 @@ path-constant BOOST_UNORDERED_TEST_DIR : . ; run quick.cpp ; -compile natvis_tests.cpp ; +compile debuggability/visualization_tests.cpp ; compile unordered/self_include_tests_obj.cpp : BOOST_UNORDERED_HEADER="boost/unordered_map.hpp" diff --git a/test/natvis_tests.cpp b/test/debuggability/visualization_tests.cpp similarity index 89% rename from test/natvis_tests.cpp rename to test/debuggability/visualization_tests.cpp index 6884c7ca..238e5a8a 100644 --- a/test/natvis_tests.cpp +++ b/test/debuggability/visualization_tests.cpp @@ -2,19 +2,10 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -// This test applies to MSVC only. This is a file for manual testing. -// Run this test and break manually at the variable called `break_here`. -// Inspect the variables using the Visual Studio debugger to test correctness. - -#include - -#if !defined(BOOST_MSVC) - -#include -BOOST_PRAGMA_MESSAGE("These tests are for Visual Studio only.") -int main() {} - -#else +// This is a file for testing of visualizations, +// such as Visual Studio Natvis or GDB pretty printers. +// Run this test and break at the label called `break_here`. +// Inspect the variables to test correctness. #if 0 // Change to `#if 1` to test turning off SIMD optimizations #define BOOST_UNORDERED_DISABLE_SSE2 @@ -37,6 +28,7 @@ int main() {} #include #include #include +#include #include #include @@ -46,7 +38,7 @@ template void use(Args&&...) {} using map_value_type = std::pair; using set_value_type = std::string; -template void natvis_test(Tester& tester) +template void visualization_test(Tester& tester) { // clang-format off auto fca_map = tester.template construct_map(); @@ -107,8 +99,8 @@ template void natvis_test(Tester& tester) foa_flat_set_end, foa_node_map_begin, foa_node_map_end, foa_node_set_begin, foa_node_set_end); - int break_here = 0; - use(break_here); + goto break_here; +break_here:; } class offset_ptr_tester_ @@ -169,21 +161,21 @@ public: template