forked from boostorg/type_index
Minor change of interface. Added default constructors. More tests added. Documentation improved
This commit is contained in:
1 parent
de0d90eca1
commit
78824176ea
5 files changed
+106
-21
No files matched your search
@@ -35,6 +35,30 @@ BOOST_AUTO_TEST_CASE(names_matches_type_id)
|
||||
BOOST_CHECK_EQUAL(type_id<double>().name(), type_id<double>().name());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(default_construction)
|
||||
{
|
||||
using namespace boost::typeind;
|
||||
type_index ti1, ti2;
|
||||
BOOST_CHECK_EQUAL(ti1, ti2);
|
||||
BOOST_CHECK_EQUAL(type_id<void>(), ti1);
|
||||
|
||||
BOOST_CHECK_EQUAL(type_id<void>().name(), ti1.name());
|
||||
BOOST_CHECK_NE(type_id<int>(), ti1);
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(copy_construction)
|
||||
{
|
||||
using namespace boost::typeind;
|
||||
type_index ti1, ti2 = type_id<int>();
|
||||
BOOST_CHECK_NE(ti1, ti2);
|
||||
ti1 = ti2;
|
||||
BOOST_CHECK_EQUAL(ti2, ti1);
|
||||
|
||||
const type_index ti3(ti1);
|
||||
BOOST_CHECK_EQUAL(ti3, ti1);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(comparators_type_id)
|
||||
{
|
||||
using namespace boost::typeind;
|
||||
|
||||
Reference in new issue
Block a user