Takes about 10 minutes to run all floats, so split into 3 tests for parallel
running later. This was useful during development for finding hard corner cases
and getting the routine to high quality. Off by default.
Note that all floats 16.0 and up can be represented uniquely (in this format) and will
round-trip back to the exact same float with sscanf(). This property is true for
UnityPrintFloat, despite a few rounding error cases, it will produce output identity.
Better comments and refactor on round ties to even
Add upper threshold value on round to even feature since numerical precision issues
start to give approximations when dividing one large double by another. When tested
on float values, using 1e22 gave the fewest rounding errors.
Fix warnings from gcc. Some float constants do not behave well in existing tests.
Add casts where conversions could be imprecise.
Remove UNITY_FLOAT_VERBOSE entirely, add option UNITY_EXCLUDE_FLOAT_PRINT
Remove some questionable float casts from doubles
Default to Round Ties to Even behavior, add option to Round Ties Away from Zero
Improve printing six decimal places, remove trailing 0's, fix the carry when
numbers like 0.9999999 round up and print leading zeros in the decimal
The first attempt at printing floats had precision issues where the last few
digits would often be wrong. This next approach may yield a better algorithm
for numbers less than 4.29 billion, those that fit in 32 bits.
This fixes#220.
Removing strings from test files is still dangerous, but much
less likely to cause problems after this change to do the
removal after removing comments.
The bug could still manifest if a test file contains defines two
macros, one that contains a single quotation mark and then another
defined somewhere after it that contains a single quotation mark.
Everything in between the aforementioned quotation marks would
still be ignored after this commit, but that is an unlikely
scenario.
Switch to C language so we can specify operating systems. We have to install ruby 2.1 via rvm because the ruby interpreter on travis ci crashes when running rake ci, however that same version of ruby works fine on my local machine. This work around adds about 6 Minutes to the build and should be replaced as soon as possible to speed up builds.
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.