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

trace_fmt should be support in quickcheck based test #1930

Open
proppy opened this issue Feb 14, 2025 · 0 comments
Open

trace_fmt should be support in quickcheck based test #1930

proppy opened this issue Feb 14, 2025 · 0 comments
Labels
dslx DSLX (domain specific language) implementation / front-end 🧦 sox testing Test-infrastructure related

Comments

@proppy
Copy link
Member

proppy commented Feb 14, 2025

Describe the bug
Currently it doesn't seems that trace_fmt is supported in quickcheck test functions (or function called by quickcheck test functions).

To Reproduce

fn trace_fmt_bool(b: bool) { trace_fmt!("trace_fmt_bool: {}", true); }

#[quickcheck]
fn prop_test_trace_fmt() -> bool {
    trace_fmt!("trace_fmt_quickcheck: {}", true);
    trace_fmt_bool(true);
    false
}

Observed behavior

[ RUN QUICKCHECK        ] prop_test_trace_fmt cases: test_count=default=1000
...
0486:   fn trace_fmt_bool(b: bool) { trace_fmt!("trace_fmt_bool: {}", true); }
0487:   
0488:   #[quickcheck]
       ______________^
0489: | fn prop_test_trace_fmt() -> bool {
0490: |     trace_fmt!("trace_fmt_quickcheck: {}", true);
0491: |     trace_fmt_bool(true);
0492: |     false
0493: | }
      |_^ FailureError: The program being interpreted failed! Found falsifying example after 1 tests: []
[                FAILED ] prop_test_trace_fmt
[=======================] 8 quickcheck(s) ran.

Expected behavior
trace_fmt messages are printed

@proppy proppy added dslx DSLX (domain specific language) implementation / front-end testing Test-infrastructure related 🧦 sox labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dslx DSLX (domain specific language) implementation / front-end 🧦 sox testing Test-infrastructure related
Projects
Status: No status
Development

No branches or pull requests

1 participant