1 // Copyright 2017 Peter Dimov. 2 // 3 // Distributed under the Boost Software License, Version 1.0. 4 // 5 // See accompanying file LICENSE_1_0.txt or copy at 6 // http://www.boost.org/LICENSE_1_0.txt 7 8 #include <boost/config/helper_macros.hpp> 9 #include <boost/core/lightweight_test.hpp> 10 main()11int main() 12 { 13 #define X pumpkin 14 15 BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(X), "pumpkin" ); 16 BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(__LINE__), "16" ); 17 18 #define Y 2 19 20 int BOOST_JOIN(X, Y) = 0; 21 (void)pumpkin2; 22 23 int BOOST_JOIN(X, __LINE__) = 0; 24 (void)pumpkin23; 25 26 BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(BOOST_JOIN(X, Y)), "pumpkin2" ); 27 BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(BOOST_JOIN(X, __LINE__)), "pumpkin27" ); 28 29 return boost::report_errors(); 30 } 31