mirror of
https://github.com/boostorg/leaf.git
synced 2026-02-10 23:42:20 +00:00
Improved diagnostics
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.
|
||||
// Copyright 2018-2023 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
// 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)
|
||||
@@ -11,8 +11,12 @@
|
||||
# include <boost/leaf/result.hpp>
|
||||
#endif
|
||||
|
||||
#if BOOST_LEAF_CFG_STD_STRING
|
||||
# include <sstream>
|
||||
# include <iostream>
|
||||
#endif
|
||||
|
||||
#include "lightweight_test.hpp"
|
||||
#include <sstream>
|
||||
|
||||
namespace leaf = boost::leaf;
|
||||
|
||||
@@ -40,9 +44,10 @@ void test( G && g )
|
||||
{
|
||||
BOOST_TEST_EQ(i42.value, 42);
|
||||
#if BOOST_LEAF_CFG_STD_STRING
|
||||
std::stringstream ss; ss << di;
|
||||
std::stringstream ss;
|
||||
ss << di;
|
||||
std::string s = ss.str();
|
||||
std::cout << s;
|
||||
std::cout << s << std::endl;
|
||||
#if BOOST_LEAF_CFG_DIAGNOSTICS
|
||||
BOOST_TEST(s.find("info<-42>")!=s.npos);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user