1 // Copyright Louis Dionne 2013-2017 2 // Distributed under the Boost Software License, Version 1.0. 3 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) 4 5 #include <boost/hana/assert.hpp> 6 #include <boost/hana/experimental/printable.hpp> 7 #include <boost/hana/string.hpp> 8 9 #include <sstream> 10 namespace hana = boost::hana; 11 12 main()13int main() { 14 { 15 std::ostringstream ss; 16 ss << hana::experimental::print( 17 BOOST_HANA_STRING("") 18 ); 19 BOOST_HANA_RUNTIME_CHECK(ss.str() == "\"\""); 20 } 21 22 { 23 std::ostringstream ss; 24 ss << hana::experimental::print( 25 BOOST_HANA_STRING("x") 26 ); 27 BOOST_HANA_RUNTIME_CHECK(ss.str() == "\"x\""); 28 } 29 30 { 31 std::ostringstream ss; 32 ss << hana::experimental::print( 33 BOOST_HANA_STRING("xy") 34 ); 35 BOOST_HANA_RUNTIME_CHECK(ss.str() == "\"xy\""); 36 } 37 38 { 39 std::ostringstream ss; 40 ss << hana::experimental::print( 41 BOOST_HANA_STRING("xyz") 42 ); 43 BOOST_HANA_RUNTIME_CHECK(ss.str() == "\"xyz\""); 44 } 45 } 46