forked from boostorg/type_index
Bugfixes and more tests
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#else
|
||||
# include <boost/type_index/template_index_impl.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
typedef template_index type_index;
|
||||
|
||||
template <class T>
|
||||
@@ -26,9 +28,10 @@ type_index type_id() {
|
||||
return template_index::construct<T>();
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NO_RTTI
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TYPE_INDEX_TYPE_INDEX_MINIMAL_HPP
|
||||
|
||||
|
@@ -18,5 +18,24 @@ test-suite type_index
|
||||
[ run type_index_test.cpp ]
|
||||
[ run template_index_test.cpp ]
|
||||
[ run testing_both.cpp ]
|
||||
[ run testing_both_no_rtti.cpp : : : <define>BOOST_NO_RTTI
|
||||
<toolset>gcc-4.3:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.4:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.5:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.6:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.7:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.8:<cxxflags>-fno-rtti
|
||||
<toolset>clang:<cxxflags>-fno-rtti
|
||||
]
|
||||
[ run testing_minimal.cpp ]
|
||||
[ run testing_minimal_no_rtti.cpp : : : <define>BOOST_NO_RTTI
|
||||
<toolset>gcc-4.3:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.4:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.5:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.6:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.7:<cxxflags>-fno-rtti
|
||||
<toolset>gcc-4.8:<cxxflags>-fno-rtti
|
||||
<toolset>clang:<cxxflags>-fno-rtti
|
||||
]
|
||||
;
|
||||
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#define BOOST_TEST_MODULE template_index_test_module
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/type_index/template_index_impl.hpp>
|
||||
|
||||
namespace my_namespace1 {
|
||||
class my_class{};
|
||||
|
@@ -5,8 +5,6 @@
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/type_index/template_index_impl.hpp>
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#define BOOST_TEST_MODULE testing_both_test_module
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/type_index.hpp>
|
||||
|
||||
namespace my_namespace1 {
|
||||
class my_class{};
|
||||
|
23
libs/type_index/test/testing_both_no_rtti.cpp
Normal file
23
libs/type_index/test/testing_both_no_rtti.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Copyright Antony Polukhin, 2012-2013.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MODULE testing_both_test_module
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/type_index.hpp>
|
||||
|
||||
namespace my_namespace1 {
|
||||
class my_class{};
|
||||
}
|
||||
|
||||
|
||||
namespace my_namespace2 {
|
||||
class my_class{};
|
||||
}
|
||||
|
||||
#include "type_index_tests.ipp"
|
||||
#include "template_index_tests.ipp"
|
||||
|
22
libs/type_index/test/testing_minimal.cpp
Normal file
22
libs/type_index/test/testing_minimal.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright Antony Polukhin, 2012-2013.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MODULE testing_both_test_module
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/type_index/type_index_minimal.hpp>
|
||||
|
||||
namespace my_namespace1 {
|
||||
class my_class{};
|
||||
}
|
||||
|
||||
|
||||
namespace my_namespace2 {
|
||||
class my_class{};
|
||||
}
|
||||
|
||||
#include "type_index_tests.ipp"
|
||||
|
22
libs/type_index/test/testing_minimal_no_rtti.cpp
Normal file
22
libs/type_index/test/testing_minimal_no_rtti.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright Antony Polukhin, 2012-2013.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MODULE testing_both_test_module
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/type_index/type_index_minimal.hpp>
|
||||
|
||||
namespace my_namespace1 {
|
||||
class my_class{};
|
||||
}
|
||||
|
||||
|
||||
namespace my_namespace2 {
|
||||
class my_class{};
|
||||
}
|
||||
|
||||
#include "type_index_tests.ipp"
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#define BOOST_TEST_MODULE type_index_test_module
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/type_index/type_index_impl.hpp>
|
||||
|
||||
namespace my_namespace1 {
|
||||
class my_class{};
|
||||
|
@@ -5,8 +5,6 @@
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/type_index/type_index_impl.hpp>
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
|
Reference in New Issue
Block a user