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

cr_assert_std[out|err]_eq_str doesn't show both values #507

Open
oliversheridanmethven opened this issue Jul 29, 2023 · 0 comments
Open

Comments

@oliversheridanmethven
Copy link

If I were to write a failing test like:

Test(capturing_output, std_out, .init = redirect_all_stdout)
{
    fprintf(stderr, "something");
    cr_assert_stderr_eq_str("something else");
}

The I get the following output:

example ..........................***Failed    0.20 sec
[----] ../../../../src/testing/tests/example.c:44: Assertion Failed
[----]   
[----]   The file contents of __stderrp does not match the string "something else".
[----]   
[FAIL] capturing_output::std_output_failure: (0.00s)

However, it would be much more helpful if it showed the output of stderr so I can see how it doesn't match.

@oliversheridanmethven oliversheridanmethven changed the title cr_assert_std[out|err|_eq_str doesn't show both values cr_assert_std[out|err]_eq_str doesn't show both values Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants