1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-28 10:44:26 +01:00

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'.
This commit is contained in:
jsalling
2016-03-01 23:35:55 -06:00
parent 7a0875f4f3
commit 13c99601a7
4 changed files with 36 additions and 4 deletions

View File

@@ -396,7 +396,8 @@ typedef enum _UNITY_FLOAT_TRAIT_T
UNITY_FLOAT_IS_NOT_NAN,
UNITY_FLOAT_IS_NAN,
UNITY_FLOAT_IS_NOT_DET,
UNITY_FLOAT_IS_DET
UNITY_FLOAT_IS_DET,
UNITY_FLOAT_INVALID_TRAIT
} UNITY_FLOAT_TRAIT_T;
#endif