Bugfixes and more tests

This commit is contained in:
apolukhin
2013-10-10 18:08:30 +04:00
parent d66810d2cc
commit 7a958aa5e5
10 changed files with 93 additions and 5 deletions

View File

@@ -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

View File

@@ -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
]
;

View File

@@ -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{};

View File

@@ -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>

View File

@@ -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{};

View 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"

View 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"

View 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"

View File

@@ -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{};

View File

@@ -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>