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

Test fails depending on the existence of a log #6352

Closed
SwayStar123 opened this issue Aug 1, 2024 · 2 comments
Closed

Test fails depending on the existence of a log #6352

SwayStar123 opened this issue Aug 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@SwayStar123
Copy link
Collaborator

SwayStar123 commented Aug 1, 2024

Related Component

compiler

Problem

The given test only passes if the logging of the result occurs (may not be limited to logging, could just be usage of the result in anyway), if the log call is commented out, the test fails

Steps

#[test(should_revert)]
fn math_u64_pow_overflow_should_revert() {
    let _result = 2_u64.pow(64);
    log(_result);
}

forc test

Possible Solution(s)

No response

Notes

No response

Installed components

forc 0.62.0
@SwayStar123 SwayStar123 added bug Something isn't working triage This issue was opened with a template and needs to be triaged by code owners. labels Aug 1, 2024
@Dentosal
Copy link
Member

See #6452 (comment) for a reproduction and output analysis.

@IGI-111 IGI-111 marked this as a duplicate of #4307 Oct 9, 2024
@IGI-111 IGI-111 closed this as completed Oct 9, 2024
@IGI-111 IGI-111 marked this as not a duplicate of #4307 Oct 9, 2024
@IGI-111 IGI-111 reopened this Oct 9, 2024
@IGI-111
Copy link
Contributor

IGI-111 commented Oct 9, 2024

Duplicate of #4307

@IGI-111 IGI-111 marked this as a duplicate of #4307 Oct 9, 2024
@IGI-111 IGI-111 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
@IGI-111 IGI-111 removed the triage This issue was opened with a template and needs to be triaged by code owners. label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants