forked from mmurdoch/arduinounit
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pull in changes from upstream #1
Open
terrillmoore
wants to merge
93
commits into
mcci-catena:master
Choose a base branch
from
mmurdoch:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r *, unsigned int); it has String::append instead.
Fix for 3.0.2 not able to compile for Teensy
This fixes the ARDUINO_UNIT_PSTR macro to not reference the wrong string. In particular, this makes failing macros not output "passed" instead of "failed". The same problem was seemingly the subject of commit 60840b8 (not all skipped.). That commit fixed the problem for test status by not using the ARDUINO_UNIT_PSTR macro, and seems to contain a half fix for ARDUINO_UNIT_PSTR using __COUNTER__, but the way it was used, __COUNTER__ was never actually expanded, so that did not help (also, it tried to apply __COUNTER__ in the wrong place). The actual problem *seems* to be that the `0:` label used to reference the string constant is not actually unique. It should not need to be, since the `0b` reference should just reference the nearest label 0, going backwards, but I suspect that gcc ends up reordering asm blocks and thus messes up the reference. Using a unique (but still numerical so local) label seems to fix this. See e.g. this thread about reordering of asm blocks: https://gcc.gnu.org/legacy-ml/gcc-help/2017-10/msg00061.html So, this commit reverts the __COUNTER__ bit from that commit, just using the plain `ptr` name again (which does not need to be unique, since it is local the the __extension__ block). It also reverts the changes around the test status, so these now use ARDUINO_UNIT_STRING again as originally. Then, it applies a two-layer macro wrapper for ARDUINO_UNIT_PSTR, that ensures that __COUNTER__ is actually expanded before being used (which is needed when using a macro as part of a stringification or concatenation) and ensures that __COUNTER__ is only expanded once, with one value, rather than with different values in all three places. Finally, this commit uses this expanded counter value to generate unique labels, which seems to prevent this problem from occuring.
Fix incorrect merging of PROGMEM strings
When a test is completed (including failed and skipped), it was already removed from the "root" list but it is now added to the "done" list.
This allows reusing insert() later to move tests from the done list back into the active list, without affecting the count.
This simply calls Test::run() until all tests are done.
Allow running tests multiple times
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.