google / google/googletest

[Bug]: --gtest_break_on_failure conflicts with EXPECT_NONFATAL_FAILURE

Open
#4,294 10 comments 0 reactions 1 assignee Claimed by @higher-performance View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

### Describe the issue

I have a test which uses EXPECT_NONFATAL_FAILURE.

I've recently started using --gtest_repeat (which is fantastic) and want to use --gtest_break_on_failure for my debugger to track down a rare timing issue.

It seems that break_on_failure is not checking that we are inside an EXPECT_NONFATAL_FAILURE clause and breaking execution.

### Steps to reproduce the problem

See example at https://godbolt.org/z/rETraz1Pv

Remove the --gtest_break_on_failure command-line argument and the test will now pass

### What version of GoogleTest are you using?

1.10.0 (Sorry, this is all that is built in to godbolt, I don't have a fast way to test with a newer version)

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

godbolt (linux)

### What compiler and version are you using?

GCC 10.4 x86

### What build system are you using?

godbolt

### 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.