You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hegel and GTest stateful testing, invariants are run after rule assertion failure #138
Consider the following program.
I am building it with clang 22 and gtest 1.18.
I am running it in CentOS Stream 10 in a Proxmox VE machine.
This program runs the invariant after a rule assertion failure.
In this case, the assertion is verifying structural soudness -- it fails because the structure is unsound.
Is this behaviour intended?
My understanding is that, currently, the stateful machinery does consume GTest failures but does not consume fatal failures as such and continues execution of further rules and invariants.
In practice, I am now causing Hegel to properly stop by raising an std::runtime_error. Unfortunately, my handwritten assertions have poor reporting on the values involved, compared to GTest.
Activity
echoumcp1 commentedon Sep 25, 2026
Hi Pedro, could you post the printed output?
pedrolamarao commentedon Sep 25, 2026
This test program terminates with a
SIGSEGVraise by dereferencingnullptrin line 34.This is a debug build stack trace.
My understanding is that, currently, the stateful machinery does consume GTest failures but does not consume fatal failures as such and continues execution of further rules and invariants.
In practice, I am now causing Hegel to properly stop by raising an
std::runtime_error. Unfortunately, my handwritten assertions have poor reporting on the values involved, compared to GTest.echoumcp1 commentedon Sep 25, 2026
Yep, this is a bug. Thanks!