#ifndef BOOST_WINAPI_TEST_RUN_ABI_TEST_TOOLS_HPP_INCLUDED_
#define BOOST_WINAPI_TEST_RUN_ABI_TEST_TOOLS_HPP_INCLUDED_
#include <boost/winapi/config.hpp>
#include <boost/config.hpp>
#include <boost/current_function.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/core/lightweight_test_trait.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/type_traits/is_same.hpp>
#include <cstddef>
#define BOOST_WINAPI_NAME(name)\
boost::winapi::name
#define BOOST_WINAPI_TEST_CONSTANT(name)\
BOOST_TEST_EQ(name, BOOST_WINAPI_NAME(name ## _))
#define BOOST_WINAPI_TEST_TYPE_SAME(name)\
BOOST_TEST_TRAIT_TRUE((boost::is_same< name, BOOST_WINAPI_NAME(name ## _) >))
#define BOOST_WINAPI_TEST_TYPE_SIZE(name)\
BOOST_TEST_EQ(sizeof(name), sizeof(BOOST_WINAPI_NAME(name ## _)))
#define BOOST_WINAPI_TEST_STRUCT_FIELD(r, names, field)\
BOOST_TEST_EQ(sizeof(BOOST_PP_TUPLE_ELEM(2, 0, names)().field), sizeof(BOOST_PP_TUPLE_ELEM(2, 1, names)().field));\
BOOST_TEST_EQ(offsetof(BOOST_PP_TUPLE_ELEM(2, 0, names), field), offsetof(BOOST_PP_TUPLE_ELEM(2, 1, names), field));
#define BOOST_WINAPI_TEST_STRUCT(name, fields)\
BOOST_PP_SEQ_FOR_EACH(BOOST_WINAPI_TEST_STRUCT_FIELD, (name, BOOST_WINAPI_NAME(name ## _)), fields)\
BOOST_TEST_EQ(sizeof(name), sizeof(BOOST_WINAPI_NAME(name ## _)))
#if defined(BOOST_MSVC)
#pragma warning(push, 3)
#pragma warning(disable: 4127)
#endif
template< typename Windows_SDK_Signature, typename BoostWinAPI_Signature >
inline void test_equal_signatures(Windows_SDK_Signature*, BoostWinAPI_Signature*, const char* test_name, const char* file, int line)
{
boost::detail::test_impl(test_name, file, line, BOOST_CURRENT_FUNCTION,
boost::is_same< Windows_SDK_Signature, BoostWinAPI_Signature >::value);
}
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
#if !defined(BOOST_NO_CXX11_DECLTYPE)
#define BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(name)\
test_equal_signatures((decltype(&name))0, (decltype(&BOOST_WINAPI_NAME(name)))0, "BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(" #name ")", __FILE__, __LINE__)
#else
#define BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(name)\
test_equal_signatures(&name, &BOOST_WINAPI_NAME(name), "BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(" #name ")", __FILE__, __LINE__)
#endif
#endif