2
0
mirror of https://github.com/boostorg/tti.git synced 2026-01-30 20:32:12 +00:00
Files
tti/test/test_mf_has_mem_data_compile.cpp
Edward Diener 62d9696840 Updated tests and header file inclusion.
[SVN r69815]
2011-03-10 02:44:14 +00:00

148 lines
5.2 KiB
C++

#include "test_mf_has_mem_data.hpp"
#include <boost/mpl/assert.hpp>
int main()
{
using namespace boost::mpl::placeholders;
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_HAS_MEMBER_DATA_GEN(AnInt)<_,_>,
boost::mpl::identity<AType>,
boost::mpl::identity<int>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_HAS_MEMBER_DATA_GEN(AnInt)<_,_>,
boost::mpl::identity<AnotherType>,
boost::mpl::identity<long>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_HAS_MEMBER_DATA_GEN(aMember)<_,_>,
boost::mpl::identity<AnotherType>,
boost::mpl::identity<bool>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_TRAIT_GEN(CMember)<_,_>,
boost::mpl::identity<AnotherType>,
boost::mpl::identity<bool>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_HAS_MEMBER_DATA_GEN(IntBT)<_,_>,
boost::mpl::identity<AType>,
BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_TRAIT_GEN(NestedData)<_,_>,
boost::mpl::identity<AType>,
boost::tti::mf_member_type
<
BOOST_TTI_MEMBER_TYPE_GEN(CType)<_>,
BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType>
>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_TRAIT_GEN(AOther)<_,_>,
boost::mpl::identity<AnotherType>,
boost::mpl::identity<AType>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_HAS_MEMBER_DATA_GEN(ONestStr)<_,_>,
boost::mpl::identity<AnotherType>,
BOOST_TTI_MEMBER_TYPE_GEN(AStructType)<AType>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_MTFC_HAS_MEMBER_DATA_GEN(AnInt),
boost::mpl::identity<AType>,
boost::mpl::identity<int>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_MTFC_HAS_MEMBER_DATA_GEN(AnInt),
boost::mpl::identity<AnotherType>,
boost::mpl::identity<long>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_MTFC_HAS_MEMBER_DATA_GEN(aMember),
boost::mpl::identity<AnotherType>,
boost::mpl::identity<bool>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_TRAIT_GEN(MFCMember),
boost::mpl::identity<AnotherType>,
boost::mpl::identity<bool>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_MTFC_HAS_MEMBER_DATA_GEN(IntBT),
boost::mpl::identity<AType>,
BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_TRAIT_GEN(MFNestedData),
boost::mpl::identity<AType>,
boost::tti::mf_member_type
<
BOOST_TTI_MTFC_MEMBER_TYPE_GEN(CType),
BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType>
>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_TRAIT_GEN(MFAOther),
boost::mpl::identity<AnotherType>,
boost::mpl::identity<AType>
>
));
BOOST_MPL_ASSERT((boost::tti::mf_has_member_data
<
BOOST_TTI_MTFC_HAS_MEMBER_DATA_GEN(ONestStr),
boost::mpl::identity<AnotherType>,
BOOST_TTI_MEMBER_TYPE_GEN(AStructType)<AType>
>
));
return 0;
}