boost-ext / ut

C++20 μ(micro)/Unit Testing Framework
https://boost-ext.github.io/ut
Boost Software License 1.0
1.26k stars 120 forks source link

Custom message for fatal expressions not shown #629

Open jbbjarnason opened 5 months ago

jbbjarnason commented 5 months ago

Expected Behavior

Custom message for fatal expressions

Actual Behavior

No message shown before the exception is thrown

Steps to Reproduce the Problem

  1. https://godbolt.org/z/rvavdeE81
    
    #include <https://raw.githubusercontent.com/boost-experimental/ut/master/include/boost/ut.hpp>

int main() { using namespace boost::ut; expect(fatal(2 != 2_i)) << "some random message"; }

```bash
ASM generation compiler returned: 0
Execution build compiler returned: 0
Program returned: 139

===============================================================================
Suite globaltests:   0 | 2 failed
asserts: 0 | 0 passed | 2 failed

terminate called after throwing an instance of 'boost::ext::ut::v2_0_1::events::fatal_assertion'
Program terminated with signal: SIGSEGV
FAILED
in: :0 - test condition:  [2 != 2]

Specifications

AlexanderZvyagin commented 2 months ago

I observe the same thing. And it is very annoying. Will need to switch to a slower, but more robust testing framework.