From 593b7cd6a1c70a97d41b1d955ea38732e17b896c Mon Sep 17 00:00:00 2001 From: John Beard Date: Tue, 23 Apr 2019 19:25:13 +0100 Subject: [PATCH] QA: Tweak boost print helper macro By making the caller use the "namespace" keyword, the formatter is given the right indentation hints. Also makes it clearer synatactically. One day, this will be a namespace alias (needs GCC 7). --- qa/common/geometry/geom_test_utils.h | 2 +- qa/eeschema/lib_field_test_utils.h | 2 +- qa/libs/sexpr/sexpr_test_utils.h | 2 +- .../include/unit_test_utils/unit_test_utils.h | 8 ++++---- qa/unit_test_utils/unit_test_utils.cpp | 2 +- qa/utils/kicad2step/pcb/test_base.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/qa/common/geometry/geom_test_utils.h b/qa/common/geometry/geom_test_utils.h index e658bb8ac8..b5024062f0 100644 --- a/qa/common/geometry/geom_test_utils.h +++ b/qa/common/geometry/geom_test_utils.h @@ -223,7 +223,7 @@ inline SHAPE_POLY_SET FilletPolySet( SHAPE_POLY_SET& aPolySet, int aRadius, int } // namespace GEOM_TEST -BOOST_TEST_PRINT_NAMESPACE_OPEN +namespace BOOST_TEST_PRINT_NAMESPACE_OPEN { template <> struct print_log_value diff --git a/qa/eeschema/lib_field_test_utils.h b/qa/eeschema/lib_field_test_utils.h index 51288420fd..a24ccde28c 100644 --- a/qa/eeschema/lib_field_test_utils.h +++ b/qa/eeschema/lib_field_test_utils.h @@ -35,7 +35,7 @@ #include -BOOST_TEST_PRINT_NAMESPACE_OPEN +namespace BOOST_TEST_PRINT_NAMESPACE_OPEN { template <> struct print_log_value diff --git a/qa/libs/sexpr/sexpr_test_utils.h b/qa/libs/sexpr/sexpr_test_utils.h index 085baf5e2a..31c97f96a1 100644 --- a/qa/libs/sexpr/sexpr_test_utils.h +++ b/qa/libs/sexpr/sexpr_test_utils.h @@ -224,7 +224,7 @@ inline bool SexprConvertsToString( const SEXPR::SEXPR& aSexpr, const std::string } // namespace KI_TEST -BOOST_TEST_PRINT_NAMESPACE_OPEN +namespace BOOST_TEST_PRINT_NAMESPACE_OPEN { /** diff --git a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h b/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h index 1335197b00..f6ca1ac403 100644 --- a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h +++ b/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h @@ -96,7 +96,7 @@ */ #if BOOST_VERSION >= 105900 #define BOOST_TEST_PRINT_NAMESPACE_OPEN \ - namespace boost \ + boost \ { \ namespace test_tools \ { \ @@ -104,7 +104,7 @@ #define BOOST_TEST_PRINT_NAMESPACE_CLOSE }} #else #define BOOST_TEST_PRINT_NAMESPACE_OPEN \ - namespace boost \ + boost \ { \ namespace test_tools #define BOOST_TEST_PRINT_NAMESPACE_CLOSE } @@ -118,7 +118,7 @@ */ #if BOOST_VERSION < 106400 -BOOST_TEST_PRINT_NAMESPACE_OPEN +namespace BOOST_TEST_PRINT_NAMESPACE_OPEN { template <> struct print_log_value @@ -134,7 +134,7 @@ BOOST_TEST_PRINT_NAMESPACE_CLOSE #endif -BOOST_TEST_PRINT_NAMESPACE_OPEN +namespace BOOST_TEST_PRINT_NAMESPACE_OPEN { /** diff --git a/qa/unit_test_utils/unit_test_utils.cpp b/qa/unit_test_utils/unit_test_utils.cpp index 71550e564f..ef39ffe780 100644 --- a/qa/unit_test_utils/unit_test_utils.cpp +++ b/qa/unit_test_utils/unit_test_utils.cpp @@ -23,7 +23,7 @@ #include -BOOST_TEST_PRINT_NAMESPACE_OPEN +namespace BOOST_TEST_PRINT_NAMESPACE_OPEN { void print_log_value::operator()( std::ostream& os, wxPoint const& aPt ) diff --git a/qa/utils/kicad2step/pcb/test_base.cpp b/qa/utils/kicad2step/pcb/test_base.cpp index 0a853ca5e9..346b5ca1d9 100644 --- a/qa/utils/kicad2step/pcb/test_base.cpp +++ b/qa/utils/kicad2step/pcb/test_base.cpp @@ -36,7 +36,7 @@ #include -BOOST_TEST_PRINT_NAMESPACE_OPEN +namespace BOOST_TEST_PRINT_NAMESPACE_OPEN { template <> struct print_log_value