Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / histogram / test / axis_regular_test.cpp
index 5161859..5d3e111 100644 (file)
@@ -7,7 +7,6 @@
 #include <boost/core/lightweight_test.hpp>
 #include <boost/histogram/axis/ostream.hpp>
 #include <boost/histogram/axis/regular.hpp>
-#include <boost/histogram/detail/cat.hpp>
 #include <limits>
 #include <sstream>
 #include <type_traits>
 #include "std_ostream.hpp"
 #include "throw_exception.hpp"
 #include "utility_axis.hpp"
-
-using namespace boost::histogram;
-namespace tr = axis::transform;
-using def = use_default;
+#include "utility_str.hpp"
 
 int main() {
+  using namespace boost::histogram;
+  using def = use_default;
+  namespace tr = axis::transform;
+
   BOOST_TEST(std::is_nothrow_move_assignable<axis::regular<>>::value);
+  BOOST_TEST(std::is_nothrow_move_constructible<axis::regular<>>::value);
 
   // bad_ctors
   {
@@ -72,7 +73,7 @@ int main() {
     BOOST_TEST_EQ(a.index(std::numeric_limits<double>::infinity()), 4);
     BOOST_TEST_EQ(a.index(std::numeric_limits<double>::quiet_NaN()), 4);
 
-    BOOST_TEST_EQ(detail::cat(a),
+    BOOST_TEST_EQ(str(a),
                   "regular(4, -2, 2, metadata=\"bar\", options=underflow | overflow)");
   }
 
@@ -115,7 +116,7 @@ int main() {
 
     BOOST_TEST_THROWS((axis::regular<double, tr::log>{2, -1, 0}), std::invalid_argument);
 
-    BOOST_TEST_EQ(detail::cat(a), "regular_log(2, 1, 100, options=underflow | overflow)");
+    BOOST_TEST_EQ(str(a), "regular_log(2, 1, 100, options=underflow | overflow)");
   }
 
   // with sqrt transform
@@ -137,7 +138,7 @@ int main() {
     BOOST_TEST_EQ(a.index(100), 2);
     BOOST_TEST_EQ(a.index(std::numeric_limits<double>::infinity()), 2);
 
-    BOOST_TEST_EQ(detail::cat(a), "regular_sqrt(2, 0, 4, options=underflow | overflow)");
+    BOOST_TEST_EQ(str(a), "regular_sqrt(2, 0, 4, options=underflow | overflow)");
   }
 
   // with pow transform
@@ -159,7 +160,7 @@ int main() {
     BOOST_TEST_EQ(a.index(100), 2);
     BOOST_TEST_EQ(a.index(std::numeric_limits<double>::infinity()), 2);
 
-    BOOST_TEST_EQ(detail::cat(a),
+    BOOST_TEST_EQ(str(a),
                   "regular_pow(2, 0, 4, options=underflow | overflow, power=0.5)");
   }
 
@@ -243,7 +244,7 @@ int main() {
   // null_type streamable
   {
     auto a = axis::regular<float, def, axis::null_type>(2, 0, 1);
-    BOOST_TEST_EQ(detail::cat(a), "regular(2, 0, 1, options=underflow | overflow)");
+    BOOST_TEST_EQ(str(a), "regular(2, 0, 1, options=underflow | overflow)");
   }
 
   // shrink and rebin