From 76fc46ae6961cc9d52d18e52bd1168c5e70c9003 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 13 Oct 2007 22:43:13 +0000 Subject: [PATCH] Add a trivial test to see if the deprecated hash headers compile okay when included. [SVN r39994] --- hash/test/Jamfile.v2 | 1 + hash/test/hash_deprecated_headers.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 hash/test/hash_deprecated_headers.cpp diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index 1f6b14f..b0ac974 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -40,6 +40,7 @@ test-suite functional/hash [ compile-fail hash_no_ext_fail_test.cpp ] [ run hash_no_ext_macro_1.cpp ] [ run hash_no_ext_macro_2.cpp ] + [ run hash_deprecated_headers.cpp : : : always_show_run_output ] ; build-project ../examples ; diff --git a/hash/test/hash_deprecated_headers.cpp b/hash/test/hash_deprecated_headers.cpp new file mode 100644 index 0000000..3257d9b --- /dev/null +++ b/hash/test/hash_deprecated_headers.cpp @@ -0,0 +1,26 @@ + +// Copyright 2007 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// All these headers are meant output a warning, but not cause the compilation +// to fail. + +#include +#include +#include +#include +#include +#include + +// And a quick check that the hash library was included. +// Strictly speaking I should do this once for each header +// but that would just be wasting the testing resources. + +#include + +int main() { + std::vector v; + boost::hash > x; + x(v); +}