check_null.hppGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <adobe/config.hpp>
00010 #include <boost/test/unit_test.hpp>
00011
00012 namespace adobe {
00018 template <typename T>
00019 void check_null(const T& x)
00020 {
00021 T t = T();
00022 if(t)
00023 BOOST_ERROR("operator bool");
00024 BOOST_CHECK_MESSAGE(!t, "operator!");
00025
00026 BOOST_CHECK_MESSAGE(x, "operator!");
00027 if(!x)
00028 BOOST_ERROR("operator bool");
00029
00030 }
00032 }
00033
|