Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
77af37ad
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看板
提交
77af37ad
编写于
6月 18, 2015
作者:
T
ThingamaByte, LLC
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- catch optional fixtures plugin up to mainline unity (somewhat. like fixing line endings)
上级
06c95fcb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
4 deletion
+23
-4
examples/example_2/makefile
examples/example_2/makefile
+2
-1
extras/fixture/src/unity_fixture.c
extras/fixture/src/unity_fixture.c
+4
-3
src/unity.c
src/unity.c
+15
-0
src/unity_internals.h
src/unity_internals.h
+2
-0
未找到文件。
examples/example_2/makefile
浏览文件 @
77af37ad
...
...
@@ -43,6 +43,7 @@ CFLAGS += -Wundef
CFLAGS
+=
-Wold-style-definition
CFLAGS
+=
-Wmissing-prototypes
CFLAGS
+=
-Wmissing-declarations
CFLAGS
+=
-DUNITY_FIXTURES
TARGET_BASE1
=
all_tests
TARGET1
=
$(TARGET_BASE1)$(TARGET_EXTENSION)
...
...
@@ -63,7 +64,7 @@ all: clean default
default
:
$(C_COMPILER)
$(CFLAGS)
$(INC_DIRS)
$(SYMBOLS)
$(SRC_FILES1)
-o
$(TARGET1)
./
$(TARGET1)
./
$(TARGET1)
-v
clean
:
$(CLEANUP)
...
...
extras/fixture/src/unity_fixture.c
浏览文件 @
77af37ad
...
...
@@ -374,10 +374,10 @@ void UnityConcludeFixtureTest(void)
{
if
(
Unity
.
CurrentTestIgnored
)
{
if
(
UnityFixture
.
Verbose
)
{
//
if (UnityFixture.Verbose)
//
{
UNITY_OUTPUT_CHAR
(
'\n'
);
}
//
}
Unity
.
TestIgnores
++
;
}
else
if
(
!
Unity
.
CurrentTestFailed
)
...
...
@@ -391,6 +391,7 @@ void UnityConcludeFixtureTest(void)
else
if
(
Unity
.
CurrentTestFailed
)
{
Unity
.
TestFailures
++
;
UNITY_OUTPUT_CHAR
(
'\n'
);
}
Unity
.
CurrentTestFailed
=
0
;
...
...
src/unity.c
浏览文件 @
77af37ad
...
...
@@ -260,31 +260,44 @@ void UnityPrintFloat(_UF number)
//-----------------------------------------------
void
UnityPrintFail
(
void
);
void
UnityPrintFail
(
void
)
{
UnityPrint
(
UnityStrFail
);
}
void
UnityPrintOk
(
void
);
void
UnityPrintOk
(
void
)
{
UnityPrint
(
UnityStrOk
);
}
//-----------------------------------------------
static
void
UnityTestResultsBegin
(
const
char
*
file
,
const
UNITY_LINE_TYPE
line
);
static
void
UnityTestResultsBegin
(
const
char
*
file
,
const
UNITY_LINE_TYPE
line
)
{
#ifndef UNITY_FIXTURES
UnityPrint
(
file
);
UNITY_OUTPUT_CHAR
(
':'
);
UnityPrintNumber
((
_U_SINT
)
line
);
UNITY_OUTPUT_CHAR
(
':'
);
UnityPrint
(
Unity
.
CurrentTestName
);
UNITY_OUTPUT_CHAR
(
':'
);
#else
UNITY_UNUSED
(
file
);
UNITY_UNUSED
(
line
);
#endif
}
//-----------------------------------------------
static
void
UnityTestResultsFailBegin
(
const
UNITY_LINE_TYPE
line
);
static
void
UnityTestResultsFailBegin
(
const
UNITY_LINE_TYPE
line
)
{
#ifndef UNITY_FIXTURES
UnityTestResultsBegin
(
Unity
.
TestFile
,
line
);
#else
UNITY_UNUSED
(
line
);
#endif
UnityPrint
(
UnityStrFail
);
UNITY_OUTPUT_CHAR
(
':'
);
}
...
...
@@ -312,6 +325,7 @@ void UnityConcludeTest(void)
}
//-----------------------------------------------
static
void
UnityAddMsgIfSpecified
(
const
char
*
msg
);
static
void
UnityAddMsgIfSpecified
(
const
char
*
msg
)
{
if
(
msg
)
...
...
@@ -322,6 +336,7 @@ static void UnityAddMsgIfSpecified(const char* msg)
}
//-----------------------------------------------
static
void
UnityPrintExpectedAndActualStrings
(
const
char
*
expected
,
const
char
*
actual
);
static
void
UnityPrintExpectedAndActualStrings
(
const
char
*
expected
,
const
char
*
actual
)
{
UnityPrint
(
UnityStrExpected
);
...
...
src/unity_internals.h
浏览文件 @
77af37ad
...
...
@@ -555,6 +555,8 @@ extern const char UnityStrErr64[];
#define UNITY_END() UnityEnd()
#endif
#define UNITY_UNUSED(x) (void)(sizeof(x))
//-------------------------------------------------------
// Basic Fail and Ignore
//-------------------------------------------------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录