Euphoria
falsestring.cc
Go to the documentation of this file.
1 #include "tests/falsestring.h"
2 
3 
4 namespace eu::tests
5 {
6  FalseString FalseString::create_false(const std::string& text)
7  {
8  return {text};
9  }
10 
11 
14  {
15  return {""};
16  }
17 
18 
19  FalseString::operator bool() const
20  {
21  return str.empty();
22  }
23 
24 
25  std::ostream&
26  operator<<(std::ostream& s, const FalseString& f)
27  {
28  if(f)
29  {
30  s << "<ok>";
31  }
32  else
33  {
34  s << f.str;
35  }
36  return s;
37  }
38 }
39 
std::ostream & operator<<(std::ostream &stream, const custom::Approx< T > &v)
Definition: approx.h:118
represents a error (false) or empty string (true)
Definition: falsestring.h:10
static FalseString create_true()
Definition: falsestring.cc:13
static FalseString create_false(const std::string &text)
Definition: falsestring.cc:6