Added test printer for std::future_status.
Bug: 297082009 Test: run_zimperium_dev Change-Id: I65904821de45a7d5bd515388dcaf9cace53a4893 (cherry picked from commit 61dd2b7951ace38a0710909928028144462db165)
This commit is contained in:
@@ -79,3 +79,20 @@ void PrintTo(const SystemState& state, std::ostream* os) {
|
|||||||
}
|
}
|
||||||
} // namespace okp
|
} // namespace okp
|
||||||
} // namespace wvcdm
|
} // namespace wvcdm
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
void PrintTo(future_status status, ostream* os) {
|
||||||
|
switch (status) {
|
||||||
|
case future_status::ready:
|
||||||
|
*os << "future_status::ready";
|
||||||
|
return;
|
||||||
|
case future_status::timeout:
|
||||||
|
*os << "future_status::timeout";
|
||||||
|
return;
|
||||||
|
case future_status::deferred:
|
||||||
|
*os << "future_status::deferred";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*os << "<unknown(" << static_cast<int>(status) << ")>";
|
||||||
|
}
|
||||||
|
} // namespace std
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#ifndef CDM_TEST_PRINTERS_H_
|
#ifndef CDM_TEST_PRINTERS_H_
|
||||||
#define CDM_TEST_PRINTERS_H_
|
#define CDM_TEST_PRINTERS_H_
|
||||||
|
|
||||||
|
#include <future>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "OEMCryptoCENC.h"
|
#include "OEMCryptoCENC.h"
|
||||||
@@ -24,4 +25,9 @@ namespace okp {
|
|||||||
void PrintTo(const SystemState& state, std::ostream* os);
|
void PrintTo(const SystemState& state, std::ostream* os);
|
||||||
} // namespace okp
|
} // namespace okp
|
||||||
} // namespace wvcdm
|
} // namespace wvcdm
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
void PrintTo(future_status status, ostream* os);
|
||||||
|
} // namespace std
|
||||||
|
|
||||||
#endif // CDM_TEST_PRINTERS_H_
|
#endif // CDM_TEST_PRINTERS_H_
|
||||||
|
|||||||
Reference in New Issue
Block a user