-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: replace
fake_criterion_tests
section with `__attribute__((co…
…nstructor))`s adding to a linked list, fixing the padding bug * Fixes #473. The previous way of appending `struct fake_criterion_test`s by putting them into a section was buggy because extra padding was added between the elements in the section, so iterating through them from `__{start,stop}_fake_criterion_tests` didn't work correctly. This new way uses `__attribute__((constructor))` to add each `struct fake_criterion_test` to a singly linked list. A singly linked list is used for simplicity, though it does mean the tests are run in reverse order within a file, but I don't really think the test order should matter, so this should be okay.
- Loading branch information
Showing
2 changed files
with
19 additions
and
16 deletions.
There are no files selected for viewing
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
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