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

docs: TEST blocks require that there is no return value #26

Open
matu3ba opened this issue Apr 11, 2022 · 3 comments
Open

docs: TEST blocks require that there is no return value #26

matu3ba opened this issue Apr 11, 2022 · 3 comments
Labels

Comments

@matu3ba
Copy link
Contributor

matu3ba commented Apr 11, 2022

From a little toy project https://github.com/matu3ba/pbcd/blob/4ffd0dfe6006c5342302d4099c02d537facf4ffe/runTest.sh

^
test.c:28:3: error: void function '_TAU_TEST_FUNC_foo_bar1' should not return a value [-Wreturn-type]
  return status;

Alternatively (but probably more cumbersome): support custom return values.

@jasmcaus
Copy link
Owner

Why would you want to return anything within a testing block?

@matu3ba
Copy link
Contributor Author

matu3ba commented Apr 11, 2022

Why would you want to return anything within a testing block?

To copy paste main and not being forced to wrap the to be tested method within another method ie for return codes (say one wants to simulate allocation failures or other stuff).
This is probably more of an edge case, so I phrased the issue as "docs".

@jasmcaus
Copy link
Owner

I agree it's more of an edge case, so unless there's significant user traction for this feature, I'll defer this for a later stage.

@jasmcaus jasmcaus added the todo label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants