mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-19 21:38:30 +08:00
Merge pull request #82 from gageas/master
Declare local variables before UNITY_SKIP_EXECUTION.
This commit is contained in:
@ -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,
|
|||||||
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
|
||||||
|
Reference in New Issue
Block a user