File: hash_fwd_test_2.cpp

package info (click to toggle)
boost 1.34.1-14
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 116,412 kB
  • ctags: 259,566
  • sloc: cpp: 642,395; xml: 56,450; python: 17,612; ansic: 14,520; sh: 2,265; yacc: 858; perl: 481; makefile: 478; lex: 94; sql: 74; csh: 6
file content (39 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

//  Copyright Daniel James 2006. 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"

#include <boost/detail/lightweight_test.hpp>

template <class T> void unused(T const&) {}

void fwd_test()
{
    test::test_type1<int> x1(3);
    test::test_type1<std::string> y1("Black");
    test::test_type2<int> x2(25, 16);
    test::test_type2<std::string> y2("White", "Green");

    std::vector<int> empty;
    std::vector<std::string> empty2;

    test::test_type3<int> x3(empty.begin(), empty.end());
    test::test_type3<std::string> y3(empty2.begin(), empty2.end());

    // Prevent gcc warnings:
    unused(x1); unused(x2); unused(x3);
    unused(y1); unused(y2); unused(y3);
}


int main()
{
    fwd_test();
    return boost::report_errors();
}