Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
7aca6288
T
Third Party Unity
项目概览
OpenHarmony
/
Third Party Unity
1 年多 前同步成功
通知
36
Star
144
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Unity
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7aca6288
编写于
11月 02, 2014
作者:
M
Mark VanderVoord
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #81 from laborer2008/master
Fixed -Wcast-qual gcc warnings
上级
e6ad979f
b492b6d3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
16 deletion
+16
-16
src/unity.c
src/unity.c
+16
-16
未找到文件。
src/unity.c
浏览文件 @
7aca6288
...
...
@@ -434,8 +434,8 @@ void UnityAssertEqualIntArray(UNITY_PTR_ATTRIBUTE const void* expected,
const
UNITY_DISPLAY_STYLE_T
style
)
{
_UU32
elements
=
num_elements
;
UNITY_PTR_ATTRIBUTE
const
_US8
*
ptr_exp
=
(
UNITY_PTR_ATTRIBUTE
_US8
*
)
expected
;
UNITY_PTR_ATTRIBUTE
const
_US8
*
ptr_act
=
(
UNITY_PTR_ATTRIBUTE
_US8
*
)
actual
;
UNITY_PTR_ATTRIBUTE
const
_US8
*
ptr_exp
=
(
UNITY_PTR_ATTRIBUTE
const
_US8
*
)
expected
;
UNITY_PTR_ATTRIBUTE
const
_US8
*
ptr_act
=
(
UNITY_PTR_ATTRIBUTE
const
_US8
*
)
actual
;
UNITY_SKIP_EXECUTION
;
...
...
@@ -447,7 +447,7 @@ void UnityAssertEqualIntArray(UNITY_PTR_ATTRIBUTE const void* expected,
UNITY_FAIL_AND_BAIL
;
}
if
(
UnityCheckArraysForNull
((
UNITY_PTR_ATTRIBUTE
void
*
)
expected
,
(
UNITY_PTR_ATTRIBUTE
void
*
)
actual
,
lineNumber
,
msg
)
==
1
)
if
(
UnityCheckArraysForNull
((
UNITY_PTR_ATTRIBUTE
const
void
*
)
expected
,
(
UNITY_PTR_ATTRIBUTE
const
void
*
)
actual
,
lineNumber
,
msg
)
==
1
)
return
;
// If style is UNITY_DISPLAY_STYLE_INT, we'll fall into the default case rather than the INT16 or INT32 (etc) case
...
...
@@ -481,15 +481,15 @@ void UnityAssertEqualIntArray(UNITY_PTR_ATTRIBUTE const void* expected,
case
UNITY_DISPLAY_STYLE_UINT16
:
while
(
elements
--
)
{
if
(
*
(
UNITY_PTR_ATTRIBUTE
_US16
*
)
ptr_exp
!=
*
(
UNITY_PTR_ATTRIBUTE
_US16
*
)
ptr_act
)
if
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US16
*
)
ptr_exp
!=
*
(
UNITY_PTR_ATTRIBUTE
const
_US16
*
)
ptr_act
)
{
UnityTestResultsFailBegin
(
lineNumber
);
UnityPrint
(
UnityStrElement
);
UnityPrintNumberByStyle
((
num_elements
-
elements
-
1
),
UNITY_DISPLAY_STYLE_UINT
);
UnityPrint
(
UnityStrExpected
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
_US16
*
)
ptr_exp
,
style
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US16
*
)
ptr_exp
,
style
);
UnityPrint
(
UnityStrWas
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
_US16
*
)
ptr_act
,
style
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US16
*
)
ptr_act
,
style
);
UnityAddMsgIfSpecified
(
msg
);
UNITY_FAIL_AND_BAIL
;
}
...
...
@@ -503,15 +503,15 @@ void UnityAssertEqualIntArray(UNITY_PTR_ATTRIBUTE const void* expected,
case
UNITY_DISPLAY_STYLE_UINT64
:
while
(
elements
--
)
{
if
(
*
(
UNITY_PTR_ATTRIBUTE
_US64
*
)
ptr_exp
!=
*
(
UNITY_PTR_ATTRIBUTE
_US64
*
)
ptr_act
)
if
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US64
*
)
ptr_exp
!=
*
(
UNITY_PTR_ATTRIBUTE
const
_US64
*
)
ptr_act
)
{
UnityTestResultsFailBegin
(
lineNumber
);
UnityPrint
(
UnityStrElement
);
UnityPrintNumberByStyle
((
num_elements
-
elements
-
1
),
UNITY_DISPLAY_STYLE_UINT
);
UnityPrint
(
UnityStrExpected
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
_US64
*
)
ptr_exp
,
style
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US64
*
)
ptr_exp
,
style
);
UnityPrint
(
UnityStrWas
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
_US64
*
)
ptr_act
,
style
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US64
*
)
ptr_act
,
style
);
UnityAddMsgIfSpecified
(
msg
);
UNITY_FAIL_AND_BAIL
;
}
...
...
@@ -523,15 +523,15 @@ void UnityAssertEqualIntArray(UNITY_PTR_ATTRIBUTE const void* expected,
default:
while
(
elements
--
)
{
if
(
*
(
UNITY_PTR_ATTRIBUTE
_US32
*
)
ptr_exp
!=
*
(
UNITY_PTR_ATTRIBUTE
_US32
*
)
ptr_act
)
if
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US32
*
)
ptr_exp
!=
*
(
UNITY_PTR_ATTRIBUTE
const
_US32
*
)
ptr_act
)
{
UnityTestResultsFailBegin
(
lineNumber
);
UnityPrint
(
UnityStrElement
);
UnityPrintNumberByStyle
((
num_elements
-
elements
-
1
),
UNITY_DISPLAY_STYLE_UINT
);
UnityPrint
(
UnityStrExpected
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
_US32
*
)
ptr_exp
,
style
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US32
*
)
ptr_exp
,
style
);
UnityPrint
(
UnityStrWas
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
_US32
*
)
ptr_act
,
style
);
UnityPrintNumberByStyle
(
*
(
UNITY_PTR_ATTRIBUTE
const
_US32
*
)
ptr_act
,
style
);
UnityAddMsgIfSpecified
(
msg
);
UNITY_FAIL_AND_BAIL
;
}
...
...
@@ -565,7 +565,7 @@ void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const _UF* expected,
UNITY_FAIL_AND_BAIL
;
}
if
(
UnityCheckArraysForNull
((
UNITY_PTR_ATTRIBUTE
void
*
)
expected
,
(
UNITY_PTR_ATTRIBUTE
void
*
)
actual
,
lineNumber
,
msg
)
==
1
)
if
(
UnityCheckArraysForNull
((
UNITY_PTR_ATTRIBUTE
const
void
*
)
expected
,
(
UNITY_PTR_ATTRIBUTE
const
void
*
)
actual
,
lineNumber
,
msg
)
==
1
)
return
;
while
(
elements
--
)
...
...
@@ -1008,8 +1008,8 @@ void UnityAssertEqualMemory( UNITY_PTR_ATTRIBUTE const void* expected,
const
char
*
msg
,
const
UNITY_LINE_TYPE
lineNumber
)
{
UNITY_PTR_ATTRIBUTE
unsigned
char
*
ptr_exp
=
(
UNITY_PTR_ATTRIBUTE
unsigned
char
*
)
expected
;
UNITY_PTR_ATTRIBUTE
unsigned
char
*
ptr_act
=
(
UNITY_PTR_ATTRIBUTE
unsigned
char
*
)
actual
;
UNITY_PTR_ATTRIBUTE
const
unsigned
char
*
ptr_exp
=
(
UNITY_PTR_ATTRIBUTE
const
unsigned
char
*
)
expected
;
UNITY_PTR_ATTRIBUTE
const
unsigned
char
*
ptr_act
=
(
UNITY_PTR_ATTRIBUTE
const
unsigned
char
*
)
actual
;
_UU32
elements
=
num_elements
;
_UU32
bytes
;
...
...
@@ -1023,7 +1023,7 @@ void UnityAssertEqualMemory( UNITY_PTR_ATTRIBUTE const void* expected,
UNITY_FAIL_AND_BAIL
;
}
if
(
UnityCheckArraysForNull
((
UNITY_PTR_ATTRIBUTE
void
*
)
expected
,
(
UNITY_PTR_ATTRIBUTE
void
*
)
actual
,
lineNumber
,
msg
)
==
1
)
if
(
UnityCheckArraysForNull
((
UNITY_PTR_ATTRIBUTE
const
void
*
)
expected
,
(
UNITY_PTR_ATTRIBUTE
const
void
*
)
actual
,
lineNumber
,
msg
)
==
1
)
return
;
while
(
elements
--
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录