Skip to content

Commit 7f6364f

Browse files
committed
Gtest Annotations: Add the suite name into the annotations we store.
This identifies tests more specifically and also makes it possible to derive the specific test class name from the annotation, which is useful for setting breakpoints.
1 parent 0439a19 commit 7f6364f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gtest_annotations/undo_gtest_annotation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class UndoAnnotationListener : public ::testing::EmptyTestEventListener
2424
{
2525
// Create an instance of an annotation context, and associate it
2626
// with this thread.
27-
undoex_test_annotation_t *annotation = undoex_test_annotation_new(testInfo.name(), true);
27+
std::string full_name = std::string(testInfo.test_suite_name()) + "." + testInfo.name();
28+
undoex_test_annotation_t *annotation = undoex_test_annotation_new(full_name.c_str(), true);
2829
undoex_test_annotation_start(annotation);
2930

3031
const std::thread::id thread_id = std::this_thread::get_id();

0 commit comments

Comments
 (0)