2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-02-10 23:42:20 +00:00

Improved diagnostics

This commit is contained in:
Emil Dotchevski
2023-09-15 11:15:10 -07:00
parent 9e39b70c5a
commit 87efaf7380
32 changed files with 624 additions and 267 deletions

View File

@@ -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;
@@ -53,9 +57,10 @@ int main()
{
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