Add tests for the hash forward header.

[SVN r32587]
This commit is contained in:
Daniel James committed 2006-02-05 16:06:31 +00:00
1 parent 1f2c6bfaba
commit e78d662c7a
4 files changed
+206

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
// (C) Copyright Daniel James 2005.
// Use, modification and distribution are subject to 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)
// This test just makes sure a header which uses hash_fwd can compile without
// the main hash headers.
#include "./hash_fwd_test.hpp"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
template <class T> void unused(T const&) {}
BOOST_AUTO_TEST_CASE(fwd_test)
{
test_type1<int> x1(3);
test_type1<std::string> y1("Black");
test_type2<int> x2(25, 16);
test_type2<std::string> y2("White", "Green");
std::vector<int> empty;
std::vector<std::string> empty2;
test_type3<int> x3(empty.begin(), empty.end());
test_type3<std::string> y3(empty2.begin(), empty2.end());
// Prevent gcc warnings:
unused(x1); unused(x2); unused(x3);
unused(y1); unused(y2); unused(y3);
}