google / google/googletest

[Feature Request]: Event Listener callback for scope enter / leave

Open
#4,178 1 comment 1 reaction 1 assignee Claimed by @asoffer View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

### Describe the issue

We have an extensive logging system around our tests and having the current scope there using `SCOPED_TRACE `would be nice.
Could the enter/leave of a `SCOPED_TRACE` call 2 new event listeners `TestEventListener::OnScopeEnter` and `TestEventListener::OnScopeLeave`?

### Steps to reproduce the problem

Currently we have our own `SCOPED_TRACE `macro that simulates this and falls back to the original `::testing::ScopedTrace`.

### What version of GoogleTest are you using?

Applies to v1.13.0 (Using v1.10.0)

### What operating system and version are you using?

Applies to any (Using Windows)

### What compiler and version are you using?

Applies to any (Using clang version 15.0.0)

### What build system are you using?

Any (Using SCons)

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.