From 8cb08a019f672210e37fbe3e248291bc311fa2a3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 15 Nov 2018 18:18:14 +0200 Subject: [PATCH] Add current_function_test2 --- test/Jamfile.v2 | 2 ++ test/current_function_test2.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 test/current_function_test2.cpp diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 0b5f252..d1595c8 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -25,3 +25,5 @@ run assert_msg_test2.cpp ; # quick test (for CI) run quick.cpp ; + +run current_function_test2.cpp ; diff --git a/test/current_function_test2.cpp b/test/current_function_test2.cpp new file mode 100644 index 0000000..e3c2523 --- /dev/null +++ b/test/current_function_test2.cpp @@ -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 +#include +#include + +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(); +}