10 #ifndef LLVM_TESTING_SUPPORT_SUPPORTHELPERS_H 11 #define LLVM_TESTING_SUPPORT_SUPPORTHELPERS_H 15 #include "gtest/gtest-printers.h" 20 std::vector<std::shared_ptr<ErrorInfoBase>>
Infos;
22 bool Success()
const {
return Infos.empty(); }
34 OS << (Err.
Success() ?
"succeeded" :
"failed");
36 const char *Delim =
" (";
37 for (
const auto &Info : Err.
Infos) {
49 *Out <<
"succeeded with value " << ::testing::PrintToString(*Item.
Exp);
51 PrintTo(static_cast<const ErrorHolder &>(Item), Out);
Compute iterated dominance frontiers using a linear time algorithm.
raw_os_ostream - A raw_ostream that writes to an std::ostream.
Tagged union holding either a T or a Error.
void PrintTo(const ErrorHolder &Err, std::ostream *Out)
std::vector< std::shared_ptr< ErrorInfoBase > > Infos
ExpectedHolder(ErrorHolder Err, Expected< T > &Exp)