Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 0163e5f9b5a63df41a9f3ecc9dd89303b6f24302..f8f1930285663cc05eabec606733c29b40de2b9b 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -12730,13 +12730,18 @@ static bool FunctionNameIs(const char* expected, |
const char* tail = event->name.str + kPreambleLen; |
size_t tail_len = event->name.len - kPreambleLen; |
size_t expected_len = strlen(expected); |
- if (tail_len == expected_len + 1) { |
- if (*tail == '*' || *tail == '~') { |
- --tail_len; |
- ++tail; |
- } else { |
- return false; |
- } |
+ if (tail_len > 1 && (*tail == '*' || *tail == '~')) { |
+ --tail_len; |
+ ++tail; |
+ } |
+ |
+ // Check for tails like 'bar :1'. |
+ if (tail_len > expected_len + 2 && |
+ tail[expected_len] == ' ' && |
+ tail[expected_len + 1] == ':' && |
+ tail[expected_len + 2] && |
+ !strncmp(tail, expected, expected_len)) { |
+ return true; |
} |
if (tail_len != expected_len) |