Skip to content

Conversation

jlindgren90
Copy link
Contributor

Requiring a macro like UNITY_INCLUDE_SETUP_STUBS to be defined before
including unity.h is fragile and does not work if unity.h is included
(directly or indirectly) via a command-line directive.

This also resolves issue #438.

Requiring a macro like UNITY_INCLUDE_SETUP_STUBS to be defined before
including unity.h is fragile and does not work if unity.h is included
(directly or indirectly) via a command-line directive.

This also resolves issue #438.
@mvandervoord
Copy link
Member

mvandervoord commented Oct 21, 2019

I understand the motivation with this one, but I don't love a solution which requires more core files to be includes.

I get that it's almost hypocritical: I spend a lot of time teaching people to break their files into smaller parts and such, but a common complaint that we get with Unity is that it's not all in a single header file. I'd like to not make it MORE files.

I'm not sure I follow the logic in the 2nd statement, that it "does not work if unity.h is included
(directly or indirectly) via a command-line directive." That seems to be a place where it easily DOES work. If UNITY_INCLUDE_SETUP_STUBS is defined at the command line, then it's ALWAYS defined when needed, right? How is that a problem?

I still want to solve the overall problem. I'm moving the conversation back to issue #438 that discusses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants