summaryrefslogtreecommitdiff
path: root/boost/test/parameterized_test.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
commitb8cf34c691623e4ec329053cbbf68522a855882d (patch)
tree34da08632a99677f6b79ecb65e5b655a5b69a67f /boost/test/parameterized_test.hpp
parent3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff)
downloadboost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.gz
boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.bz2
boost-b8cf34c691623e4ec329053cbbf68522a855882d.zip
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boost/test/parameterized_test.hpp')
-rw-r--r--boost/test/parameterized_test.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/boost/test/parameterized_test.hpp b/boost/test/parameterized_test.hpp
index b94e7ec8b3..cc9487abc2 100644
--- a/boost/test/parameterized_test.hpp
+++ b/boost/test/parameterized_test.hpp
@@ -14,6 +14,7 @@
// Boost.Test
#include <boost/test/unit_test_suite.hpp>
+#include <boost/test/utils/string_cast.hpp>
// Boost
#include <boost/type_traits/remove_reference.hpp>
@@ -65,6 +66,7 @@ public:
, m_tc_line( tc_line )
, m_par_begin( par_begin )
, m_par_end( par_end )
+ , m_index( 0 )
{}
virtual test_unit* next() const
@@ -72,9 +74,10 @@ public:
if( m_par_begin == m_par_end )
return (test_unit*)0;
- test_unit* res = new test_case( m_tc_name, m_tc_file, m_tc_line, boost::bind( m_test_func, *m_par_begin ) );
+ test_unit* res = new test_case( m_tc_name + "_" + utils::string_cast(m_index), m_tc_file, m_tc_line, boost::bind( m_test_func, *m_par_begin ) );
++m_par_begin;
+ ++m_index;
return res;
}
@@ -87,6 +90,7 @@ private:
std::size_t m_tc_line;
mutable ParamIter m_par_begin;
ParamIter m_par_end;
+ mutable std::size_t m_index;
};
//____________________________________________________________________________//