| 40 | } |
| 41 | |
| 42 | static std::vector<std::string> GetDebugReportStrings(DebugReportFlags flags) { |
| 43 | static const char *table[] = {"DEBUG_REPORT_NOTIFICATION_BIT", "DEBUG_REPORT_WARNING_BIT", "DEBUG_REPORT_ERROR_BIT", |
| 44 | "DEBUG_REPORT_DEBUG_BIT"}; |
| 45 | |
| 46 | std::vector<std::string> result; |
| 47 | |
| 48 | for (std::size_t i = 0, n = std::size(table); i < n; ++i) { |
| 49 | if (flags & (1 << i)) { |
| 50 | result.push_back(table[i]); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | return result; |
| 55 | } |
| 56 | |
| 57 | TEST(TestsUtil, DebugReport) { |
| 58 | std::vector<std::string> strings = GetDebugReportStrings(DEBUG_REPORT_MAX_ENUM); |