Documentation
Overview
Building ASL
Documentation
Library Wiki Docs
Indices
Browse Perforce
More Info
Release Notes
Wiki
Site Search
License
Success Stories
Contributors
Media
Download
Perforce Depots
Support
ASL SourceForge Home
Mailing Lists
Discussion Forums
Report Bugs
Suggest Features
Contribute to ASL
RSS
Short-text news
Full-text news
File releases
Other Adobe Projects
Open @ Adobe
Adobe Open Source
Adobe Labs
Adobe Media Gallery
C++ Benchmarks
Other Resources
Boost
RIAForge
SGI STL
adobe
test
check_null.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2005-2007 Adobe Systems Incorporated
3
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
4
or a copy at http://stlab.adobe.com/licenses.html)
5
*/
6
7
/*************************************************************************************************/
8
9
#include <
adobe/config.hpp
>
10
#include <boost/test/unit_test.hpp>
11
12
namespace
adobe {
18
template
<
typename
T>
19
void
check_null
(
const
T& x)
20
{
21
T t = T();
22
if
(t)
23
BOOST_ERROR(
"operator bool"
);
24
BOOST_CHECK_MESSAGE(!t,
"operator!"
);
25
26
BOOST_CHECK_MESSAGE(x,
"operator!"
);
27
if
(!x)
28
BOOST_ERROR(
"operator bool"
);
29
30
}
32
}
33