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

Show evaluated test arguments from broadcast functions #57839

Draft
wants to merge 1 commit into
base: cv/test-show-short-func-args
Choose a base branch
from

Conversation

omus
Copy link
Member

@omus omus commented Mar 20, 2025

While working on #57825 I noticed that broadcasted functions were not we'll supported by the @test macro and never showed the evaluated test arguments. I've updated the stdlib to support this which required some large enough refactoring that it seemed best to make a separate PR for this change. The changes include:

  • Avoid embedding function references into Expr. This made the code harder to reason aboue than it needed to be.
  • Breaking up eval_test into eval_test_comparison and eval_test_function due to changes to the functions arguments
  • Handle broadcast syntax for binary operators (e.g. 1 .== 1 and function calls (==).(1, 1))
  • Create new _escaped_call function which abstracts escaping all of the arguments for a function call. Doing this made it handling the special call syntax for broadcasting easier.
  • Perform a single pass on function arguments when escaping where previously we did two passes.

Depends on:

Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

SGTM

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