Commit Graph

177 Commits

Author SHA1 Message Date
黄国辉 9b846b9885 update unity 2.6.0
Signed-off-by: 黄国辉 <huangguohui6@huawei.com>
2024-05-13 17:57:44 +08:00
openharmony_ci e4b531f70e 回退 'Pull Request !16 : update unity2.6.0' 2024-05-11 11:52:21 +00:00
lizhengrong 04aac07d60 update unity 2.6.0
Signed-off-by: lizhengrong <lizhengrong9@huawei.com>
2024-04-23 11:35:37 +08:00
mipengwei b81b849bf5 Signed-off-by:mipengwei<mipengwei@huawei.com> 2022-06-29 11:45:13 +08:00
mamingshuai 5891e6f712 update openharmony 1.0.1 2021-03-11 18:42:54 +08:00
wenjun 3f760d041f add OpenHarmony 1.0 baseline 2020-09-09 09:26:48 +08:00
anon b1d1c148be Option to omit UnityBegin/UnityEnd calls in generate_test_runner
By passing --omit_begin_end=1 to generate_test_runner.rb, the script
will now omit calls to UnityBegin and UnityEnd when running tests in a
suite.

This allows multiple suites to be executed in a row, and then have an overall
summary of the tests which were executed across all suites.
2019-10-29 20:32:06 +00:00
John Lindgren d10b43c55a Make verifyTest() leave Ignores and Callbacks intact. 2019-10-29 13:21:34 -04:00
mvandervoord f19945080b Add verifyTest option to go with resetTest.
Fix docs.
2019-10-28 10:32:22 -04:00
mvandervoord 740c98b164 Updated to newer coding standard 2019-10-24 15:33:41 -04:00
John Lindgren 9c9008abf3 Convert RUN_TEST() to a function (generated from an ERB template).
Converting RUN_TEST() from a macro to a function significantly reduces the size
of the compiled binary.  On amd64, the largest test runner in the test suite
(testsample_DefaultsThroughCommandLine_runner.o) was reduced from 3.4 kB to 2.4
kB (stripped).
2019-10-22 15:18:20 -04:00
John Lindgren 35f92dcd22 Remove unnecessary #includes. 2019-10-22 15:05:34 -04:00
John Lindgren 28088ba191 Make sure setUp/tearDown are always defined. 2019-10-22 15:04:03 -04:00
Mark VanderVoord 2cfb3a2788 fix name of teardown function 2019-10-22 06:52:25 -04:00
Mark VanderVoord c61ea31e43 suite setup and teardown no longer static (simplifies test-supplied instance) 2019-10-22 06:45:47 -04:00
Mark VanderVoord 33613cdccf Fixed backwards case. 2019-10-22 06:37:28 -04:00
Mark VanderVoord a04842bc9e update handling of when suite_setup/teardown in use 2019-10-22 06:27:26 -04:00
Mark VanderVoord f8b6892648 More argument fixing (I hate flying blind... can't wait to get back on my laptop) 2019-10-21 14:59:31 -04:00
Mark VanderVoord e0dea98c33 missed function call arguments 2019-10-21 14:45:56 -04:00
Mark VanderVoord 99ab9fda24 Switch from the inconsistent use of weak symbols to handling setup, etc in script generators 2019-10-21 14:21:52 -04:00
Mark VanderVoord ef119c479d Better protection against nested comments (and things that look like comments) 2019-08-12 15:40:43 -04:00
Mark VanderVoord d186ad0abc Cleanup issue #417 2019-07-05 19:14:22 -04:00
Mark VanderVoord b97afac732 - Added options for how to handle TEST_ASSERT_EQUAL shorthand
- Tweak a couple style problems with Ruby scripts.
2019-07-03 15:03:03 -04:00
Nico Tonnhofer 899ed690d0 add a blank line after #include "unity.h"
The include must be in the first line, else you may expect some issues.
Some autoformat tools could sort the includes alphabetically and could
break the test.
2019-06-27 08:28:52 +02:00
Mark VanderVoord 3fbcd39c63 Merge pull request #377 from elliot-gawthrop/execution-time-embedded
Execution time improvements
2019-05-04 07:53:37 -04:00
Mark VanderVoord 4fe51d0f64 Merge pull request #379 from elliot-gawthrop/auto-runner-args
Redefine name of resetTest in generated runner
2019-05-04 07:51:40 -04:00
Fredrik Rothamel 91f0409d7a Allow multi line test-function definitions. 2019-04-04 09:51:37 +02:00
Tomer Yogev ccb7f0fe5c recursive search for target test files in test summary python script 2019-03-26 17:32:30 +02:00
Jason Heeris 47ca265784 Removed leading underscore from module generator header guards. 2019-02-22 08:38:29 +11:00
elliot e835d7bf41 Improvements to the execution time feature
- Running time macros have been made more portable, previously it was not
  possible to override all macros
- Running time macros will be executed by default test runner, and auto test
  runners
- Adds a default execution time implementation for unix. (Previous default
  implementation only worked on Windows)
- For embedded platforms there is a simple method of getting a default
  implementation by defining a single macro UNITY_CLOCK_MS()
- Removed need for UNITY_EXEC_TIME_RESET. This was not being used for the default
  implementations, if anything ever did need reset-like functionality it could
  simply be wrapped up with the start or stop macros for that platform
2019-01-31 22:01:20 +00:00
elliot 7f5e465aba Add ability to override name of the 'resetTest' function
This allows multiple groups to be compiled into the same executable by naming each function uniquely.
2019-01-31 21:59:58 +00:00
Dom Postorivo 71bd7ea79e generate runner defines with #ifndef guards 2018-12-21 22:37:11 -05:00
Elliot Gawthrop 004d470f67 Add support for strings in TEST_CASE() 2018-12-10 20:53:27 +00:00
John Lindgren 5f8fab986e Fix (most) Rubocop warnings. 2018-11-28 13:27:00 -05:00
Mark VanderVoord 70225e82de Added support to inject "extern C" into runners when generated. 2018-08-09 08:48:08 -04:00
Trond Einar Snekvik 54c9932073 Add support for :mock_suffix
Adds support for :mock_suffix when generating mock setup and teardown
functions. Also documents both prefix and suffix in the helper script
guide.
2018-06-07 10:06:43 +02:00
Fabian Zahn bd3be0addc Added some useful documentation which states the output formats that are parseable by this script. 2018-02-27 07:23:18 +01:00
Fabian Zahn ad7b8686a7 Fixed unity fixture output and added methods for each of the different outputs. Added documentation.
Fixed some whitespaces.
Refactored class_name to class_name_idx (expressiveness).
Refactored the xml output to methods (extensibility).
2018-02-26 22:23:11 +01:00
Fabian Zahn d72a7312a5 - Fixed whitespaces and formatting
- Added more expressiveness to the code
- Fixed some of the rubocop hints
2018-02-22 21:47:21 +01:00
Fabian Zahn 7ce1cb51d0 Refactored the os specific settings, it is now possible to convert both styles on every system (and even mixed) 2018-02-22 21:23:29 +01:00
Fabian Zahn c303c33b10 - Removed member variable @test_flag
- Fixed stdout output if fixture is active
- Refactored the state manipulation of @test_suite and moved it completely into test_suite_verify()
2018-02-22 19:55:40 +01:00
Fabian Zahn a8ed73b729 Added ".to_s" to the test suite name (explicit type conversion) 2018-02-12 06:44:26 +01:00
Fabian Zahn dd4f050efe Removed leading whitespace 2018-02-11 13:02:26 +01:00
Fabian Zahn a46df06dd0 Some minor changes
- String split now works correctly for windows and unix (cross platform)
- Removed unnecessary whitespaces in the xml output (beautifies the output)
- Added support for TEST_IGNORE() (without message)
2018-01-29 21:00:46 +01:00
Krzysztof Kwiatkowski 8f09e17235 Test runner generation: Wrap setjmp.h inclusion in ifdefs
Auto generated test runner should generate a code  which includes
setjmp.h only if UNITY_EXCLUDE_SETJMP_H is not defined
2017-11-20 09:46:30 +00:00
John Lindgren 60626bd896 Merge unity_setup.h into unity.h. 2017-11-01 11:36:26 -04:00
John Lindgren 34b0cb65cd Make weak symbol usage more portable:
- Enable support for Green Hills Software compiler
- Define weak implementations only once except on Windows
2017-10-09 11:39:48 -04:00
John Lindgren 0462045bdf Fix link errors with MinGW.
MinGW supports a limited form of weak symbols, with the restriction
that weak/default implementations need to be defined in the same
translation unit they are called from.  Strong/overriding symbols
may of course be specified in a different translation unit.
2017-10-09 10:49:58 -04:00
John Lindgren 19166aa0f2 Allow suiteSetUp() and suiteTearDown() to be provided as normal C functions.
This is simpler and more flexible than embedding C code in the Ruby options
(:suite_setup and :suite_teardown).  However, support for :suite_setup and
:suite_teardown is kept for backwards compatibility.

Several configurations are possible:
1. :suite_setup and :suite_teardown options provided and used.
2. :suite_setup and :suite_teardown options not provided (nil):
  2a. Weak symbols not supported; suiteSetUp() and suiteTearDown() are not called.
      It would be simpler to make user-provided functions mandatory in this case,
      but it could break some pre-existing test suites.
  2b. Weak symbols are supported and the stub implementations of suiteSetUp() and
      suiteTearDown() are called if there are no user-provided functions.
  2c. Weak symbols are supported but overridden by user-provided suiteSetUp() and
      suiteTearDown() functions.
2017-09-13 18:12:23 -04:00
Mark VanderVoord 91e1b3143c Fix bug #288 - invalid line numbers on partial name matches 2017-09-11 15:39:17 -04:00