-
Notifications
You must be signed in to change notification settings - Fork 39
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
test-env-log
used with test-case
creates test duplicates
#101
Labels
bug
Something isn't working
Comments
yuvalsw
added a commit
to starkware-libs/cairo
that referenced
this issue
Nov 21, 2022
Macro for logging with test_case. Might be needed once this bug is fixed: frondeus/test-case#101 See here: https://docs.google.com/document/d/1zAbVqlSNeM5zaOqt4b-hFISlKy6ua9bh0mm99SHrb4E/edit#
kezhuw
added a commit
to kezhuw/test-case
that referenced
this issue
Apr 17, 2024
This pr proposes a generic mechanism among different test proc macros to avoid to generate multiple `[::core::prelude::v1::test]` on test method. `proc_macro_attribute` function is fed with tokens after its attribute and no tokens before it. Give the above, this pr proposes test proc macros to append newly generated macros after existing ones. This way, proc macros processed later can read all macros including generated and handwritten and make further decisions. Specifically, proc macros can append `#[::core::prelude::v1::test]` only if it does not exist. Macros that transform test method signature can append `#[::core::prelude::v1::test]` directly without checking its existence once they generate valid signature for test method. Closes frondeus#101.
kezhuw
added a commit
to kezhuw/test-case
that referenced
this issue
Apr 19, 2024
This pr proposes a generic mechanism among different test proc macros to avoid to generate multiple `[::core::prelude::v1::test]` on test method. `proc_macro_attribute` function is fed with tokens after its attribute and no tokens before it. Give the above, this pr proposes test proc macros to append newly generated macros after existing ones. This way, proc macros processed later can read all macros including generated and handwritten and make further decisions. Specifically, proc macros can append `#[::core::prelude::v1::test]` only if it does not exist. Closes frondeus#101.
kezhuw
added a commit
to kezhuw/test-log
that referenced
this issue
Apr 19, 2024
This way if preceding test macros add `#[::core::prelude::v1::test]` by appending, then we can avoid duplicated test runs. See also frondeus/test-case#101, frondeus/test-case#143 Closes d-e-s-o#35.
kezhuw
added a commit
to kezhuw/test-case
that referenced
this issue
Nov 19, 2024
This pr proposes a generic mechanism among different test proc macros to avoid to generate multiple `[::core::prelude::v1::test]` on test method. `proc_macro_attribute` function is fed with tokens after its attribute and no tokens before it. Give the above, this pr proposes test proc macros to append newly generated macros after existing ones. This way, proc macros processed later can read all macros including generated and handwritten and make further decisions. Specifically, proc macros can append `#[::core::prelude::v1::test]` only if it does not exist. Macros that transform test method signature can append `#[::core::prelude::v1::test]` directly without checking its existence once they generate valid signature for test method. Closes frondeus#101, frondeus#146.
kezhuw
added a commit
to kezhuw/test-case
that referenced
this issue
Nov 20, 2024
This pr proposes a generic mechanism among different test proc macros to avoid to generate multiple `[::core::prelude::v1::test]` on test method. `proc_macro_attribute` function is fed with tokens after its attribute and no tokens before it. Give the above, this pr proposes test proc macros to append newly generated macros after existing ones. This way, proc macros processed later can read all macros including generated and handwritten and make further decisions. Specifically, proc macros can append `#[::core::prelude::v1::test]` only if it does not exist. Macros that transform test method signature can append `#[::core::prelude::v1::test]` directly without checking its existence once they generate valid signature for test method. Closes frondeus#101, frondeus#146.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Full example in this gist
Output
Originally posted by @newsch in #69 (comment)
The text was updated successfully, but these errors were encountered: