2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 16:52:15 +00:00

This commit was manufactured by cvs2svn to create branch 'mpl_v2'.

[SVN r13495]
This commit is contained in:
nobody
2002-04-15 16:30:54 +00:00
parent 8eab74ea81
commit fd16f736f3
235 changed files with 0 additions and 33389 deletions

View File

@@ -1,148 +0,0 @@
#include <boost/python/converter/from_python.hpp>
//#include <cassert>
//#include <boost/type_traits.hpp>
#include <boost/python/converter/type_id.hpp>
#include <iostream>
int result;
#define ASSERT_SAME(T1,T2) \
if (!is_same< T1, T2 >::value) { \
std::cout << "*********************\n"; \
std::cout << type_id< T1 >() << " != " << type_id< T2 >() << "\n"; \
std::cout << "*********************\n"; \
result = 1; \
}
int main()
{
using namespace boost::python::converter;
using namespace boost;
ASSERT_SAME(
select_from_python<int>::type, rvalue_from_python<int>
);
ASSERT_SAME(
select_from_python<int const>::type, rvalue_from_python<int const>
);
ASSERT_SAME(
select_from_python<int volatile>::type, rvalue_from_python<int volatile>
);
ASSERT_SAME(
select_from_python<int const volatile>::type, rvalue_from_python<int const volatile>
);
ASSERT_SAME(
select_from_python<int*>::type, pointer_from_python<int*>
);
ASSERT_SAME(
select_from_python<int const*>::type, pointer_from_python<int const*>
);
ASSERT_SAME(
select_from_python<int volatile*>::type, pointer_from_python<int volatile*>
);
ASSERT_SAME(
select_from_python<int const volatile*>::type, pointer_from_python<int const volatile*>
);
ASSERT_SAME(
select_from_python<int&>::type, reference_from_python<int&>
);
ASSERT_SAME(
select_from_python<int const&>::type, rvalue_from_python<int const&>
);
ASSERT_SAME(
select_from_python<int volatile&>::type, reference_from_python<int volatile&>
);
ASSERT_SAME(
select_from_python<int const volatile&>::type, reference_from_python<int const volatile&>
);
ASSERT_SAME(
select_from_python<int*&>::type, reference_from_python<int*&>
);
ASSERT_SAME(
select_from_python<int const*&>::type, reference_from_python<int const*&>
);
ASSERT_SAME(
select_from_python<int volatile*&>::type, reference_from_python<int volatile*&>
);
ASSERT_SAME(
select_from_python<int const volatile*&>::type, reference_from_python<int const volatile*&>
);
ASSERT_SAME(
select_from_python<int* const&>::type, pointer_const_reference_from_python<int*const&>
);
ASSERT_SAME(
select_from_python<int const* const&>::type, pointer_const_reference_from_python<int const*const&>
);
ASSERT_SAME(
select_from_python<int volatile* const&>::type, pointer_const_reference_from_python<int volatile*const&>
);
ASSERT_SAME(
select_from_python<int const volatile* const&>::type, pointer_const_reference_from_python<int const volatile*const&>
);
ASSERT_SAME(
select_from_python<int*volatile&>::type, reference_from_python<int*volatile&>
);
ASSERT_SAME(
select_from_python<int const*volatile&>::type, reference_from_python<int const*volatile&>
);
ASSERT_SAME(
select_from_python<int volatile*volatile&>::type, reference_from_python<int volatile*volatile&>
);
ASSERT_SAME(
select_from_python<int const volatile*volatile&>::type, reference_from_python<int const volatile*volatile&>
);
ASSERT_SAME(
select_from_python<int*const volatile&>::type, reference_from_python<int*const volatile&>
);
ASSERT_SAME(
select_from_python<int const*const volatile&>::type, reference_from_python<int const*const volatile&>
);
ASSERT_SAME(
select_from_python<int volatile*const volatile&>::type, reference_from_python<int volatile*const volatile&>
);
ASSERT_SAME(
select_from_python<int const volatile*const volatile&>::type, reference_from_python<int const volatile*const volatile&>
);
return result;
}