提交 df3fe0c3 编写于 作者: M Mark VanderVoord

Merge pull request #82 from gageas/master

Declare local variables before UNITY_SKIP_EXECUTION.
...@@ -643,13 +643,13 @@ void UnityAssertFloatSpecial(const _UF actual, ...@@ -643,13 +643,13 @@ void UnityAssertFloatSpecial(const _UF actual,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
const UNITY_FLOAT_TRAIT_T style) const UNITY_FLOAT_TRAIT_T style)
{ {
UNITY_SKIP_EXECUTION;
const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet }; const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet };
_U_SINT should_be_trait = ((_U_SINT)style & 1); _U_SINT should_be_trait = ((_U_SINT)style & 1);
_U_SINT is_trait = !should_be_trait; _U_SINT is_trait = !should_be_trait;
_U_SINT trait_index = style >> 1; _U_SINT trait_index = style >> 1;
UNITY_SKIP_EXECUTION;
switch(style) switch(style)
{ {
//To determine Inf / Neg Inf, we compare to an Inf / Neg Inf value we create on the fly //To determine Inf / Neg Inf, we compare to an Inf / Neg Inf value we create on the fly
...@@ -803,13 +803,13 @@ void UnityAssertDoubleSpecial(const _UD actual, ...@@ -803,13 +803,13 @@ void UnityAssertDoubleSpecial(const _UD actual,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
const UNITY_FLOAT_TRAIT_T style) const UNITY_FLOAT_TRAIT_T style)
{ {
UNITY_SKIP_EXECUTION;
const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet }; const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet };
_U_SINT should_be_trait = ((_U_SINT)style & 1); _U_SINT should_be_trait = ((_U_SINT)style & 1);
_U_SINT is_trait = !should_be_trait; _U_SINT is_trait = !should_be_trait;
_U_SINT trait_index = style >> 1; _U_SINT trait_index = style >> 1;
UNITY_SKIP_EXECUTION;
switch(style) switch(style)
{ {
//To determine Inf / Neg Inf, we compare to an Inf / Neg Inf value we create on the fly //To determine Inf / Neg Inf, we compare to an Inf / Neg Inf value we create on the fly
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册