Commit Graph

232 Commits

Author SHA1 Message Date
Jean Carlo Machado
4faae4435d removed duplicated declaration of putcharSpy 2016-11-16 21:37:51 -02:00
jsalling
933cc97364 Add option to set NaN != NaN for floating point assertions 2016-10-10 21:20:10 -05:00
Mark VanderVoord
dce6d329ff Finished fixing floating point comparisons. We have streamlined how floats and doubles are checked, but we still can't compare them for equality directly. So we're directly testing for infinite and NaN before checking diffs. Also, we've officially decided that for testing purposes NaN shall equal NaN, +Inf shall equal +Inf, and -Inf shall equal -Inf. It's what most people expect during a test. 2016-09-22 08:35:22 -04:00
Mark VanderVoord
7dc17efbb3 Merge pull request #215 from jsalling/bugfix/inf-equals-inf
Bugfix Inf equals Inf
2016-09-21 20:52:58 -04:00
Mark VanderVoord
693169eddf Merge pull request #218 from 2trill2spill/master
Add OSX to travis-ci build.
2016-09-20 14:31:45 -04:00
Mark VanderVoord
95435afa4e Merge pull request #214 from jsalling/feature/c-strings
Print escapes for C strings
2016-09-07 07:48:09 -04:00
nah
e12cef36e2 Don't need to ignore unused functions on linux because I reverted the static commit. 2016-09-04 10:47:35 -05:00
nah
8e6716645e Revert setting functions to static. 2016-09-04 10:38:40 -05:00
nah
2d98ed6afb Merge branch 'build'
Merge build branch.
2016-09-04 10:35:02 -05:00
nah
7ee9bc3ecd Ignore missing prototype warning. 2016-09-04 10:31:57 -05:00
nah
794e533ab5 Ignore unused functions on linux. 2016-09-04 10:25:31 -05:00
nah
f0f9f20421 Set functions that are only used within testunity to static. 2016-09-04 10:21:06 -05:00
nah
7552c187fb Ignore missing noreturn and unused functions. 2016-09-04 10:20:31 -05:00
nah
65f0febf03 Ignore padding and float to double implicit warning. 2016-09-04 09:55:49 -05:00
nah
647c846f9f Set CFLAGS differently for linux and osx.
Add check for linux and move initial CFLAG settings inside linux check. Add
CFLAGS specific to osx and clang to the existing osx/darwin check. Ignore clang warning about default on covered enum switch, look at pull #217 and pull #177 for more info about why that warning is ignored on clang. Ignore unknown clang options so that I don't have to change CFLAG settings elsewhere in the file, clang should just ignore options it dosen't know about.
2016-09-04 09:25:44 -05:00
jsalling
de39186187 Add test for C string escape sequences 2016-09-01 01:18:03 -05:00
jsalling
af590028fa Unity to print C-style escaped strings as "\x16"
Changes from "\0x16" before, makes it easier to copy strings from output
2016-09-01 01:18:03 -05:00
jsalling
0cc3e45a23 Suppress output of FAIL messages that are expected during testing
Works when using the putcharSpy, transparent without it
2016-08-31 20:43:21 -05:00
Mark VanderVoord
382c7087f4 Merge pull request #211 from jsalling/feature/testunity-fail-output
Make testunity.c failure output uniform
2016-08-31 07:20:34 -04:00
jsalling
028ca953d7 Finish checking for equal floats in Arrays functions
Refactor to use the same code everywhere for FloatWithin check
 Rename and fix a few tests for new behavior, infinity == infinity
2016-08-27 15:12:45 -05:00
jsalling
268c5b7e0b Make testunity.c printing uniform during failure, delete word "Previous" 2016-08-25 23:02:11 -05:00
jsalling
113f2fc32a Add line numbers to Unity test Runner generated by awk script 2016-08-25 23:01:10 -05:00
jsalling
28c94bd403 Remove references to UNITY_EXCLUDE_SIZEOF, rework config header 2016-08-25 08:48:29 -05:00
jsalling
9aa4c7f1aa Clean up Makefile, move -Wredundant-decls to test build
CC always exists inside make so ?= doesn't assign to it
2016-08-25 08:33:15 -05:00
jsalling
e4e2210eb6 Improving integer width detection
The C preprocessor cannot use sizeof in #if etc.
2016-08-25 08:32:42 -05:00
jsalling
3108aba5c7 If two floats happen to be equal, return right away
Covers the cases where infinity == infinity
2016-08-23 22:36:02 -05:00
Mark VanderVoord
57676b5edc - Fixed cases with wildcards in file handling. 2016-07-17 19:11:09 -04:00
Mark VanderVoord
1cecab30e8 - Added alias for filter -n of -f
- Added ability to surround filter strings in either type of quotes
- Added ability to filter on multiple test strings as a comma delimited list
- Added ability to filter on test_file:test_name
- Added ability to use alternate syntax for filter of -f="blah"
2016-07-08 17:35:37 -04:00
Mark VanderVoord
eba387fa3e - Add tests which prove command line arguments now work with runner. Fixed a few bugs in this area. 2016-06-27 08:41:58 -04:00
Mark VanderVoord
96f51e8530 Updated method of testing generate_test_runner script to be a FUNCTIONAL test instead of a perfect code match. Backfilled most tests and added some coverage not previously present. Still need to test new command line args and a few cmock details. 2016-06-22 20:57:11 -04:00
Mark VanderVoord
b3bc196ab3 making new flush routines work under all defined conditions. 2016-06-21 10:01:34 -04:00
Andrzej Bieniek
61dd3f181b Change comments style in unity and test runner to compile with std=c89 2016-05-15 14:35:50 +01:00
Mark VanderVoord
c5c392b18a update UNITY_OUTPUT_CHAR to not return a value (because we never check it anyway).
add UNITY_OUTPUT_FLUSH to make sure we get the output we need on aborted tests and whatnot.
2016-05-06 10:47:39 -04:00
jsalling
c5238adab2 100% code coverage for Unity project
Add test for failure count and UnityEnd return value
 Cover printing escape codes with length parameter
 Full statement coverage
2016-05-03 21:58:29 -05:00
jsalling
bff491c73c Test strings not equal to NULL when using length parameter 2016-05-03 20:47:00 -05:00
jsalling
7c270e0541 Test that details are printed in a direct TEST_FAIL call 2016-05-03 20:31:37 -05:00
jsalling
4164540333 Test number arrays for two NULL inputs, it should pass
More statement coverage on NULL input feature
2016-05-03 20:26:42 -05:00
jsalling
213e47178c Test string arrays and memory comparison with length 0, it should fail 2016-05-03 20:17:38 -05:00
jsalling
a6748f39cd Test number arrays comparison with length 0, it should fail
Get test coverage on this feature for int, float, & double
2016-05-03 20:14:30 -05:00
jsalling
07513dd331 Remove weak linked setup/teardown from coverage build, unreachable & empty
Add config flag for 64-bit, max covered lines even with 32-bit compilers
 Always print uncovered lines, delete separate make target
2016-05-03 20:02:01 -05:00
Mark VanderVoord
4f2cdb03fc Merge pull request #185 from jsalling/feature/output-declaration
Add Unity Fixture to the travisCI build and restore header declaration of UNITY_OUTPUT_CHAR
2016-04-26 22:53:41 -04:00
Jerry Jacobs
6a02f7e51c Fixup issues when compiling with clang -Wmissing-variable-declarations 2016-04-26 14:17:10 +02:00
jsalling
573481729b Revert commits 720ea42 and a27b03c which broke the Fixture build
These were aimed at preventing the internals header from declaring
  a prototype for 'int UNITY_OUTPUT_CHAR(int);'. The second part fixed
  an omitted declaration in the tests caused by the first commit.
 Will replace the default behavior & add an option for this in next commit
2016-04-24 23:30:01 -05:00
Jerry Jacobs
720ea42a82 tests/testunity.c: Fix after redundant declarations fix 2016-04-13 12:59:31 +02:00
Jerry Jacobs
8c37d7b98a Fix #182, remove redundant function declarations 2016-04-13 11:33:57 +02:00
jsalling
13c99601a7 Add a value to FLOAT_TRAIT enum to enforce use of default case in switches
Revert the previous commit. Add tests for extended enum cases.
 Fix crash due to accessing 'trait_names' array out of bounds.
 Adding an extra invalid value to the end of an enum causes '-Wswitch' flag
  to warn unless there is a switch default case - also enabled by '-Wall'.
2016-03-02 14:56:09 -06:00
jsalling
da0f2a0a74 Add Makefile with coverage target for Unity
Unity is at 92% coverage now
 Run 'make -s' to see coverage information for unity.c
 Run 'make uncovered' to get missing lines output
2016-03-01 21:24:53 -06:00
Mark VanderVoord
bcf6515329 Protect test runner generator against characters in strings that look like comments or functions 2016-02-25 15:35:45 -05:00
jsalling
f55bed38a6 Delete function call syntax from Spy detect macros
This fixes #168. See that github.com issue for more discussion.
 Allows the tests to build when putchar() is defined as a macro
  with parenthesis around it, as in the ARM embedded gcc compiler.
2016-02-25 10:41:04 -06:00
Mark VanderVoord
433ee63575 Added ability to finish test immediately with a pass condition by using TEST_PASS 2016-02-24 16:00:55 -05:00