Add current_function_test2

This commit is contained in:
Peter Dimov
2018-11-15 18:18:14 +02:00
parent dbe3f8c641
commit 8cb08a019f
2 changed files with 27 additions and 0 deletions

View File

@ -25,3 +25,5 @@ run assert_msg_test2.cpp ;
# quick test (for CI)
run quick.cpp ;
run current_function_test2.cpp ;

View File

@ -0,0 +1,25 @@
//
// current_function_test2.cpp - a test for boost/current_function.hpp
//
// Copyright 2018 Peter Dimov
//
// 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
//
#include <boost/current_function.hpp>
#include <boost/core/lightweight_test.hpp>
#include <string>
int f()
{
BOOST_TEST_EQ( std::string( BOOST_CURRENT_FUNCTION ).substr( 0, 4 ), std::string( "int " ) );
return 0;
}
int main()
{
f();
return boost::report_errors();
}