From 2777955d3a3275447ebcfca01b844ea6430c9fbb Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sat, 9 Mar 2024 18:28:42 -0500 Subject: [PATCH 1/7] Document unity exec time options. --- LICENSE.txt | 2 +- docs/UnityConfigurationGuide.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index a541b84..e12b59e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2007-23 Mike Karlesky, Mark VanderVoord, Greg Williams +Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, Greg Williams Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/UnityConfigurationGuide.md b/docs/UnityConfigurationGuide.md index 953851f..0b735f7 100644 --- a/docs/UnityConfigurationGuide.md +++ b/docs/UnityConfigurationGuide.md @@ -482,6 +482,34 @@ _Example:_ #define UNITY_OUTPUT_COLOR ``` +#### `UNITY_INCLUDE_EXEC_TIME` + +Define this to measure and report execution time for each test in the suite. When enabled, Unity will do +it's best to automatically find a way to determine the time in milliseconds. On most Windows, macos, or +Linux environments, this is automatic. If not, you can give Unity more information. + +#### `UNITY_CLOCK_MS` + +If you're working on a system (embedded or otherwise) which has an accessible millisecond timer. You can +define `UNITY_CLOCK_MS` to be the name of the function which returns the millisecond timer. It will then +attempt to use that function for timing purposes. + +#### `UNITY_EXEC_TIME_START` + +Define this hook to start a millisecond timer if necessary. + +#### `UNITY_EXEC_TIME_STOP` + +Define this hook to stop a millisecond timer if necessary. + +#### `UNITY_PRINT_EXEC_TIME` + +Define this hook to print the current execution time. Used to report the milliseconds elapsed. + +#### `UNITY_TIME_TYPE` + +Finally, this can be set to the type which holds the millisecond timer. + #### `UNITY_SHORTHAND_AS_INT` #### `UNITY_SHORTHAND_AS_MEM` From b512a1c184f61861f0e1e43a80fb770cffd720d3 Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sat, 9 Mar 2024 18:50:25 -0500 Subject: [PATCH 2/7] Flesh out documentation for command line options for runner generator. --- docs/UnityHelperScriptsGuide.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/UnityHelperScriptsGuide.md b/docs/UnityHelperScriptsGuide.md index 6838280..01db275 100644 --- a/docs/UnityHelperScriptsGuide.md +++ b/docs/UnityHelperScriptsGuide.md @@ -126,6 +126,8 @@ Define this option with C code to be executed _before any_ test cases are run. Alternatively, if your C compiler supports weak symbols, you can leave this option unset and instead provide a `void suiteSetUp(void)` function in your test suite. The linker will look for this symbol and fall back to a Unity-provided stub if it is not found. +This option can also be specified at the command prompt as `--suite_setup=""` + ##### `:suite_teardown` Define this option with C code to be executed _after all_ test cases have finished. @@ -136,6 +138,8 @@ You can normally just return `num_failures`. Alternatively, if your C compiler supports weak symbols, you can leave this option unset and instead provide a `int suiteTearDown(int num_failures)` function in your test suite. The linker will look for this symbol and fall back to a Unity-provided stub if it is not found. +This option can also be specified at the command prompt as `--suite_teardown=""` + ##### `:enforce_strict_ordering` This option should be defined if you have the strict order feature enabled in CMock (see CMock documentation). @@ -146,6 +150,8 @@ If you provide the same YAML to the generator as used in CMock's configuration, This option should be defined if you are mixing C and CPP and want your test runners to automatically include extern "C" support when they are generated. +This option can also be specified at the command prompt as `--externc` + ##### `:mock_prefix` and `:mock_suffix` Unity automatically generates calls to Init, Verify and Destroy for every file included in the main test file that starts with the given mock prefix and ends with the given mock suffix, file extension not included. @@ -170,8 +176,11 @@ Or as a yaml file: If you are using CMock, it is very likely that you are already passing an array of plugins to CMock. You can just use the same array here. + This script will just ignore the plugins that don't require additional support. +This option can also be specified at the command prompt as `--cexception` + ##### `:include_extensions` This option specifies the pattern for matching acceptable header file extensions. @@ -200,6 +209,8 @@ You can see list of supported macros list in the [Parameterized tests provided macros](#parameterized-tests-provided-macros) section that follows. +This option can also be specified at the command prompt as `--use_param_tests=1` + ##### `:cmdline_args` When set to `true`, the generated test runner can accept a number of @@ -224,18 +235,26 @@ These are the available options: Override the default test `setUp` function name. +This option can also be specified at the command prompt as `--setup_name=""` + ##### `:teardown_name` Override the default test `tearDown` function name. +This option can also be specified at the command prompt as `--teardown_name=""` + ##### `:test_reset_name` Override the default test `resetTest` function name. +This option can also be specified at the command prompt as `--test_reset_name=""` + ##### `:test_verify_name` Override the default test `verifyTest` function name. +This option can also be specified at the command prompt as `--test_verify_name=""` + ##### `:main_name` Override the test's `main()` function name (from `main` to whatever is specified). @@ -245,6 +264,8 @@ with `main_` as the "main" function. To clarify, if `:main_name == :auto` and the test filename is "test_my_project.c", then the generated function name will be `main_test_my_project(int argc, char** argv)`. +This option can also be specified at the command prompt as `--main_name=""` + ##### `main_export_decl` Provide any `cdecl` for the `main()` test function. Is empty by default. @@ -254,6 +275,8 @@ Provide any `cdecl` for the `main()` test function. Is empty by default. If `true`, the `UnityBegin` and `UnityEnd` function will not be called for Unity test state setup and cleanup. +This option can also be specified at the command prompt as `--omit_begin_end` + #### Parameterized tests provided macros Unity provides support for few param tests generators, that can be combined From e3457a85f4738bdcb4359b6a8abef2d7bc716ade Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sat, 9 Mar 2024 19:26:38 -0500 Subject: [PATCH 3/7] Fix temperamental test in core test suite. --- test/tests/test_unity_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests/test_unity_core.c b/test/tests/test_unity_core.c index d324e86..c6ac812 100644 --- a/test/tests/test_unity_core.c +++ b/test/tests/test_unity_core.c @@ -296,9 +296,9 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void) Unity.CurrentTestFailed = 1; startPutcharSpy(); /* Suppress output */ startFlushSpy(); - TEST_ASSERT_EQUAL(0, getFlushSpyCalls()); UnityConcludeTest(); endPutcharSpy(); + TEST_ASSERT_EQUAL(0, getFlushSpyCalls()); TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures); #if defined(UNITY_OUTPUT_FLUSH) && defined(UNITY_OUTPUT_FLUSH_HEADER_DECLARATION) TEST_ASSERT_EQUAL(1, getFlushSpyCalls()); From 860062d51b2e8a75d150337b63ca2a472840d13c Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sat, 9 Mar 2024 19:36:15 -0500 Subject: [PATCH 4/7] Fixed issue #715 (typo that disabled two tests) --- test/tests/test_unity_arrays.c | 2 +- test/tests/test_unity_integers_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tests/test_unity_arrays.c b/test/tests/test_unity_arrays.c index 5984883..2151eef 100644 --- a/test/tests/test_unity_arrays.c +++ b/test/tests/test_unity_arrays.c @@ -61,7 +61,7 @@ void testInt64ArrayWithinDeltaAndMessage(void) #endif } -void tesUInt64ArrayNotWithinDelta(void) +void testInt64ArrayNotWithinDelta(void) { #ifndef UNITY_SUPPORT_64 TEST_IGNORE(); diff --git a/test/tests/test_unity_integers_64.c b/test/tests/test_unity_integers_64.c index 867d1e7..6e83329 100644 --- a/test/tests/test_unity_integers_64.c +++ b/test/tests/test_unity_integers_64.c @@ -61,7 +61,7 @@ void testInt64ArrayWithinDeltaAndMessage(void) #endif } -void tesUInt64ArrayNotWithinDelta(void) +void testInt64ArrayNotWithinDelta(void) { #ifndef UNITY_SUPPORT_64 TEST_IGNORE(); From 85452ad1544f77d752a2444eb8859f73346bfb97 Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Wed, 13 Mar 2024 15:07:30 -0400 Subject: [PATCH 5/7] :memo: Add Code of Conduct and Contributing docs --- docs/CODE_OF_CONDUCT.md | 138 +++++++++++++++++++++++ docs/CONTRIBUTING.md | 238 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 376 insertions(+) create mode 100644 docs/CODE_OF_CONDUCT.md create mode 100644 docs/CONTRIBUTING.md diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..84e3480 --- /dev/null +++ b/docs/CODE_OF_CONDUCT.md @@ -0,0 +1,138 @@ + +# ThrowTheSwitch.org Code of Conduct + +Thank you for participating in a ThrowTheSwitch.org community project! We want +this to continue to be a warm and inviting place for everyone to share ideas +and get help. To accomplish this goal, we've developed this Code of Conduct. + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +hello@thingamabyte.com. + +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000..e64a285 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,238 @@ +# Contributing to a ThrowTheSwitch.org Project + +👍🎉 _First off, thanks for taking the time to contribute!_ 🎉👍 + +The following is a set of guidelines for contributing to any of ThrowTheSwitch.org's projects or the website itself, hosted at throwtheswitch.org or ThrowTheSwitch's organization on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. + +### Table Of Contents + +- [Code of Conduct](#book-code-of-conduct) +- [Asking Questions](#bulb-asking-questions) +- [Opening an Issue](#inbox_tray-opening-an-issue) +- [Feature Requests](#love_letter-feature-requests) +- [Triaging Issues](#mag-triaging-issues) +- [Submitting Pull Requests](#repeat-submitting-pull-requests) +- [Writing Commit Messages](#memo-writing-commit-messages) +- [Code Review](#white_check_mark-code-review) +- [Coding Style](#nail_care-coding-style) +- [Certificate of Origin](#medal_sports-certificate-of-origin) +- [Credits](#pray-credits) + +## :book: Code of Conduct + +Please review our [Code of Conduct](CODE_OF_CONDUCT.md). It is in effect at all times. We expect it to be honored by everyone who contributes to this project. Be a Good Human! + +## :bulb: Asking Questions + +> **Note:** Please don't file an issue to ask a question. We have an official forum where the community chimes in with helpful advice if you have questions. + +* [ThrowTheSwitch Forums](https://throwtheswitch.org/forums) + +### What should I know before I get started? + +ThrowTheSwitch hosts a number of open source projects — Ceedling is the entrypoint for many users. Ceedling is actually built upon the foundation of Unity Test (a flexible C testing framework) and CMock (a mocking tool for C) and it coordinates many other open source and proprietary tools. Please do your best to focus your ideas and questions at the correct tool. We'll do our best to help you find your way, but there will be times where we'll have to direct your attention to another subtool. + +Here are some of the main projects hosted by ThrowTheSwitch.org: + + - [Ceedling](https://www.github.com/throwtheswitch/ceedling) -- Build coordinator for testing C applications, especially embedded C (and optionally your release build too!) + - [CMock](https://www.github.com/throwtheswitch/cmock) -- Mocking tool for automatically creating stubs, mocks, and skeletons in C + - [Unity](https://www.github.com/throwtheswitch/unity) -- Unit Testing framework for C, specially embedded C. + - [MadScienceLabDocker](https://www.github.com/throwtheswitch/madsciencelabdocker) -- Docker image giving you a shortcut to getting running with Ceedling + - [CException](https://www.github.com/throwtheswitch/cexception) -- An exception framework for using simple exceptions in C. + +There are many more, but this list should be a good starting point. + +## :inbox_tray: Opening an Issue + +Before [creating an issue](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue), check if you are using the latest version of the project. If you are not up-to-date, see if updating fixes your issue first. + +### :beetle: Bug Reports and Other Issues + +A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate a well-written, thorough bug report. :v: + +In short, since you are most likely a developer, **provide a ticket that you would like to receive**. + +- **Review the documentation** before opening a new issue. + +- **Do not open a duplicate issue!** Search through existing issues to see if your issue has previously been reported. If your issue exists, comment with any additional information you have. You may simply note "I have this problem too", which helps prioritize the most common problems and requests. + +- **Prefer using [reactions](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)**, not comments, if you simply want to "+1" an existing issue. + +- **Fully complete the provided issue template.** The bug report template requests all the information we need to quickly and efficiently address your issue. Be clear, concise, and descriptive. Provide as much information as you can, including steps to reproduce, stack traces, compiler errors, library versions, OS versions, and screenshots (if applicable). + +- **Use [GitHub-flavored Markdown](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).** Especially put code blocks and console outputs in backticks (```). This improves readability. + +## :seedling: Feature Requests + +Feature requests are welcome! We don't have all the answers and we truly love the collaborative experience of building software together! That being said, we cannot guarantee your request will be accepted. We want to avoid [feature creep](https://en.wikipedia.org/wiki/Feature_creep). Your idea may be great, but also out-of-scope for the project. If accepted, we'll do our best to tackle it in a timely manner, but cannot make any commitments regarding the timeline for implementation and release. However, you are welcome to submit a pull request to help! + +- **Please don't open a duplicate feature request.** Search for existing feature requests first. If you find your feature (or one very similar) previously requested, comment on that issue. + +- **Fully complete the provided issue template.** The feature request template asks for all necessary information for us to begin a productive conversation. + +- Be precise about the proposed outcome of the feature and how it relates to existing features. Include implementation details if possible. + +## :mag: Triaging Issues + +You can triage issues which may include reproducing bug reports or asking for additional information, such as version numbers or reproduction instructions. Any help you can provide to quickly resolve an issue is very much appreciated! + +## :repeat: Submitting Pull Requests + +We **love** pull requests! Before [forking the repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) and [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) for non-trivial changes, it is usually best to first open an issue to discuss the changes, or discuss your intended approach for solving the problem in the comments for an existing issue. + +For most contributions, after your first pull request is accepted and merged, you will be [invited to the project](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository) and given **push access**. :tada: + +*Note: All contributions will be licensed under the project's license.* + +- **Smaller is better.** Submit **one** pull request per bug fix or feature. A pull request should contain isolated changes pertaining to a single bug fix or feature implementation. **Do not** refactor or reformat code that is unrelated to your change. It is better to **submit many small pull requests** rather than a single large one. Enormous pull requests will take enormous amounts of time to review, or may be rejected altogether. + +- **Coordinate bigger changes.** For large and non-trivial changes, open an issue to discuss a strategy with the maintainers. Otherwise, you risk doing a lot of work for nothing! + +- **Prioritize understanding over cleverness.** Write code clearly and concisely. Remember that source code usually gets written once and read often. Ensure the code is clear to the reader. The purpose and logic should be obvious to a reasonably skilled developer, otherwise you should add a comment that explains it. + +- **Follow existing coding style and conventions.** Keep your code consistent with the style, formatting, and conventions in the rest of the code base. When possible, these will be enforced with a linter. Consistency makes it easier to review and modify in the future. + +- **Include test coverage.** Add unit tests when possible. Follow existing patterns for implementing tests. + +- **Update the example project** if one exists to exercise any new functionality you have added. + +- **Add documentation.** Document your changes with code doc comments or in existing guides. + +- **Update the CHANGELOG** for all enhancements and bug fixes. Include the corresponding issue number if one exists, and your GitHub username. (example: "- Fixed crash in profile view. #123 @jessesquires") + +- **Use the repo's default branch.** Branch from and [submit your pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to the repo's default branch. Usually this is `main`, but it could be `dev`, `develop`, or `master`. + +- **[Resolve any merge conflicts](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)** that occur. + +- **Promptly address any CI failures**. If your pull request fails to build or pass tests, please push another commit to fix it. + +- When writing comments, use properly constructed sentences, including punctuation. + +- Use spaces, not tabs. + +## :memo: Writing Commit Messages + +Please [write a great commit message](https://chris.beams.io/posts/git-commit/). + +1. Separate subject from body with a blank line +1. Limit the subject line to 50 characters +1. Capitalize the subject line +1. Do not end the subject line with a period +1. Wrap the body at _about_ 72 characters +1. Use the body to explain **why**, *not what and how* (the code shows that!) +1. If applicable, prefix the title with the relevant component name or emoji (see below. examples: "[Docs] Fix typo", "[Profile] Fix missing avatar") + +``` +:palm_tree: Summary of Amazing Feature Here + +Add a more detailed explanation here, if necessary. Possibly give +some background about the issue being fixed, etc. The body of the +commit message can be several paragraphs. Further paragraphs come +after blank lines and please do proper word-wrap. + +Wrap it to about 72 characters or so. In some contexts, +the first line is treated as the subject of the commit and the +rest of the text as the body. The blank line separating the summary +from the body is critical (unless you omit the body entirely); +various tools like `log`, `shortlog` and `rebase` can get confused +if you run the two together. + +Explain the problem that this commit is solving. Focus on why you +are making this change as opposed to how or what. The code explains +how or what. Reviewers and your future self can read the patch, +but might not understand why a particular solution was implemented. +Are there side effects or other unintuitive consequences of this +change? Here's the place to explain them. + + - Bullet points are awesome, too + + - A hyphen should be used for the bullet, preceded + by a single space, with blank lines in between + +Note the fixed or relevant GitHub issues at the end: + +Resolves: #123 +See also: #456, #789 +``` + +## :heart: Who Loves Emoji? + +Commit comments, Issues, Feature Requests... they can all use a little sprucing up, right? Consider using the following emoji for a mix of function and :sparkles: dazzle! + + - actions + - :seedling: `:seedling:` (or other plants) when growing new features. Choose your fav! :cactus: :herb: :evergreen_tree: :palm_tree: :deciduous_tree: :blossom: + - :art: `:art:` when improving the format/structure of the code + - :racehorse: `:racehorse:` when improving performance + - :non-potable_water: `:non-potable_water:` when plugging memory leaks + - :memo: `:memo:` when writing docs + - :bug: `:bug:` (or other insects) when fixing a bug. Maybe :beetle: :ant: or :honeybee: ? + - :fire: `:fire:` when removing code or files + - :green_heart: `:green_heart:` when fixing the CI build + - :white_check_mark: `:white_check_mark:` when adding tests + - :lock: `:lock:` when dealing with security + - :arrow_up: `:arrow_up:` when upgrading dependencies + - :arrow_down: `:arrow_down:` when downgrading dependencies + - :shirt: `:shirt:` when removing linter warnings + + - platforms + - :penguin: `:penguin:` when fixing something on Linux + - :apple: `:apple:` when fixing something on macOS + - :checkered_flag: `:checkered_flag:` when fixing something on Windows + +## :white_check_mark: Code Review + +- **Review the code, not the author.** Look for and suggest improvements without disparaging or insulting the author. Provide actionable feedback and explain your reasoning. + +- **You are not your code.** When your code is critiqued, questioned, or constructively criticized, remember that you are not your code. Do not take code review personally. + +- **Always do your best.** No one writes bugs on purpose. Do your best, and learn from your mistakes. + +- Kindly note any violations to the guidelines specified in this document. + +## :violin: Coding Style + +Consistency is the most important. Following the existing style, formatting, and naming conventions of the file you are modifying and of the overall project. Failure to do so will result in a prolonged review process that has to focus on updating the superficial aspects of your code, rather than improving its functionality and performance. + +For example, if all private properties are prefixed with an underscore `_`, then new ones you add should be prefixed in the same way. Or, if methods are named using camelcase, like `thisIsMyNewMethod`, then do not diverge from that by writing `this_is_my_new_method`. You get the idea. If in doubt, please ask or search the codebase for something similar. + +When possible, style and format will be enforced with a linter. + +### C Styleguide + +C code is linted with [AStyle](https://astyle.sourceforge.net/). + +### Ruby Styleguide + +Ruby code is linted with [Rubocop](https://github.com/rubocop/rubocop) + +## :medal_sports: Certificate of Origin + +*Developer's Certificate of Origin 1.1* + +By making a contribution to this project, I certify that: + +> 1. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or +> 1. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or +> 1. The contribution was provided directly to me by some other person who certified (1), (2) or (3) and I have not modified it. +> 1. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. + +## [No Brown M&M's](https://en.wikipedia.org/wiki/Van_Halen#Contract_riders) + +If you are reading this, bravo dear user and (hopefully) contributor for making it this far! You are awesome. :100: + +To confirm that you have read this guide and are following it as best as possible, **include this emoji at the top** of your issue or pull request: :pineapple: `:pineapple:` + +## :pray: Credits + +Written by [@jessesquires](https://github.com/jessesquires). Lovingly adapted to ThrowTheSwitch.org by [@mvandervoord](https://github.com/mvandervoord). + +**Please feel free to adopt this guide in your own projects. Fork it wholesale or remix it for your needs.** + +*Many of the ideas and prose for the statements in this document were based on or inspired by work from the following communities:* + +- [Alamofire](https://github.com/Alamofire/Alamofire/blob/master/CONTRIBUTING.md) +- [CocoaPods](https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md) +- [Docker](https://github.com/moby/moby/blob/master/CONTRIBUTING.md) +- [Linux](https://elinux.org/Developer_Certificate_Of_Origin) + +*We commend them for their efforts to facilitate collaboration in their projects.* From 671f8d25f19527a17d15475b038a16e5ba249bdf Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sat, 16 Mar 2024 23:15:00 -0400 Subject: [PATCH 6/7] Update all the boilerplates --- LICENSE.txt | 2 +- auto/__init__.py | 7 +++++++ auto/colour_prompt.rb | 11 ++++++----- auto/colour_reporter.rb | 11 ++++++----- auto/extract_version.py | 7 +++++++ auto/generate_config.yml | 7 +++++++ auto/generate_module.rb | 11 ++++++----- auto/generate_test_runner.rb | 11 ++++++----- auto/parse_output.rb | 6 ++++++ auto/stylize_as_junit.py | 13 ++++++------- auto/stylize_as_junit.rb | 7 +++++++ auto/test_file_filter.rb | 11 ++++++----- auto/type_sanitizer.rb | 7 +++++++ auto/unity_test_summary.py | 12 ++++++------ auto/unity_test_summary.rb | 11 ++++++----- auto/yaml_helper.rb | 11 ++++++----- examples/example_1/makefile | 11 ++++++----- examples/example_1/src/ProductionCode.c | 7 +++++++ examples/example_1/src/ProductionCode.h | 7 +++++++ examples/example_1/src/ProductionCode2.c | 7 +++++++ examples/example_1/src/ProductionCode2.h | 7 +++++++ examples/example_1/test/TestProductionCode.c | 7 +++++++ examples/example_1/test/TestProductionCode2.c | 7 +++++++ examples/example_2/makefile | 11 ++++++----- examples/example_2/src/ProductionCode.c | 7 +++++++ examples/example_2/src/ProductionCode.h | 7 +++++++ examples/example_2/src/ProductionCode2.c | 7 +++++++ examples/example_2/src/ProductionCode2.h | 7 +++++++ examples/example_2/test/TestProductionCode.c | 7 +++++++ examples/example_2/test/TestProductionCode2.c | 7 +++++++ .../test_runners/TestProductionCode2_Runner.c | 7 +++++++ .../test/test_runners/TestProductionCode_Runner.c | 7 +++++++ examples/example_2/test/test_runners/all_tests.c | 7 +++++++ examples/example_3/helper/UnityHelper.c | 7 +++++++ examples/example_3/helper/UnityHelper.h | 7 +++++++ examples/example_3/rakefile.rb | 7 +++++++ examples/example_3/rakefile_helper.rb | 11 ++++++----- examples/example_3/src/ProductionCode.c | 7 +++++++ examples/example_3/src/ProductionCode.h | 7 +++++++ examples/example_3/src/ProductionCode2.c | 7 +++++++ examples/example_3/src/ProductionCode2.h | 7 +++++++ examples/example_3/target_gcc_32.yml | 7 +++++++ examples/example_3/test/TestProductionCode.c | 7 +++++++ examples/example_3/test/TestProductionCode2.c | 7 +++++++ examples/example_4/src/ProductionCode.c | 7 +++++++ examples/example_4/src/ProductionCode.h | 7 +++++++ examples/example_4/src/ProductionCode2.c | 7 +++++++ examples/example_4/src/ProductionCode2.h | 7 +++++++ examples/example_4/test/TestProductionCode.c | 7 +++++++ examples/example_4/test/TestProductionCode2.c | 7 +++++++ examples/unity_config.h | 7 +++++++ extras/bdd/src/unity_bdd.h | 12 ++++++------ extras/bdd/test/test_bdd.c | 11 ++++++----- extras/fixture/src/unity_fixture.c | 12 ++++++------ extras/fixture/src/unity_fixture.h | 13 +++++++------ extras/fixture/src/unity_fixture_internals.h | 13 +++++++------ extras/fixture/test/main/AllTests.c | 12 ++++++------ extras/fixture/test/template_fixture_tests.c | 13 +++++++------ extras/fixture/test/unity_fixture_Test.c | 13 +++++++------ extras/fixture/test/unity_fixture_TestRunner.c | 13 +++++++------ extras/memory/src/unity_memory.c | 11 ++++++----- extras/memory/src/unity_memory.h | 11 ++++++----- extras/memory/test/Makefile | 7 +++++++ extras/memory/test/unity_memory_Test.c | 11 ++++++----- extras/memory/test/unity_memory_TestRunner.c | 11 ++++++----- extras/memory/test/unity_output_Spy.c | 11 ++++++----- extras/memory/test/unity_output_Spy.h | 11 ++++++----- library.json | 7 +++++++ platformio-build.py | 7 +++++++ src/unity.c | 9 +++++---- src/unity.h | 11 ++++++----- src/unity_internals.h | 11 ++++++----- test/.rubocop.yml | 7 ++++++- test/Makefile | 6 ++++++ test/rakefile | 11 ++++++----- test/rakefile_helper.rb | 11 ++++++----- test/spec/generate_module_existing_file_spec.rb | 7 +++++++ test/targets/ansi.yml | 7 +++++++ test/targets/clang_file.yml | 7 +++++++ test/targets/clang_strict.yml | 7 +++++++ test/targets/gcc_32.yml | 7 +++++++ test/targets/gcc_64.yml | 7 +++++++ test/targets/gcc_auto_limits.yml | 7 +++++++ test/targets/gcc_auto_stdint.yml | 7 +++++++ test/targets/gcc_manual_math.yml | 7 +++++++ test/targets/hitech_picc18.yml | 7 +++++++ test/targets/iar_arm_v4.yml | 7 +++++++ test/targets/iar_arm_v5.yml | 7 +++++++ test/targets/iar_arm_v5_3.yml | 7 +++++++ test/targets/iar_armcortex_LM3S9B92_v5_4.yml | 7 +++++++ test/targets/iar_cortexm3_v5.yml | 7 +++++++ test/targets/iar_msp430.yml | 7 +++++++ test/targets/iar_sh2a_v6.yml | 7 +++++++ test/testdata/CException.h | 7 +++++++ test/testdata/Defs.h | 7 +++++++ test/testdata/cmock.h | 7 +++++++ test/testdata/mockMock.h | 7 +++++++ test/testdata/testRunnerGenerator.c | 7 +++++++ test/testdata/testRunnerGeneratorSmall.c | 7 +++++++ test/testdata/testRunnerGeneratorWithMocks.c | 7 +++++++ test/tests/self_assessment_utils.h | 7 +++++++ test/tests/test_generate_test_runner.rb | 11 ++++++----- test/tests/test_unity_arrays.c | 11 ++++++----- test/tests/test_unity_core.c | 15 +++++++++------ test/tests/test_unity_doubles.c | 11 ++++++----- test/tests/test_unity_floats.c | 11 ++++++----- test/tests/test_unity_integers.c | 11 ++++++----- test/tests/test_unity_integers_64.c | 11 ++++++----- test/tests/test_unity_memory.c | 11 ++++++----- test/tests/test_unity_parameterized.c | 11 ++++++----- test/tests/test_unity_parameterizedDemo.c | 7 +++++++ test/tests/test_unity_strings.c | 11 ++++++----- test/tests/types_for_test.h | 7 +++++++ 113 files changed, 747 insertions(+), 223 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index e12b59e..ecca34c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, Greg Williams +Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, Greg Williams Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/auto/__init__.py b/auto/__init__.py index e69de29..793090f 100644 --- a/auto/__init__.py +++ b/auto/__init__.py @@ -0,0 +1,7 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + diff --git a/auto/colour_prompt.rb b/auto/colour_prompt.rb index 85cbfd8..57b495a 100644 --- a/auto/colour_prompt.rb +++ b/auto/colour_prompt.rb @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= if RUBY_PLATFORM =~ /(win|w)32$/ begin diff --git a/auto/colour_reporter.rb b/auto/colour_reporter.rb index b86b76c..273ea3b 100644 --- a/auto/colour_reporter.rb +++ b/auto/colour_reporter.rb @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= require_relative 'colour_prompt' diff --git a/auto/extract_version.py b/auto/extract_version.py index 1d137e5..44cb3b4 100755 --- a/auto/extract_version.py +++ b/auto/extract_version.py @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + #!/usr/bin/env python3 import re import sys diff --git a/auto/generate_config.yml b/auto/generate_config.yml index 4a5e474..d0fccec 100644 --- a/auto/generate_config.yml +++ b/auto/generate_config.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + #this is a sample configuration file for generate_module #you would use it by calling generate_module with the -ygenerate_config.yml option #files like this are useful for customizing generate_module to your environment diff --git a/auto/generate_module.rb b/auto/generate_module.rb index 7b33c72..4c91a13 100644 --- a/auto/generate_module.rb +++ b/auto/generate_module.rb @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= # This script creates all the files with start code necessary for a new module. # A simple module only requires a source file, header file, and test file. diff --git a/auto/generate_test_runner.rb b/auto/generate_test_runner.rb index 102f6f3..1a90564 100755 --- a/auto/generate_test_runner.rb +++ b/auto/generate_test_runner.rb @@ -1,10 +1,11 @@ #!/usr/bin/ruby -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= class UnityTestRunnerGenerator def initialize(options = nil) diff --git a/auto/parse_output.rb b/auto/parse_output.rb index aa306e2..7a5b7a5 100644 --- a/auto/parse_output.rb +++ b/auto/parse_output.rb @@ -1,3 +1,9 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= #============================================================ # Author: John Theofanopoulos # A simple parser. Takes the output files generated during the diff --git a/auto/stylize_as_junit.py b/auto/stylize_as_junit.py index 06c8659..a60c472 100644 --- a/auto/stylize_as_junit.py +++ b/auto/stylize_as_junit.py @@ -1,11 +1,10 @@ #! python3 -# ========================================== -# Fork from Unity Project - A Test Framework for C -# Pull request on Gerrit in progress, the objective of this file is to be deleted when official Unity deliveries -# include that modification -# Copyright (c) 2015 Alexander Mueller / XelaRellum@web.de -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= import sys import os from glob import glob diff --git a/auto/stylize_as_junit.rb b/auto/stylize_as_junit.rb index e4b911e..b44979e 100755 --- a/auto/stylize_as_junit.rb +++ b/auto/stylize_as_junit.rb @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + #!/usr/bin/ruby # # unity_to_junit.rb diff --git a/auto/test_file_filter.rb b/auto/test_file_filter.rb index f4834a1..c922cdd 100644 --- a/auto/test_file_filter.rb +++ b/auto/test_file_filter.rb @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= require_relative 'yaml_helper' diff --git a/auto/type_sanitizer.rb b/auto/type_sanitizer.rb index 3d1db09..0cf9563 100644 --- a/auto/type_sanitizer.rb +++ b/auto/type_sanitizer.rb @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + module TypeSanitizer def self.sanitize_c_identifier(unsanitized) # convert filename to valid C identifier by replacing invalid chars with '_' diff --git a/auto/unity_test_summary.py b/auto/unity_test_summary.py index 00c0da8..a7d24ba 100644 --- a/auto/unity_test_summary.py +++ b/auto/unity_test_summary.py @@ -1,10 +1,10 @@ #! python3 -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2015 Alexander Mueller / XelaRellum@web.de -# [Released under MIT License. Please refer to license.txt for details] -# Based on the ruby script by Mike Karlesky, Mark VanderVoord, Greg Williams -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= import sys import os import re diff --git a/auto/unity_test_summary.rb b/auto/unity_test_summary.rb index 03d67a6..0d7f183 100644 --- a/auto/unity_test_summary.rb +++ b/auto/unity_test_summary.rb @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= # !/usr/bin/ruby # diff --git a/auto/yaml_helper.rb b/auto/yaml_helper.rb index 3296ba0..32746db 100644 --- a/auto/yaml_helper.rb +++ b/auto/yaml_helper.rb @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= require 'yaml' diff --git a/examples/example_1/makefile b/examples/example_1/makefile index 28409c1..9c97687 100644 --- a/examples/example_1/makefile +++ b/examples/example_1/makefile @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= #We try to detect the OS we are running on, and adjust commands as needed ifeq ($(OS),Windows_NT) diff --git a/examples/example_1/src/ProductionCode.c b/examples/example_1/src/ProductionCode.c index db128e5..6be26ac 100644 --- a/examples/example_1/src/ProductionCode.c +++ b/examples/example_1/src/ProductionCode.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode.h" diff --git a/examples/example_1/src/ProductionCode.h b/examples/example_1/src/ProductionCode.h index 250ca0d..5aaa8bb 100644 --- a/examples/example_1/src/ProductionCode.h +++ b/examples/example_1/src/ProductionCode.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + int FindFunction_WhichIsBroken(int NumberToFind); int FunctionWhichReturnsLocalVariable(void); diff --git a/examples/example_1/src/ProductionCode2.c b/examples/example_1/src/ProductionCode2.c index 98ee7ee..ea12cd7 100644 --- a/examples/example_1/src/ProductionCode2.c +++ b/examples/example_1/src/ProductionCode2.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode2.h" diff --git a/examples/example_1/src/ProductionCode2.h b/examples/example_1/src/ProductionCode2.h index 34ae980..63f8b0f 100644 --- a/examples/example_1/src/ProductionCode2.h +++ b/examples/example_1/src/ProductionCode2.h @@ -1,2 +1,9 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction); diff --git a/examples/example_1/test/TestProductionCode.c b/examples/example_1/test/TestProductionCode.c index 404c371..44441fd 100644 --- a/examples/example_1/test/TestProductionCode.c +++ b/examples/example_1/test/TestProductionCode.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode.h" #include "unity.h" diff --git a/examples/example_1/test/TestProductionCode2.c b/examples/example_1/test/TestProductionCode2.c index 7d940c1..cb6e444 100644 --- a/examples/example_1/test/TestProductionCode2.c +++ b/examples/example_1/test/TestProductionCode2.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode2.h" #include "unity.h" diff --git a/examples/example_2/makefile b/examples/example_2/makefile index e283217..c0b4185 100644 --- a/examples/example_2/makefile +++ b/examples/example_2/makefile @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= #We try to detect the OS we are running on, and adjust commands as needed ifeq ($(OS),Windows_NT) diff --git a/examples/example_2/src/ProductionCode.c b/examples/example_2/src/ProductionCode.c index 3bafe20..e30851a 100644 --- a/examples/example_2/src/ProductionCode.c +++ b/examples/example_2/src/ProductionCode.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode.h" diff --git a/examples/example_2/src/ProductionCode.h b/examples/example_2/src/ProductionCode.h index 250ca0d..5aaa8bb 100644 --- a/examples/example_2/src/ProductionCode.h +++ b/examples/example_2/src/ProductionCode.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + int FindFunction_WhichIsBroken(int NumberToFind); int FunctionWhichReturnsLocalVariable(void); diff --git a/examples/example_2/src/ProductionCode2.c b/examples/example_2/src/ProductionCode2.c index 77c969f..bd6f4ce 100644 --- a/examples/example_2/src/ProductionCode2.c +++ b/examples/example_2/src/ProductionCode2.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode2.h" diff --git a/examples/example_2/src/ProductionCode2.h b/examples/example_2/src/ProductionCode2.h index 34ae980..63f8b0f 100644 --- a/examples/example_2/src/ProductionCode2.h +++ b/examples/example_2/src/ProductionCode2.h @@ -1,2 +1,9 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction); diff --git a/examples/example_2/test/TestProductionCode.c b/examples/example_2/test/TestProductionCode.c index b8fb95c..0e05a0d 100644 --- a/examples/example_2/test/TestProductionCode.c +++ b/examples/example_2/test/TestProductionCode.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode.h" #include "unity.h" #include "unity_fixture.h" diff --git a/examples/example_2/test/TestProductionCode2.c b/examples/example_2/test/TestProductionCode2.c index d9f4efe..de6c324 100644 --- a/examples/example_2/test/TestProductionCode2.c +++ b/examples/example_2/test/TestProductionCode2.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode2.h" #include "unity.h" #include "unity_fixture.h" diff --git a/examples/example_2/test/test_runners/TestProductionCode2_Runner.c b/examples/example_2/test/test_runners/TestProductionCode2_Runner.c index 6fcc3b1..c528c80 100644 --- a/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +++ b/examples/example_2/test/test_runners/TestProductionCode2_Runner.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "unity.h" #include "unity_fixture.h" diff --git a/examples/example_2/test/test_runners/TestProductionCode_Runner.c b/examples/example_2/test/test_runners/TestProductionCode_Runner.c index 41a416a..b65e669 100644 --- a/examples/example_2/test/test_runners/TestProductionCode_Runner.c +++ b/examples/example_2/test/test_runners/TestProductionCode_Runner.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "unity.h" #include "unity_fixture.h" diff --git a/examples/example_2/test/test_runners/all_tests.c b/examples/example_2/test/test_runners/all_tests.c index e706ece..6cd4ef9 100644 --- a/examples/example_2/test/test_runners/all_tests.c +++ b/examples/example_2/test/test_runners/all_tests.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "unity_fixture.h" static void RunAllTests(void) diff --git a/examples/example_3/helper/UnityHelper.c b/examples/example_3/helper/UnityHelper.c index 9cf42c6..1211017 100644 --- a/examples/example_3/helper/UnityHelper.c +++ b/examples/example_3/helper/UnityHelper.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "unity.h" #include "UnityHelper.h" #include diff --git a/examples/example_3/helper/UnityHelper.h b/examples/example_3/helper/UnityHelper.h index 1516111..573f26c 100644 --- a/examples/example_3/helper/UnityHelper.h +++ b/examples/example_3/helper/UnityHelper.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #ifndef _TESTHELPER_H #define _TESTHELPER_H diff --git a/examples/example_3/rakefile.rb b/examples/example_3/rakefile.rb index c095af3..48de0d0 100644 --- a/examples/example_3/rakefile.rb +++ b/examples/example_3/rakefile.rb @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + require 'rake' require 'rake/clean' require_relative 'rakefile_helper' diff --git a/examples/example_3/rakefile_helper.rb b/examples/example_3/rakefile_helper.rb index cbc4549..9b57e81 100644 --- a/examples/example_3/rakefile_helper.rb +++ b/examples/example_3/rakefile_helper.rb @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= require 'fileutils' require_relative '../../auto/unity_test_summary' diff --git a/examples/example_3/src/ProductionCode.c b/examples/example_3/src/ProductionCode.c index 3bafe20..e30851a 100644 --- a/examples/example_3/src/ProductionCode.c +++ b/examples/example_3/src/ProductionCode.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode.h" diff --git a/examples/example_3/src/ProductionCode.h b/examples/example_3/src/ProductionCode.h index 250ca0d..5aaa8bb 100644 --- a/examples/example_3/src/ProductionCode.h +++ b/examples/example_3/src/ProductionCode.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + int FindFunction_WhichIsBroken(int NumberToFind); int FunctionWhichReturnsLocalVariable(void); diff --git a/examples/example_3/src/ProductionCode2.c b/examples/example_3/src/ProductionCode2.c index 77c969f..bd6f4ce 100644 --- a/examples/example_3/src/ProductionCode2.c +++ b/examples/example_3/src/ProductionCode2.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode2.h" diff --git a/examples/example_3/src/ProductionCode2.h b/examples/example_3/src/ProductionCode2.h index 34ae980..63f8b0f 100644 --- a/examples/example_3/src/ProductionCode2.h +++ b/examples/example_3/src/ProductionCode2.h @@ -1,2 +1,9 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction); diff --git a/examples/example_3/target_gcc_32.yml b/examples/example_3/target_gcc_32.yml index d7568ab..3fa1004 100644 --- a/examples/example_3/target_gcc_32.yml +++ b/examples/example_3/target_gcc_32.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + # Copied from ~Unity/targets/gcc_32.yml unity_root: &unity_root '../..' unity_source: &unity_source '../../src/' diff --git a/examples/example_3/test/TestProductionCode.c b/examples/example_3/test/TestProductionCode.c index 28a5581..a74e9ea 100644 --- a/examples/example_3/test/TestProductionCode.c +++ b/examples/example_3/test/TestProductionCode.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode.h" #include "unity.h" diff --git a/examples/example_3/test/TestProductionCode2.c b/examples/example_3/test/TestProductionCode2.c index e2119cc..43907d4 100644 --- a/examples/example_3/test/TestProductionCode2.c +++ b/examples/example_3/test/TestProductionCode2.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode2.h" #include "unity.h" diff --git a/examples/example_4/src/ProductionCode.c b/examples/example_4/src/ProductionCode.c index db128e5..6be26ac 100644 --- a/examples/example_4/src/ProductionCode.c +++ b/examples/example_4/src/ProductionCode.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode.h" diff --git a/examples/example_4/src/ProductionCode.h b/examples/example_4/src/ProductionCode.h index 250ca0d..5aaa8bb 100644 --- a/examples/example_4/src/ProductionCode.h +++ b/examples/example_4/src/ProductionCode.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + int FindFunction_WhichIsBroken(int NumberToFind); int FunctionWhichReturnsLocalVariable(void); diff --git a/examples/example_4/src/ProductionCode2.c b/examples/example_4/src/ProductionCode2.c index 98ee7ee..ea12cd7 100644 --- a/examples/example_4/src/ProductionCode2.c +++ b/examples/example_4/src/ProductionCode2.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode2.h" diff --git a/examples/example_4/src/ProductionCode2.h b/examples/example_4/src/ProductionCode2.h index 34ae980..63f8b0f 100644 --- a/examples/example_4/src/ProductionCode2.h +++ b/examples/example_4/src/ProductionCode2.h @@ -1,2 +1,9 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction); diff --git a/examples/example_4/test/TestProductionCode.c b/examples/example_4/test/TestProductionCode.c index 526a84e..15a19fc 100644 --- a/examples/example_4/test/TestProductionCode.c +++ b/examples/example_4/test/TestProductionCode.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode.h" #include "unity.h" diff --git a/examples/example_4/test/TestProductionCode2.c b/examples/example_4/test/TestProductionCode2.c index 2578ca9..479a1a6 100644 --- a/examples/example_4/test/TestProductionCode2.c +++ b/examples/example_4/test/TestProductionCode2.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "ProductionCode2.h" #include "unity.h" diff --git a/examples/unity_config.h b/examples/unity_config.h index fc6cdb0..98931ab 100644 --- a/examples/unity_config.h +++ b/examples/unity_config.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + /* Unity Configuration * As of May 11th, 2016 at ThrowTheSwitch/Unity commit 837c529 * Update: December 29th, 2016 diff --git a/extras/bdd/src/unity_bdd.h b/extras/bdd/src/unity_bdd.h index d91b3f1..129b7bc 100644 --- a/extras/bdd/src/unity_bdd.h +++ b/extras/bdd/src/unity_bdd.h @@ -1,9 +1,9 @@ -/* Copyright (c) 2023 Michael Gene Brockus (Dreamer) and Contributed to Unity Project - * ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #ifndef UNITY_BDD_TEST_H_ #define UNITY_BDD_TEST_H_ diff --git a/extras/bdd/test/test_bdd.c b/extras/bdd/test/test_bdd.c index 4f41585..548ba97 100644 --- a/extras/bdd/test/test_bdd.c +++ b/extras/bdd/test/test_bdd.c @@ -1,8 +1,9 @@ -/* ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #include "unity_bdd.h" diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index c3dda79..0047bd3 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -1,9 +1,9 @@ -/* Copyright (c) 2010 James Grenning and Contributed to Unity Project - * ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity_fixture.h" #include "unity_internals.h" diff --git a/extras/fixture/src/unity_fixture.h b/extras/fixture/src/unity_fixture.h index 6575066..0eb471e 100644 --- a/extras/fixture/src/unity_fixture.h +++ b/extras/fixture/src/unity_fixture.h @@ -1,9 +1,10 @@ -/* Copyright (c) 2010 James Grenning and Contributed to Unity Project - * ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #ifndef UNITY_FIXTURE_H_ #define UNITY_FIXTURE_H_ diff --git a/extras/fixture/src/unity_fixture_internals.h b/extras/fixture/src/unity_fixture_internals.h index 1c51aa9..9e6f8b7 100644 --- a/extras/fixture/src/unity_fixture_internals.h +++ b/extras/fixture/src/unity_fixture_internals.h @@ -1,9 +1,10 @@ -/* Copyright (c) 2010 James Grenning and Contributed to Unity Project - * ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #ifndef UNITY_FIXTURE_INTERNALS_H_ #define UNITY_FIXTURE_INTERNALS_H_ diff --git a/extras/fixture/test/main/AllTests.c b/extras/fixture/test/main/AllTests.c index 30242cb..8b8e16b 100644 --- a/extras/fixture/test/main/AllTests.c +++ b/extras/fixture/test/main/AllTests.c @@ -1,9 +1,9 @@ -/* Copyright (c) 2010 James Grenning and Contributed to Unity Project - * ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity_fixture.h" diff --git a/extras/fixture/test/template_fixture_tests.c b/extras/fixture/test/template_fixture_tests.c index 18bbb89..ad7f082 100644 --- a/extras/fixture/test/template_fixture_tests.c +++ b/extras/fixture/test/template_fixture_tests.c @@ -1,9 +1,10 @@ -/* Copyright (c) 2010 James Grenning and Contributed to Unity Project - * ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "unity_fixture.h" diff --git a/extras/fixture/test/unity_fixture_Test.c b/extras/fixture/test/unity_fixture_Test.c index 1422b48..e258fba 100644 --- a/extras/fixture/test/unity_fixture_Test.c +++ b/extras/fixture/test/unity_fixture_Test.c @@ -1,9 +1,10 @@ -/* Copyright (c) 2010 James Grenning and Contributed to Unity Project - * ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "unity_fixture.h" #include diff --git a/extras/fixture/test/unity_fixture_TestRunner.c b/extras/fixture/test/unity_fixture_TestRunner.c index 7b78c49..0eb2bdb 100644 --- a/extras/fixture/test/unity_fixture_TestRunner.c +++ b/extras/fixture/test/unity_fixture_TestRunner.c @@ -1,9 +1,10 @@ -/* Copyright (c) 2010 James Grenning and Contributed to Unity Project - * ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "unity_fixture.h" diff --git a/extras/memory/src/unity_memory.c b/extras/memory/src/unity_memory.c index e4dc665..85abbc9 100644 --- a/extras/memory/src/unity_memory.c +++ b/extras/memory/src/unity_memory.c @@ -1,8 +1,9 @@ -/* ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #include "unity_memory.h" diff --git a/extras/memory/src/unity_memory.h b/extras/memory/src/unity_memory.h index ccdb826..ace96a5 100644 --- a/extras/memory/src/unity_memory.h +++ b/extras/memory/src/unity_memory.h @@ -1,8 +1,9 @@ -/* ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #ifndef UNITY_MEMORY_OVERRIDES_H_ #define UNITY_MEMORY_OVERRIDES_H_ diff --git a/extras/memory/test/Makefile b/extras/memory/test/Makefile index f3f86ce..790ab39 100644 --- a/extras/memory/test/Makefile +++ b/extras/memory/test/Makefile @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + CC = gcc ifeq ($(shell uname -s), Darwin) CC = clang diff --git a/extras/memory/test/unity_memory_Test.c b/extras/memory/test/unity_memory_Test.c index 6f832e2..163d24c 100644 --- a/extras/memory/test/unity_memory_Test.c +++ b/extras/memory/test/unity_memory_Test.c @@ -1,8 +1,9 @@ -/* ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #include "unity_memory.h" diff --git a/extras/memory/test/unity_memory_TestRunner.c b/extras/memory/test/unity_memory_TestRunner.c index 4c91a59..92e98ff 100644 --- a/extras/memory/test/unity_memory_TestRunner.c +++ b/extras/memory/test/unity_memory_TestRunner.c @@ -1,8 +1,9 @@ -/* ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #include "unity_memory.h" diff --git a/extras/memory/test/unity_output_Spy.c b/extras/memory/test/unity_output_Spy.c index 772fe0b..69fcacc 100644 --- a/extras/memory/test/unity_output_Spy.c +++ b/extras/memory/test/unity_output_Spy.c @@ -1,8 +1,9 @@ -/* ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #include "unity_output_Spy.h" diff --git a/extras/memory/test/unity_output_Spy.h b/extras/memory/test/unity_output_Spy.h index e2e401c..739263c 100644 --- a/extras/memory/test/unity_output_Spy.h +++ b/extras/memory/test/unity_output_Spy.h @@ -1,8 +1,9 @@ -/* ========================================== - * Unity Project - A Test Framework for C - * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - * [Released under MIT License. Please refer to license.txt for details] - * ========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #ifndef UNITY_OUTPUT_SPY_H #define UNITY_OUTPUT_SPY_H diff --git a/library.json b/library.json index 914f5f6..839b5ab 100644 --- a/library.json +++ b/library.json @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + { "name": "Unity", "version": "2.6.0", diff --git a/platformio-build.py b/platformio-build.py index 66fea42..51251dd 100644 --- a/platformio-build.py +++ b/platformio-build.py @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + import os Import("env") diff --git a/src/unity.c b/src/unity.c index b105fa2..7fd703a 100644 --- a/src/unity.c +++ b/src/unity.c @@ -1,8 +1,9 @@ /* ========================================================================= - Unity Project - A Test Framework for C - Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -============================================================================ */ + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" diff --git a/src/unity.h b/src/unity.h index 265e548..8337c8c 100644 --- a/src/unity.h +++ b/src/unity.h @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #ifndef UNITY_FRAMEWORK_H #define UNITY_FRAMEWORK_H diff --git a/src/unity_internals.h b/src/unity_internals.h index 65938ff..1214bf0 100644 --- a/src/unity_internals.h +++ b/src/unity_internals.h @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #ifndef UNITY_INTERNALS_H #define UNITY_INTERNALS_H diff --git a/test/.rubocop.yml b/test/.rubocop.yml index a3b811b..a11c246 100644 --- a/test/.rubocop.yml +++ b/test/.rubocop.yml @@ -1,4 +1,9 @@ -# This is the configuration used to check the rubocop source code. +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= #inherit_from: .rubocop_todo.yml diff --git a/test/Makefile b/test/Makefile index 5be0488..917a874 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,3 +1,9 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= CC = gcc ifeq ($(shell uname -s), Darwin) CC = clang diff --git a/test/rakefile b/test/rakefile index e5f3b74..7747f30 100644 --- a/test/rakefile +++ b/test/rakefile @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= $verbose = false $extra_paths = [] diff --git a/test/rakefile_helper.rb b/test/rakefile_helper.rb index 1a9fc33..61ce874 100644 --- a/test/rakefile_helper.rb +++ b/test/rakefile_helper.rb @@ -1,8 +1,9 @@ -# ========================================== -# Unity Project - A Test Framework for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= require 'fileutils' require_relative '../auto/unity_test_summary' diff --git a/test/spec/generate_module_existing_file_spec.rb b/test/spec/generate_module_existing_file_spec.rb index 74e7fc8..0d5eb1b 100644 --- a/test/spec/generate_module_existing_file_spec.rb +++ b/test/spec/generate_module_existing_file_spec.rb @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + require '../auto/generate_module.rb' require 'fileutils' diff --git a/test/targets/ansi.yml b/test/targets/ansi.yml index 81af4c7..960a5bd 100644 --- a/test/targets/ansi.yml +++ b/test/targets/ansi.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- colour: true :unity: diff --git a/test/targets/clang_file.yml b/test/targets/clang_file.yml index 964e814..0061733 100644 --- a/test/targets/clang_file.yml +++ b/test/targets/clang_file.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- colour: true :unity: diff --git a/test/targets/clang_strict.yml b/test/targets/clang_strict.yml index f124e8f..6ae1935 100644 --- a/test/targets/clang_strict.yml +++ b/test/targets/clang_strict.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- colour: true :unity: diff --git a/test/targets/gcc_32.yml b/test/targets/gcc_32.yml index ba388cf..60deb06 100644 --- a/test/targets/gcc_32.yml +++ b/test/targets/gcc_32.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- colour: true :unity: diff --git a/test/targets/gcc_64.yml b/test/targets/gcc_64.yml index ed9eb4a..b6f10f8 100644 --- a/test/targets/gcc_64.yml +++ b/test/targets/gcc_64.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- colour: true :unity: diff --git a/test/targets/gcc_auto_limits.yml b/test/targets/gcc_auto_limits.yml index 9cfda8d..12a11fe 100644 --- a/test/targets/gcc_auto_limits.yml +++ b/test/targets/gcc_auto_limits.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- colour: true :unity: diff --git a/test/targets/gcc_auto_stdint.yml b/test/targets/gcc_auto_stdint.yml index 66602ef..9406613 100644 --- a/test/targets/gcc_auto_stdint.yml +++ b/test/targets/gcc_auto_stdint.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- colour: true :unity: diff --git a/test/targets/gcc_manual_math.yml b/test/targets/gcc_manual_math.yml index b1b5b82..76fc992 100644 --- a/test/targets/gcc_manual_math.yml +++ b/test/targets/gcc_manual_math.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- colour: true :unity: diff --git a/test/targets/hitech_picc18.yml b/test/targets/hitech_picc18.yml index b984edb..493705b 100644 --- a/test/targets/hitech_picc18.yml +++ b/test/targets/hitech_picc18.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- :cmock: :plugins: [] diff --git a/test/targets/iar_arm_v4.yml b/test/targets/iar_arm_v4.yml index 9a1a276..36b1a0c 100644 --- a/test/targets/iar_arm_v4.yml +++ b/test/targets/iar_arm_v4.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- tools_root: C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\ colour: true diff --git a/test/targets/iar_arm_v5.yml b/test/targets/iar_arm_v5.yml index d4b115f..17b6b10 100644 --- a/test/targets/iar_arm_v5.yml +++ b/test/targets/iar_arm_v5.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3\ colour: true diff --git a/test/targets/iar_arm_v5_3.yml b/test/targets/iar_arm_v5_3.yml index d4b115f..17b6b10 100644 --- a/test/targets/iar_arm_v5_3.yml +++ b/test/targets/iar_arm_v5_3.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3\ colour: true diff --git a/test/targets/iar_armcortex_LM3S9B92_v5_4.yml b/test/targets/iar_armcortex_LM3S9B92_v5_4.yml index 1703fe2..7bf9287 100644 --- a/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +++ b/test/targets/iar_armcortex_LM3S9B92_v5_4.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- tools_root: C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\ colour: true diff --git a/test/targets/iar_cortexm3_v5.yml b/test/targets/iar_cortexm3_v5.yml index 8b0978f..e56286a 100644 --- a/test/targets/iar_cortexm3_v5.yml +++ b/test/targets/iar_cortexm3_v5.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.4\ colour: true diff --git a/test/targets/iar_msp430.yml b/test/targets/iar_msp430.yml index 6587253..a1bd3ee 100644 --- a/test/targets/iar_msp430.yml +++ b/test/targets/iar_msp430.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3 MSP430\ core_root: &1 diff --git a/test/targets/iar_sh2a_v6.yml b/test/targets/iar_sh2a_v6.yml index b4371cd..c4469d6 100644 --- a/test/targets/iar_sh2a_v6.yml +++ b/test/targets/iar_sh2a_v6.yml @@ -1,3 +1,10 @@ +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= + --- tools_root: C:\Program Files\IAR Systems\Embedded Workbench 6.0\ colour: true diff --git a/test/testdata/CException.h b/test/testdata/CException.h index 3872fa7..4f82afa 100644 --- a/test/testdata/CException.h +++ b/test/testdata/CException.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #ifndef CEXCEPTION_H #define CEXCEPTION_H diff --git a/test/testdata/Defs.h b/test/testdata/Defs.h index 58678c1..470f887 100644 --- a/test/testdata/Defs.h +++ b/test/testdata/Defs.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #ifndef DEF_H #define DEF_H diff --git a/test/testdata/cmock.h b/test/testdata/cmock.h index 33ddbfc..af73930 100644 --- a/test/testdata/cmock.h +++ b/test/testdata/cmock.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #ifndef CMOCK_H #define CMOCK_H diff --git a/test/testdata/mockMock.h b/test/testdata/mockMock.h index 5c6829d..3d728e4 100644 --- a/test/testdata/mockMock.h +++ b/test/testdata/mockMock.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #ifndef MOCK_MOCK_H #define MOCK_MOCK_H diff --git a/test/testdata/testRunnerGenerator.c b/test/testdata/testRunnerGenerator.c index 475e243..ab14c0e 100644 --- a/test/testdata/testRunnerGenerator.c +++ b/test/testdata/testRunnerGenerator.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + /* This Test File Is Used To Verify Many Combinations Of Using the Generate Test Runner Script */ #include diff --git a/test/testdata/testRunnerGeneratorSmall.c b/test/testdata/testRunnerGeneratorSmall.c index 58bc65c..15893d5 100644 --- a/test/testdata/testRunnerGeneratorSmall.c +++ b/test/testdata/testRunnerGeneratorSmall.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + /* This Test File Is Used To Verify Many Combinations Of Using the Generate Test Runner Script */ #include diff --git a/test/testdata/testRunnerGeneratorWithMocks.c b/test/testdata/testRunnerGeneratorWithMocks.c index d48692e..a5b37b8 100644 --- a/test/testdata/testRunnerGeneratorWithMocks.c +++ b/test/testdata/testRunnerGeneratorWithMocks.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + /* This Test File Is Used To Verify Many Combinations Of Using the Generate Test Runner Script */ #include diff --git a/test/tests/self_assessment_utils.h b/test/tests/self_assessment_utils.h index c8cb595..670dddc 100644 --- a/test/tests/self_assessment_utils.h +++ b/test/tests/self_assessment_utils.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #ifdef TEST_INSTANCES #include diff --git a/test/tests/test_generate_test_runner.rb b/test/tests/test_generate_test_runner.rb index 229b6ab..6766f5b 100644 --- a/test/tests/test_generate_test_runner.rb +++ b/test/tests/test_generate_test_runner.rb @@ -1,8 +1,9 @@ -# ========================================== -# CMock Project - Automatic Mock Generation for C -# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams -# [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================================================= +# Unity - A Test Framework for C +# ThrowTheSwitch.org +# Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams +# SPDX-License-Identifier: MIT +# ========================================================================= require '../auto/generate_test_runner.rb' diff --git a/test/tests/test_unity_arrays.c b/test/tests/test_unity_arrays.c index 2151eef..e61e43d 100644 --- a/test/tests/test_unity_arrays.c +++ b/test/tests/test_unity_arrays.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #define TEST_INSTANCES diff --git a/test/tests/test_unity_core.c b/test/tests/test_unity_core.c index c6ac812..094d48a 100644 --- a/test/tests/test_unity_core.c +++ b/test/tests/test_unity_core.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #define TEST_INSTANCES @@ -292,13 +293,15 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void) #ifndef USING_OUTPUT_SPY TEST_IGNORE(); #else + UNITY_UINT savedGetFlushSpyCalls = 0; UNITY_UINT savedFailures = Unity.TestFailures; Unity.CurrentTestFailed = 1; startPutcharSpy(); /* Suppress output */ startFlushSpy(); + savedGetFlushSpyCalls = getFlushSpyCalls(); UnityConcludeTest(); + TEST_ASSERT_EQUAL(0, savedGetFlushSpyCalls); endPutcharSpy(); - TEST_ASSERT_EQUAL(0, getFlushSpyCalls()); TEST_ASSERT_EQUAL(savedFailures + 1, Unity.TestFailures); #if defined(UNITY_OUTPUT_FLUSH) && defined(UNITY_OUTPUT_FLUSH_HEADER_DECLARATION) TEST_ASSERT_EQUAL(1, getFlushSpyCalls()); diff --git a/test/tests/test_unity_doubles.c b/test/tests/test_unity_doubles.c index 0ad9494..64d5907 100644 --- a/test/tests/test_unity_doubles.c +++ b/test/tests/test_unity_doubles.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #define TEST_INSTANCES diff --git a/test/tests/test_unity_floats.c b/test/tests/test_unity_floats.c index 9e92f96..4a2c213 100644 --- a/test/tests/test_unity_floats.c +++ b/test/tests/test_unity_floats.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #define TEST_INSTANCES diff --git a/test/tests/test_unity_integers.c b/test/tests/test_unity_integers.c index d615e5f..2a923a8 100644 --- a/test/tests/test_unity_integers.c +++ b/test/tests/test_unity_integers.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #define TEST_INSTANCES diff --git a/test/tests/test_unity_integers_64.c b/test/tests/test_unity_integers_64.c index 6e83329..2a1d376 100644 --- a/test/tests/test_unity_integers_64.c +++ b/test/tests/test_unity_integers_64.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #define TEST_INSTANCES diff --git a/test/tests/test_unity_memory.c b/test/tests/test_unity_memory.c index b3cff13..4d0513a 100644 --- a/test/tests/test_unity_memory.c +++ b/test/tests/test_unity_memory.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #define TEST_INSTANCES diff --git a/test/tests/test_unity_parameterized.c b/test/tests/test_unity_parameterized.c index aa9f9c1..a473a92 100644 --- a/test/tests/test_unity_parameterized.c +++ b/test/tests/test_unity_parameterized.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include #include diff --git a/test/tests/test_unity_parameterizedDemo.c b/test/tests/test_unity_parameterizedDemo.c index 83dfad6..6ee42c5 100644 --- a/test/tests/test_unity_parameterizedDemo.c +++ b/test/tests/test_unity_parameterizedDemo.c @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #include "unity.h" /* Support for Meta Test Rig */ diff --git a/test/tests/test_unity_strings.c b/test/tests/test_unity_strings.c index 964c553..99ba4d5 100644 --- a/test/tests/test_unity_strings.c +++ b/test/tests/test_unity_strings.c @@ -1,8 +1,9 @@ -/* ========================================== - Unity Project - A Test Framework for C - Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams - [Released under MIT License. Please refer to license.txt for details] -========================================== */ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ #include "unity.h" #define TEST_INSTANCES diff --git a/test/tests/types_for_test.h b/test/tests/types_for_test.h index 6da4e51..176926c 100644 --- a/test/tests/types_for_test.h +++ b/test/tests/types_for_test.h @@ -1,3 +1,10 @@ +/* ========================================================================= + Unity - A Test Framework for C + ThrowTheSwitch.org + Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, & Greg Williams + SPDX-License-Identifier: MIT +========================================================================= */ + #pragma once typedef enum { From f1d953a651835acbd7b68c47d70db3935747d129 Mon Sep 17 00:00:00 2001 From: Fredrik Ellertsen Date: Wed, 20 Mar 2024 12:47:02 +0100 Subject: [PATCH 7/7] Fix shebang placement 671f8d2 introduced a license header to auto/extract_version.py before the shebang, causing builds to fail like this: ../subprojects/unity/meson.build:7:0: ERROR: Failed running '/path/to/extract_version.py', binary or interpreter not executable. --- auto/extract_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto/extract_version.py b/auto/extract_version.py index 44cb3b4..ff7a698 100755 --- a/auto/extract_version.py +++ b/auto/extract_version.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # ========================================================================= # Unity - A Test Framework for C # ThrowTheSwitch.org @@ -5,7 +6,6 @@ # SPDX-License-Identifier: MIT # ========================================================================= -#!/usr/bin/env python3 import re import sys