Skip to content

Fix reporting negated operands#600

Draft
MrAnno wants to merge 5 commits into
Snaipe:bleedingfrom
MrAnno:fix/594-negation-reporting
Draft

Fix reporting negated operands#600
MrAnno wants to merge 5 commits into
Snaipe:bleedingfrom
MrAnno:fix/594-negation-reporting

Conversation

@MrAnno

@MrAnno MrAnno commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Fixes #594

MrAnno and others added 3 commits July 18, 2026 23:11
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Several combinators in the same argument list did not compile:

    cr_assert(all(any(eq(int, 1, 1)), any(eq(int, 2, 2))));

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Reports cannot name the enclosing not(), and the bare inner expansion
was an expression statement that triggered -Wunused-value.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: László Várady <laszlo.varady@anno.io>
@MrAnno MrAnno changed the title Fix/594 negation reporting Fix reporting negated operands Jul 18, 2026
MrAnno and others added 2 commits July 19, 2026 15:39
When a sub-assertion fails under not() or none(), its operands are
recorded precisely because they matched, the runner could not tell the
case apart from a genuinely broken user stringifier and wrongly blamed
user code for a perfectly healthy assertion (Snaipe#594):

    cr_expect(none(eq(int, 1, 1), eq(int, 3, 3), eq(int, 3, 3)));

    [----]   eq(int, 1, 1):
    [----]     @@@ <no difference -- this is a user bug in the object stringifier>

New output:

    [----]   none(eq(int, 1, 1), eq(int, 3, 3), eq(int, 3, 3)):
    [----]   eq(int, 1, 1): passed, but was expected to fail
    [----]     actual: 1
    [----]     expected: 1

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: László Várady <laszlo.varady@anno.io>
Signed-off-by: László Várady <laszlo.varady@anno.io>
@MrAnno
MrAnno force-pushed the fix/594-negation-reporting branch from 37d90a6 to 852865e Compare July 19, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

assertion prints - this is a user bug in the object stringifier

1 participant