1 | // |
---|---|
2 | // current_function_test2.cpp - a test for boost/current_function.hpp |
3 | // |
4 | // Copyright 2018 Peter Dimov |
5 | // |
6 | // Distributed under the Boost Software License, Version 1.0. |
7 | // See accompanying file LICENSE_1_0.txt or copy at |
8 | // http://www.boost.org/LICENSE_1_0.txt |
9 | // |
10 | |
11 | #include <boost/current_function.hpp> |
12 | #include <boost/core/lightweight_test.hpp> |
13 | #include <string> |
14 | |
15 | int f() |
16 | { |
17 | BOOST_TEST_EQ( std::string( BOOST_CURRENT_FUNCTION ).substr( 0, 4 ), std::string( "int ") ); |
18 | return 0; |
19 | } |
20 | |
21 | int main() |
22 | { |
23 | f(); |
24 | return boost::report_errors(); |
25 | } |
26 |