MCPcopy Create free account
hub / github.com/apache/thrift / reconstructExpression

Method reconstructExpression

compiler/cpp/tests/catch/catch.hpp:1896–1912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1894 }
1895
1896 virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE {
1897 std::string lhs = Catch::toString( m_lhs );
1898 std::string rhs = Catch::toString( m_rhs );
1899 char delim = lhs.size() + rhs.size() < 40 &&
1900 lhs.find('\n') == std::string::npos &&
1901 rhs.find('\n') == std::string::npos ? ' ' : '\n';
1902 dest.reserve( 7 + lhs.size() + rhs.size() );
1903 // 2 for spaces around operator
1904 // 2 for operator
1905 // 2 for parentheses (conditionally added later)
1906 // 1 for negation (conditionally added later)
1907 dest = lhs;
1908 dest += delim;
1909 dest += Internal::OperatorTraits<Op>::getName();
1910 dest += delim;
1911 dest += rhs;
1912 }
1913
1914private:
1915 ResultBuilder& m_rb;

Callers

nothing calls this directly

Calls 3

toStringFunction · 0.85
findMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected