Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
535fe43c
T
Third Party Unity
项目概览
OpenHarmony
/
Third Party Unity
接近 2 年 前同步成功
通知
38
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看板
提交
535fe43c
编写于
11月 24, 2015
作者:
M
Mark VanderVoord
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #146 from jsalling/unity-eol
Move UNITY_PRINT_EOL to internals, change to function macro (Thanks, jsalling!)
上级
c6dc96f3
de7cf833
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
11 deletion
+14
-11
extras/fixture/src/unity_fixture.c
extras/fixture/src/unity_fixture.c
+5
-5
src/unity.c
src/unity.c
+5
-6
src/unity_internals.h
src/unity_internals.h
+4
-0
未找到文件。
extras/fixture/src/unity_fixture.c
浏览文件 @
535fe43c
...
...
@@ -28,7 +28,7 @@ static void announceTestRun(unsigned int runNumber)
UnityPrintNumber
(
runNumber
+
1
);
UnityPrint
(
" of "
);
UnityPrintNumber
(
UnityFixture
.
RepeatCount
);
UNITY_
OUTPUT_CHAR
(
'\n'
);
UNITY_
PRINT_EOL
(
);
}
int
UnityMain
(
int
argc
,
const
char
*
argv
[],
void
(
*
runAllTests
)(
void
))
...
...
@@ -43,7 +43,7 @@ int UnityMain(int argc, const char* argv[], void (*runAllTests)(void))
UnityBegin
(
argv
[
0
]);
announceTestRun
(
r
);
runAllTests
();
UNITY_
OUTPUT_CHAR
(
'\n'
);
UNITY_
PRINT_EOL
(
);
UnityEnd
();
}
...
...
@@ -396,7 +396,7 @@ void UnityConcludeFixtureTest(void)
{
//if (UnityFixture.Verbose)
//{
UNITY_
OUTPUT_CHAR
(
'\n'
);
UNITY_
PRINT_EOL
(
);
//}
Unity
.
TestIgnores
++
;
}
...
...
@@ -405,13 +405,13 @@ void UnityConcludeFixtureTest(void)
if
(
UnityFixture
.
Verbose
)
{
UnityPrint
(
" PASS"
);
UNITY_
OUTPUT_CHAR
(
'\n'
);
UNITY_
PRINT_EOL
(
);
}
}
else
if
(
Unity
.
CurrentTestFailed
)
{
Unity
.
TestFailures
++
;
UNITY_
OUTPUT_CHAR
(
'\n'
);
UNITY_
PRINT_EOL
(
);
}
Unity
.
CurrentTestFailed
=
0
;
...
...
src/unity.c
浏览文件 @
535fe43c
...
...
@@ -11,7 +11,6 @@
#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); }
/// return prematurely if we are already in failure or ignore state
#define UNITY_SKIP_EXECUTION { if ((Unity.CurrentTestFailed != 0) || (Unity.CurrentTestIgnored != 0)) {return;} }
#define UNITY_PRINT_EOL { UNITY_OUTPUT_CHAR('\n'); }
struct
_Unity
Unity
;
...
...
@@ -356,7 +355,7 @@ void UnityConcludeTest(void)
Unity
.
CurrentTestFailed
=
0
;
Unity
.
CurrentTestIgnored
=
0
;
UNITY_PRINT_EOL
;
UNITY_PRINT_EOL
()
;
}
//-----------------------------------------------
...
...
@@ -1273,16 +1272,16 @@ void UnityBegin(const char* filename)
//-----------------------------------------------
int
UnityEnd
(
void
)
{
UNITY_PRINT_EOL
;
UNITY_PRINT_EOL
()
;
UnityPrint
(
UnityStrBreaker
);
UNITY_PRINT_EOL
;
UNITY_PRINT_EOL
()
;
UnityPrintNumber
((
_U_SINT
)(
Unity
.
NumberOfTests
));
UnityPrint
(
UnityStrResultsTests
);
UnityPrintNumber
((
_U_SINT
)(
Unity
.
TestFailures
));
UnityPrint
(
UnityStrResultsFailures
);
UnityPrintNumber
((
_U_SINT
)(
Unity
.
TestIgnores
));
UnityPrint
(
UnityStrResultsIgnored
);
UNITY_PRINT_EOL
;
UNITY_PRINT_EOL
()
;
if
(
Unity
.
TestFailures
==
0U
)
{
UnityPrintOk
();
...
...
@@ -1291,7 +1290,7 @@ int UnityEnd(void)
{
UnityPrintFail
();
}
UNITY_PRINT_EOL
;
UNITY_PRINT_EOL
()
;
UNITY_OUTPUT_COMPLETE
();
return
(
int
)(
Unity
.
TestFailures
);
}
...
...
src/unity_internals.h
浏览文件 @
535fe43c
...
...
@@ -291,6 +291,10 @@ typedef UNITY_DOUBLE_TYPE _UD;
extern
int
UNITY_OUTPUT_CHAR
(
int
);
#endif
#ifndef UNITY_PRINT_EOL
#define UNITY_PRINT_EOL() UNITY_OUTPUT_CHAR('\n')
#endif
#ifndef UNITY_OUTPUT_START
#define UNITY_OUTPUT_START()
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录