xo-reader2: + pretty-printing for ParserResult + use in utest
This commit is contained in:
parent
013c1a4896
commit
4536fa5000
1 changed files with 9 additions and 0 deletions
|
|
@ -279,6 +279,15 @@ namespace xo {
|
||||||
///@}
|
///@}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline std::ostream & operator<<(std::ostream & os, const DString * x) {
|
||||||
|
if (x) {
|
||||||
|
os << std::string_view(*x);
|
||||||
|
} else {
|
||||||
|
os << "nullptr";
|
||||||
|
}
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool operator==(const DString & lhs, const DString & rhs) {
|
inline bool operator==(const DString & lhs, const DString & rhs) {
|
||||||
return DString::compare(lhs, rhs) == 0;
|
return DString::compare(lhs, rhs) == 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue