Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to queue up diag for the context #1005

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Conversation

exodist
Copy link
Member

@exodist exodist commented Sep 14, 2024

fixes #1004

This adds a system for queuing diag messages that will be attached to the next context that releases, upon release the diags will be issued so long as the context caused at least 1 failure. The diags will be disgarded if the context did not add any failures.

the no_warnings and lives tools both now automatically add the warning/exception to the diag queue.

Examples:

This will add the warning as a diagnostics message ok(no_warnings { warn "xxx" }, "Did not get any warnings");

This will not add the warning-diag as no failures are caused ok(!no_warnings { warn "xxx" }, "Got warnings");

This will add the exception as a diagnostics message ok(lives { die "XXX" }, "Did not die");

This will not add the exception as a diagnostics message ok(!lives { die "XXX" }, "Died");

fixes #1004

This adds a system for queuing diag messages that will be attached to
the next context that releases, upon release the diags will be issued so
long as the context caused at least 1 failure. The diags will be
disgarded if the context did not add any failures.

the `no_warnings` and `lives` tools both now automatically add the
warning/exception to the diag queue.

Examples:

This will add the warning as a diagnostics message
ok(no_warnings { warn "xxx" }, "Did not get any warnings");

This will not add the warning-diag as no failures are caused
ok(!no_warnings { warn "xxx" }, "Got warnings");

This will add the exception as a diagnostics message
ok(lives { die "XXX" }, "Did not die");

This will not add the exception as a diagnostics message
ok(!lives { die "XXX" }, "Died");
@exodist exodist merged commit 553e6c8 into master Sep 15, 2024
38 checks passed
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.

Can we add diagnostics to no_warnings()?
1 participant