1 /*
2  *  Created by Phil Nash on 8/8/2017.
3  *  Copyright 2017 Two Blue Cubes Ltd. All rights reserved.
4  *
5  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
6  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7  */
8 
9 #include "catch_decomposer.h"
10 #include "catch_config.hpp"
11 
12 namespace Catch {
13 
14     ITransientExpression::~ITransientExpression() = default;
15 
formatReconstructedExpression(std::ostream & os,std::string const & lhs,StringRef op,std::string const & rhs)16     void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {
17         if( lhs.size() + rhs.size() < 40 &&
18                 lhs.find('\n') == std::string::npos &&
19                 rhs.find('\n') == std::string::npos )
20             os << lhs << " " << op << " " << rhs;
21         else
22             os << lhs << "\n" << op << "\n" << rhs;
23     }
24 }
25