MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / Search

Method Search

tests/framework/error_monitor.cpp:391–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391bool ErrorMonitor::VuidAndMessage::Search(const char* vuid_, std::string_view msg) const {
392 assert(msg_type != VuidAndMessage::Undefined);
393 const bool vuid_compare = !vuid.empty() ? (vuid == vuid_) : true;
394 switch (msg_type) {
395 case ErrorMonitor::VuidAndMessage::String:
396 return vuid_compare && msg.find(msg_string) != std::string::npos;
397 case ErrorMonitor::VuidAndMessage::Regex: {
398 const std::regex msg_regex(msg_string);
399 return vuid_compare && std::regex_search(msg.data(), msg_regex);
400 }
401 default:
402 return false;
403 }
404}
405
406bool ErrorMonitor::VuidAndMessage::SearchUndesiredRegex(std::string_view msg) const {
407 const std::regex undesired_msg_regex(undesired_msg_regex_string);

Callers 1

CheckForDesiredMsgMethod · 0.80

Calls 3

emptyMethod · 0.45
findMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected