MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Profiles / GetDebugReportStrings

Function GetDebugReportStrings

layer/tests/tests_util.cpp:42–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42static 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
57TEST(TestsUtil, DebugReport) {
58 std::vector<std::string> strings = GetDebugReportStrings(DEBUG_REPORT_MAX_ENUM);

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected