tests: Add VU code to error string (DEBUG only)
With thousands of VUs and many with similar text strings, it can be
difficult to identify a particular error message at a glance. This
adds the VU code to the end of the message string (in DEBUG builds).
Change-Id: I8ff2dfbac4973613193b6410bda885c187cf5920
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 0a1b189..d37919e 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -338,7 +338,13 @@
void *pUserData) {
ErrorMonitor *errMonitor = (ErrorMonitor *)pUserData;
if (msgFlags & errMonitor->GetMessageFlags()) {
+#ifdef _DEBUG
+ char embedded_code_string[2048];
+ snprintf(embedded_code_string, 2048, "%s [%05d]", pMsg, msgCode);
+ return errMonitor->CheckForDesiredMsg(msgCode, embedded_code_string);
+#else
return errMonitor->CheckForDesiredMsg(msgCode, pMsg);
+#endif
}
return false;
}