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

Throw if test_end_expr not a :block expr #191

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

nickrobinson251
Copy link
Collaborator

To help users find the correct usage

@nickrobinson251 nickrobinson251 requested review from NHDaly and Drvi October 3, 2024 09:21
@@ -272,6 +272,7 @@ function runtests(
(0 ≤ memory_threshold ≤ 1) || throw(ArgumentError("`memory_threshold` must be between 0 and 1, got $(repr(memory_threshold))"))
testitem_timeout > 0 || throw(ArgumentError("`testitem_timeout` must be a positive number, got $(repr(testitem_timeout))"))
timeout_profile_wait >= 0 || throw(ArgumentError("`timeout_profile_wait` must be a non-negative number, got $(repr(timeout_profile_wait))"))
test_end_expr.head === :quote || throw(ArgumentError("`test_end_expr` must be a `:quote` expression, got a `$(repr(test_end_expr.head))` expression"))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we require test_end_expr::Expr so safe to check .head here

@nickrobinson251 nickrobinson251 force-pushed the npr-check-test-end-expr-type branch from 7cee77f to 0566742 Compare October 3, 2024 09:28
@nickrobinson251 nickrobinson251 changed the title Throw if test_end_expr not a :quote block Throw if test_end_expr not a :block expr Oct 3, 2024
@nickrobinson251 nickrobinson251 enabled auto-merge (squash) October 3, 2024 10:58
Copy link
Collaborator

@Drvi Drvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nickrobinson251 nickrobinson251 merged commit f9e5e54 into main Oct 3, 2024
7 checks passed
@nickrobinson251 nickrobinson251 deleted the npr-check-test-end-expr-type branch October 3, 2024 11:53
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.

2 participants