1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-27 02:11:36 +01:00

Make UnityPrintFloat on by default

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
This commit is contained in:
jsalling
2016-11-13 23:47:16 -06:00
parent 54fe786fae
commit 47f6a85b8c
4 changed files with 26 additions and 31 deletions

View File

@@ -171,7 +171,6 @@
#undef UNITY_INCLUDE_FLOAT
#undef UNITY_FLOAT_PRECISION
#undef UNITY_FLOAT_TYPE
#undef UNITY_FLOAT_VERBOSE
#else
@@ -225,16 +224,13 @@ typedef UNITY_FLOAT_TYPE _UF;
/* No Floating Point Support */
#undef UNITY_DOUBLE_PRECISION
#undef UNITY_DOUBLE_TYPE
#undef UNITY_DOUBLE_VERBOSE
#ifdef UNITY_INCLUDE_DOUBLE
#undef UNITY_INCLUDE_DOUBLE
#endif
#ifdef UNITY_FLOAT_VERBOSE
typedef _UF _UD;
/* For parameter in UnityPrintFloat, double promotion required */
#endif
typedef _UF _UD;
/* For parameter in UnityPrintFloat(_UD), which aliases to double or float */
#else
@@ -250,12 +246,6 @@ typedef UNITY_FLOAT_TYPE _UF;
#endif
#ifdef UNITY_DOUBLE_VERBOSE
#ifndef UNITY_FLOAT_VERBOSE
#define UNITY_FLOAT_VERBOSE
#endif
#endif
/*-------------------------------------------------------
* Output Method: stdout (DEFAULT)
*-------------------------------------------------------*/
@@ -443,7 +433,7 @@ void UnityPrintNumber(const _U_SINT number);
void UnityPrintNumberUnsigned(const _U_UINT number);
void UnityPrintNumberHex(const _U_UINT number, const char nibbles);
#ifdef UNITY_FLOAT_VERBOSE
#ifndef UNITY_EXCLUDE_FLOAT_PRINT
void UnityPrintFloat(const _UD number);
#endif