forked from boostorg/container_hash
Add a trivial test to see if the deprecated hash headers compile okay when included.
[SVN r39994]
This commit is contained in:
@@ -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 : : : <test-info>always_show_run_output ]
|
||||
;
|
||||
|
||||
build-project ../examples ;
|
||||
|
26
test/hash_deprecated_headers.cpp
Normal file
26
test/hash_deprecated_headers.cpp
Normal file
@@ -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 <boost/functional/hash/deque.hpp>
|
||||
#include <boost/functional/hash/list.hpp>
|
||||
#include <boost/functional/hash/map.hpp>
|
||||
#include <boost/functional/hash/pair.hpp>
|
||||
#include <boost/functional/hash/set.hpp>
|
||||
#include <boost/functional/hash/vector.hpp>
|
||||
|
||||
// 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 <vector>
|
||||
|
||||
int main() {
|
||||
std::vector<int> v;
|
||||
boost::hash<std::vector<int> > x;
|
||||
x(v);
|
||||
}
|
Reference in New Issue
Block a user