From c068ca0bdaf17143b07bc0bfb1d3fe72268ff48d Mon Sep 17 00:00:00 2001 From: Thomas Witt Date: Mon, 9 Dec 2002 18:07:16 +0000 Subject: [PATCH] Added failure checks. [SVN r754] --- test/Jamfile | 4 +++- test/interoperable_fail.cpp | 16 ++++++++++++++++ test/is_convertible_fail.cpp | 15 +++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 test/interoperable_fail.cpp create mode 100644 test/is_convertible_fail.cpp diff --git a/test/Jamfile b/test/Jamfile index 1fc4e61..d01213c 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -2,4 +2,6 @@ SEARCH on testing.jam = $(BOOST_BUILD_PATH) ; include testing.jam ; run iterator_adaptor_cc.cpp ; run transform_iterator_test.cpp ; -run indirect_iterator_test.cpp ; \ No newline at end of file +run indirect_iterator_test.cpp ; +compile-fail interoperable_fail.cpp ; +compile-fail is_convertible_fail.cpp ; \ No newline at end of file diff --git a/test/interoperable_fail.cpp b/test/interoperable_fail.cpp new file mode 100644 index 0000000..f7920c4 --- /dev/null +++ b/test/interoperable_fail.cpp @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +int main() +{ + { + typedef boost::reverse_iterator::iterator> rev_iter; + typedef boost::indirect_iterator::iterator> ind_iter; + + ind_iter() == rev_iter(); + } + + return boost::exit_success; +} diff --git a/test/is_convertible_fail.cpp b/test/is_convertible_fail.cpp new file mode 100644 index 0000000..933ff38 --- /dev/null +++ b/test/is_convertible_fail.cpp @@ -0,0 +1,15 @@ +#include +#include +#include + +int main() +{ + { + typedef boost::reverse_iterator rev_iter1; + typedef boost::reverse_iterator rev_iter2; + + BOOST_STATIC_ASSERT((boost::is_convertible::value)); + } + + return boost::exit_success; +}