sway icon indicating copy to clipboard operation
sway copied to clipboard

Test fails depending on the existence of a log

Open SwayStar123 opened this issue 1 year ago • 1 comments

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 avatar Aug 01 '24 14:08 SwayStar123

See https://github.com/FuelLabs/sway/pull/6452#issuecomment-2306881388 for a reproduction and output analysis.

Dentosal avatar Aug 23 '24 11:08 Dentosal

Duplicate of #4307

IGI-111 avatar Oct 09 '24 13:10 IGI-111