-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactor/optional setup through scripting #453
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
Conversation
…tc in script generators
@mvandervoord I like it, but there is one problem, which is that UnityDefaultTestRun() still calls setUp() and tearDown() unconditionally. So when they are not present in the test file, I get linker errors:
Maybe the generator script could create an empty setUp() and tearDown() function when they are not present in the test file? |
@jlindgren90 -- I had originally planned to do it that way, but convinced myself that it wasn't necessary because if they're using generate_test_runner, it's generating a RUN_TEST and therefore UnityDefaultTestRun isn't used... but you're right... it's still needs to be able to LINK. My bad. I'll fix that. |
Or slightly simpler: https://github.com/jlindgren90/Unity/commit/68cc45a91849b4b176067e1434a8c4f94eaf5e56 |
Perfect. Do you just want to do a PR of that and we can merge it in? Thanks so much for the help! |
It's included in #454. Or would you rather have just the first commit in a separate PR? |
This has been replaced with a cleaner solution by @jlindgren90 |
@jlindgren90 & @Letme (and anyone else willing to look), could you check this out?
This removes the "weak" support from unity, replacing it with a completely test-runner-generator approach. If you specify setup / teardown and/or suite functions, they are automatically added to the runner, otherwise they are NOT part of the runner and therefore not necessary.