Commit Graph

106 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
John Lindgren 539ae44bd1 Fix TEST_ASSERT_HEX64_ARRAY_WITHIN truncating delta to 32 bits. 2019-10-29 16:59:59 -04:00
mvandervoord 2dc36b7a95 Added set of assertions for checking CHAR's and CHAR arrays (not as strings) 2019-10-28 16:54:32 -04:00
mvandervoord d28857f186 Stopped supported -0 as a float output because (a) it is non-portable, only existing on some architectures and (b) relies on the undefined behavior of 1.0/0.0 2019-10-28 13:43:32 -04:00
mvandervoord a9a2399310 - added target for checking ANSI compliance
- fixed ANSI (C89) issues, including #418
2019-10-25 10:17:12 -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
Mark VanderVoord 3ce61e6eae Add TEST_MESSAGE for outputting messages without aborting a test and _MESSAGE variant to TEST_PASS collection. 2019-07-06 11:02:32 -04:00
Fabian Zahn e4f4b71a7d Adjust testHexPrintsUpToMaxNumberOfNibbles (independent of sizeof operator and arithmetics) 2019-05-12 09:16:41 +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 8172aa912e Merge branch 'master' into test-cleanup-gt-lt 2019-05-04 07:28:12 -04:00
Dom Postorivo 84a7e42eaa ARRAY_WITHIN in unity 2019-04-20 14:10:56 -04:00
Dom Postorivo 8fd9c7dbcf Add tests for GREATER_OR_EQUAL, LESS_OR_EQUAL, LESS_THAN, and GREATER_THAN 2019-04-14 15:59:40 -04:00
Dom Postorivo 85bdd99102 expliticly show test failures of unequal strings 2019-04-13 11:53:14 -04: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 Gawthrop 004d470f67 Add support for strings in TEST_CASE() 2018-12-10 20:53:27 +00:00
John Lindgren 9e08553e9b Merge branch 'master' into float-printing 2018-11-28 14:02:41 -05:00
elliot 34f93a6277 Merge branch 'master' into unit-test-execution-time 2018-07-28 20:01:50 +01:00
Fabian Zahn 33046c00a4 Refactored the test evaluation of the flushSpy 2018-02-18 18:44:58 +01:00
Fabian Zahn dfa85dcbbe Got the tests running 2018-02-18 17:43:08 +01:00
Fabian Zahn ca00d1b158 Added unit test for the call to flush 2018-02-18 17:08:49 +01:00
Fabian Zahn 3763ef7823 Fixed copy and paste error, changed the signature from:
void flushSpy(int c) {}
to:
 void flushSpy(void) {}
2018-02-18 16:32:04 +01:00
Fabian Zahn 0bc57ee54b Fixed copy and paste error 2018-02-18 14:53:39 +01:00
Fabian Zahn 244f7eca19 Added flushSpy and the respective helper functions 2018-02-18 14:46:42 +01:00
Fabian Zahn 34374716a7 Added flushSpy 2018-02-18 14:23:26 +01:00
John Lindgren 55de47e72a Restore round-to-even behavior. 2017-11-07 23:25:27 -05:00
John Lindgren c45e76fd96 Print 9 digits if we have double precision capability. 2017-11-07 22:44:59 -05:00
John Lindgren 1f09a193e2 Improve accuracy of UnityPrintFloat() for common cases. 2017-11-07 11:42:19 -05:00
John Lindgren fc462c78f5 Allow UnityPrintFloat() to print a 7th digit. 2017-11-07 11:42:19 -05:00
balaksh a087e8b786 Implement optional printing of execution time for each test 2017-09-10 13:00:09 +12:00
Mark VanderVoord 3dac73595d Merge pull request #285 from dpostorivo/gt_lt_asserts
Cleanup Greater than and Less than asserts from other PR (#264) (Thanks @dpostorivo and @Dommar92 !)
2017-09-08 13:27:22 -04:00
John Lindgren 38f1f4761c Fix test link error. 2017-08-25 15:47:40 -04:00
John Lindgren 479e28b18c Rewrite UnityPrintFloat to match printf("%.6g").
The existing implementation was not very good:
 - It printed all very small values as "0.000000..."
 - It did not distinguish positive and negative zero
 - In some cases it printed extra garbage digits for single-precision values
   (e.g. 3.9e+30 was printed as 3.90000013+30)

Tests have been updated to check that we now match printf("%.6g") for
1,000,000 randomly chosen values, except for rounding of the 6th digit.
2017-08-25 14:27:37 -04:00
Dom Postorivo 2a34fe93bb Added Greater than and Less than asserts from other PR 2017-05-13 15:59:51 -04:00
Mark VanderVoord 5899519a48 Starting to enforce our coding style. The first step is that we’ve pulled in Rubocop to check out Ruby syntax. There is likely a bit of customization to do yet AND there is definitely that backlog of todo’s that we just told it to ignore. 2017-03-28 08:44:32 -04:00
Mark VanderVoord d954f6f1ce also update strings to support each element of an array. 2017-03-21 23:57:15 -04:00
Mark VanderVoord 749b0641bf Added memory each equal assertion 2017-03-21 18:28:49 -04:00
Mark VanderVoord 096e1bcbc1 Added each_equal assertions for float and double 2017-03-21 17:05:19 -04:00
Mark VanderVoord a6f3572c81 Added more tests for all the numerical types when performing each_equal assertions 2017-03-21 16:24:16 -04:00
Mark VanderVoord e0fea78be4 Added some tests to prove this works. Still work in progress 2017-03-21 14:37:52 -04:00
jsalling 44e0b476b1 Test for printing max width of a hex number, back to 100% test coverage
Correct clean target and print test fails during coverage in Makefile
2017-01-23 23:05:06 -06:00
jsalling 7be0a6ab5c Option to exclude setjump/longjmp, setjmp.h
Using this option changes the control flow of Unity, but is useful on
constrained embedded systems. You can't fully simulate the power of
'longjmp' with just 'return', but Unity still works well, all tests pass.
2017-01-14 11:15:30 -06:00
Mark VanderVoord 0bd49111e2 Merge pull request #244 from jsalling/cleanup/promotion-warnings
Remove promotion warnings on float constants, Inline the isneg/ispos macros
2017-01-13 15:46:07 -05:00
Mark VanderVoord 31797840ba Merge pull request #245 from jsalling/feature/teardown-not-ignore
Always run the tearDown() even if test is ignored
2017-01-13 15:43:26 -05:00
Mark VanderVoord cd60acf2be Merge pull request #241 from jsalling/cleanup/float-testing
Cleanup floating point print testing, update docs
2017-01-13 15:42:15 -05:00
jsalling f65c3ca6dd Finish cleaning up float options in testunity 2016-12-29 23:06:34 -06:00