]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/experimental/printable/string.cpp
419e06ad2a2c54fdaa2c8bc9f2671db271156ffb
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)
5 #include <boost/hana/assert.hpp>
6 #include <boost/hana/experimental/printable.hpp>
7 #include <boost/hana/string.hpp>
10 namespace hana
= boost::hana
;
15 std::ostringstream ss
;
16 ss
<< hana::experimental::print(
19 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "\"\"");
23 std::ostringstream ss
;
24 ss
<< hana::experimental::print(
25 BOOST_HANA_STRING("x")
27 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "\"x\"");
31 std::ostringstream ss
;
32 ss
<< hana::experimental::print(
33 BOOST_HANA_STRING("xy")
35 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "\"xy\"");
39 std::ostringstream ss
;
40 ss
<< hana::experimental::print(
41 BOOST_HANA_STRING("xyz")
43 BOOST_HANA_RUNTIME_CHECK(ss
.str() == "\"xyz\"");