Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
6b664fc8
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看板
提交
6b664fc8
编写于
1月 15, 2016
作者:
J
jsalling
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pass through correct line info on failures in Fixture pointer setting
上级
4c384658
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
8 addition
and
9 deletion
+8
-9
extras/fixture/src/unity_fixture.c
extras/fixture/src/unity_fixture.c
+6
-7
extras/fixture/src/unity_fixture.h
extras/fixture/src/unity_fixture.h
+1
-1
extras/fixture/src/unity_fixture_internals.h
extras/fixture/src/unity_fixture_internals.h
+1
-1
未找到文件。
extras/fixture/src/unity_fixture.c
浏览文件 @
6b664fc8
...
...
@@ -299,15 +299,14 @@ void* unity_realloc(void* oldMem, size_t size)
//--------------------------------------------------------
//Automatic pointer restoration functions
typedef
struct
_
PointerPair
struct
PointerPair
{
struct
_PointerPair
*
next
;
void
**
pointer
;
void
*
old_value
;
}
PointerPair
;
};
enum
{
MAX_POINTERS
=
50
};
static
PointerPair
pointer_store
[
MAX_POINTERS
+
1
];
enum
{
MAX_POINTERS
=
50
};
static
struct
PointerPair
pointer_store
[
MAX_POINTERS
];
static
int
pointer_index
=
0
;
void
UnityPointer_Init
(
void
)
...
...
@@ -315,11 +314,11 @@ void UnityPointer_Init(void)
pointer_index
=
0
;
}
void
UnityPointer_Set
(
void
**
pointer
,
void
*
newValue
)
void
UnityPointer_Set
(
void
**
pointer
,
void
*
newValue
,
UNITY_LINE_TYPE
line
)
{
if
(
pointer_index
>=
MAX_POINTERS
)
{
TEST_FAIL_MESSAGE
(
"Too many pointers set"
);
UNITY_TEST_FAIL
(
line
,
"Too many pointers set"
);
}
else
{
...
...
extras/fixture/src/unity_fixture.h
浏览文件 @
6b664fc8
...
...
@@ -64,7 +64,7 @@ int UnityMain(int argc, const char* argv[], void (*runAllTests)(void));
TEST_##group##_GROUP_RUNNER(); }
//CppUTest Compatibility Macros
#define UT_PTR_SET(ptr, newPointerValue) UnityPointer_Set((void**)&(ptr), (void*)(newPointerValue))
#define UT_PTR_SET(ptr, newPointerValue) UnityPointer_Set((void**)&(ptr), (void*)(newPointerValue)
, __LINE__
)
#define TEST_ASSERT_POINTERS_EQUAL(expected, actual) TEST_ASSERT_EQUAL_PTR((expected), (actual))
#define TEST_ASSERT_BYTES_EQUAL(expected, actual) TEST_ASSERT_EQUAL_HEX8(0xff & (expected), 0xff & (actual))
#define FAIL(message) TEST_FAIL_MESSAGE((message))
...
...
extras/fixture/src/unity_fixture_internals.h
浏览文件 @
6b664fc8
...
...
@@ -34,7 +34,7 @@ UNITY_COUNTER_TYPE UnityTestsCount(void);
int
UnityGetCommandLineOptions
(
int
argc
,
const
char
*
argv
[]);
void
UnityConcludeFixtureTest
(
void
);
void
UnityPointer_Set
(
void
**
ptr
,
void
*
newValue
);
void
UnityPointer_Set
(
void
**
ptr
,
void
*
newValue
,
UNITY_LINE_TYPE
line
);
void
UnityPointer_UndoAllSets
(
void
);
void
UnityPointer_Init
(
void
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录