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
Flush function can't be omitted #197
Comments
Rik: Thanks for delving into this issue! I've reproduced your results and agree with all your findings. I'm also not happy with how complex this minor feature is at the moment... it's something that is rarely used but is getting complicated for people to just ignore. The biggest problem with the current implementation is that it really wants to detect if the UNITY_OUTPUT_FLUSH macro has been defined as nothing. The only good way to do that is to use VA_ARGS which isn't standard. So that's out. I'll fiddle around with it a bit and get a something working. It might be something along the lines of what you suggest. If anyone else has thoughts, now is the time. ;) |
Current code is way to complex in configuration and you get a Also the configuration template should not be placed under |
snicker Well that was a colorful statement of support for revising this feature! |
I'm just joking around, I highly appreciate all contributions and hard work on the Unity library 👍. We should watch out we will not be delving into to much configuration options and should work-out-of-the-box(tm). |
:) Anytime you can use XKCD in a comment is worthwhile. Anyway, your statement on working out-of-the-box is exactly our goal. We try to make it Just Work (TM) for most users and then allow them to override default behavior where needed. This feature is definitely failing to meet that criteria at this point! |
Good that we look all at the right direction! |
perhaps you can implicitly define UNITY_OUTPUT_FLUSH to fflush when you have |
I've made a few more tweaks to this feature. On my machine I can now do any of these without getting any errors or warnings. Travis also seems happy.
Since two machines aren't enough evidence to call something fixed, would you guys mind checking your own setups to see how the MAIN branch works for you? |
@mvandervoord thank you for your work, we will probably have some time to test next week. |
Cool. Let me know. :) |
@mvandervoord I have tested it and it works (for the flush function). @rikvdh you may close this issue. |
awesome. Thanks for checking, @xor-gate |
I only got caught with a different problem but this has nothing todo with the flush see issue #200. |
@rikvdh was way to busy to react :+). Thanks for closing @mvandervoord |
:) I figure if he disagrees, he's welcome to reopen it. |
He sits in front of my desk, so I will hear it way earlier than the issue is reopened :+). Thanks 👍 |
Hi,
We are using Unity with output-char putting a character directly to the console. But we can't omit the new Flush function added in commit c5c392b.
When I define UNITY_OUTPUT_FLUSH or UNITY_OUTPUT_FLUSH() it fails at the https://github.com/ThrowTheSwitch/Unity/blob/master/src/unity_internals.h#L308 declaration.
For
-D'UNITY_OUTPUT_FLUSH()'
:error: macro "UNITY_OUTPUT_FLUSH" passed 1 arguments, but takes just 0
for
-DUNITY_OUTPUT_FLUSH
:for
-DUNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION -DUNITY_OUTPUT_FLUSH
:for
-DUNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION -D'UNITY_OUTPUT_FLUSH()'
:I'm out of combinations. I also tried thinks like:
-D'UNITY_OUTPUT_FLUSH()'='(void)'
I just want to omit this feature which is unneeded for our case.
Having odd forward declarations all over the shop seems a bit odd. Perhaps a UNITY_HAS_FLUSH and UNITY_FLUSH_FORWARD_DECL config options are more desirable than the current situation.
Kind regards,
Rik
The text was updated successfully, but these errors were encountered: