Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
72c55e02
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看板
提交
72c55e02
编写于
9月 22, 2013
作者:
M
Mark VanderVoord
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- Fixed script tests to match Shelly's changes
上级
635884b0
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
1152 addition
and
1112 deletion
+1152
-1112
test/expectdata/testsample_cmd.c
test/expectdata/testsample_cmd.c
+57
-54
test/expectdata/testsample_def.c
test/expectdata/testsample_def.c
+53
-50
test/expectdata/testsample_mock_cmd.c
test/expectdata/testsample_mock_cmd.c
+78
-76
test/expectdata/testsample_mock_def.c
test/expectdata/testsample_mock_def.c
+74
-72
test/expectdata/testsample_mock_new1.c
test/expectdata/testsample_mock_new1.c
+87
-85
test/expectdata/testsample_mock_new2.c
test/expectdata/testsample_mock_new2.c
+87
-85
test/expectdata/testsample_mock_param.c
test/expectdata/testsample_mock_param.c
+75
-73
test/expectdata/testsample_mock_run1.c
test/expectdata/testsample_mock_run1.c
+87
-85
test/expectdata/testsample_mock_run2.c
test/expectdata/testsample_mock_run2.c
+87
-85
test/expectdata/testsample_mock_yaml.c
test/expectdata/testsample_mock_yaml.c
+88
-86
test/expectdata/testsample_new1.c
test/expectdata/testsample_new1.c
+63
-60
test/expectdata/testsample_new2.c
test/expectdata/testsample_new2.c
+66
-63
test/expectdata/testsample_param.c
test/expectdata/testsample_param.c
+54
-51
test/expectdata/testsample_run1.c
test/expectdata/testsample_run1.c
+63
-60
test/expectdata/testsample_run2.c
test/expectdata/testsample_run2.c
+66
-63
test/expectdata/testsample_yaml.c
test/expectdata/testsample_yaml.c
+67
-64
未找到文件。
test/expectdata/testsample_cmd.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CEXCEPTION_T
e
;
\
Try
{
\
setUp
();
\
TestFunc
();
\
}
Catch
(
e
)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE
(
CEXCEPTION_NONE
,
e
,
"Unhandled Exception!"
);
}
\
}
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CEXCEPTION_T e; \
Try { \
setUp(); \
TestFunc(); \
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
} \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "funky.h"
#include "stanky.h"
#include <setjmp.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_def.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
setUp
();
\
TestFunc
();
\
}
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
setUp(); \
TestFunc(); \
} \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
#include "funky.h"
#include "stanky.h"
#include <setjmp.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_mock_cmd.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CEXCEPTION_T
e
;
\
Try
{
\
CMock_Init
();
\
setUp
();
\
TestFunc
();
\
CMock_Verify
();
\
}
Catch
(
e
)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE
(
CEXCEPTION_NONE
,
e
,
"Unhandled Exception!"
);
}
\
}
\
CMock_Destroy
();
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CEXCEPTION_T e; \
Try { \
CMock_Init(); \
setUp(); \
TestFunc(); \
CMock_Verify(); \
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
} \
CMock_Destroy(); \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "funky.h"
#include <setjmp.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_mock_def.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CMock_Init
();
\
setUp
();
\
TestFunc
();
\
CMock_Verify
();
\
}
\
CMock_Destroy
();
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CMock_Init(); \
setUp(); \
TestFunc(); \
CMock_Verify(); \
} \
CMock_Destroy(); \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "funky.h"
#include <setjmp.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_mock_new1.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CEXCEPTION_T
e
;
\
Try
{
\
CMock_Init
();
\
setUp
();
\
TestFunc
();
\
CMock_Verify
();
\
}
Catch
(
e
)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE
(
CEXCEPTION_NONE
,
e
,
"Unhandled Exception!"
);
}
\
}
\
CMock_Destroy
();
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "Mockstanky.h"
int
GlobalExpectCount
;
int
GlobalVerifyOrder
;
char
*
GlobalOrderError
;
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
GlobalExpectCount
=
0
;
GlobalVerifyOrder
=
0
;
GlobalOrderError
=
NULL
;
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CEXCEPTION_T e; \
Try { \
CMock_Init(); \
setUp(); \
TestFunc(); \
CMock_Verify(); \
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
} \
CMock_Destroy(); \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "funky.h"
#include <setjmp.h>
#include "Mockstanky.h"
int
GlobalExpectCount
;
int
GlobalVerifyOrder
;
char
*
GlobalOrderError
;
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
GlobalExpectCount
=
0
;
GlobalVerifyOrder
=
0
;
GlobalOrderError
=
NULL
;
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_mock_new2.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CMock_Init
();
\
setUp
();
\
TestFunc
();
\
CMock_Verify
();
\
}
\
CMock_Destroy
();
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_custom_setup
();
}
//=======Suite Teardown=====
static
int
suite_teardown
(
int
num_failures
)
{
a_custom_teardown
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
suite_teardown
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CMock_Init(); \
setUp(); \
TestFunc(); \
CMock_Verify(); \
} \
CMock_Destroy(); \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "funky.h"
#include <setjmp.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_custom_setup
();
}
//=======Suite Teardown=====
static
int
suite_teardown
(
int
num_failures
)
{
a_custom_teardown
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
suite_teardown
(
UnityEnd
());
}
test/expectdata/testsample_mock_param.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST_NO_ARGS
#define RUN_TEST(TestFunc, TestLineNum, ...) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
"("
#
__VA_ARGS__
")"
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CMock_Init
();
\
setUp
();
\
TestFunc
(
__VA_ARGS__
);
\
CMock_Verify
();
\
}
\
CMock_Destroy
();
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
,
RUN_TEST_NO_ARGS
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
,
RUN_TEST_NO_ARGS
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST_NO_ARGS
#define RUN_TEST(TestFunc, TestLineNum, ...) \
{ \
Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CMock_Init(); \
setUp(); \
TestFunc(__VA_ARGS__); \
CMock_Verify(); \
} \
CMock_Destroy(); \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "funky.h"
#include <setjmp.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
,
RUN_TEST_NO_ARGS
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
,
RUN_TEST_NO_ARGS
);
return
(
UnityEnd
());
}
test/expectdata/testsample_mock_run1.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CEXCEPTION_T
e
;
\
Try
{
\
CMock_Init
();
\
setUp
();
\
TestFunc
();
\
CMock_Verify
();
\
}
Catch
(
e
)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE
(
CEXCEPTION_NONE
,
e
,
"Unhandled Exception!"
);
}
\
}
\
CMock_Destroy
();
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "Mockstanky.h"
int
GlobalExpectCount
;
int
GlobalVerifyOrder
;
char
*
GlobalOrderError
;
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
GlobalExpectCount
=
0
;
GlobalVerifyOrder
=
0
;
GlobalOrderError
=
NULL
;
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CEXCEPTION_T e; \
Try { \
CMock_Init(); \
setUp(); \
TestFunc(); \
CMock_Verify(); \
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
} \
CMock_Destroy(); \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "funky.h"
#include <setjmp.h>
#include "Mockstanky.h"
int
GlobalExpectCount
;
int
GlobalVerifyOrder
;
char
*
GlobalOrderError
;
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
GlobalExpectCount
=
0
;
GlobalVerifyOrder
=
0
;
GlobalOrderError
=
NULL
;
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_mock_run2.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CMock_Init
();
\
setUp
();
\
TestFunc
();
\
CMock_Verify
();
\
}
\
CMock_Destroy
();
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_custom_setup
();
}
//=======Suite Teardown=====
static
int
suite_teardown
(
int
num_failures
)
{
a_custom_teardown
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
suite_teardown
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CMock_Init(); \
setUp(); \
TestFunc(); \
CMock_Verify(); \
} \
CMock_Destroy(); \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include <setjmp.h>
#include <stdio.h>
#include "funky.h"
#include <setjmp.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_custom_setup
();
}
//=======Suite Teardown=====
static
int
suite_teardown
(
int
num_failures
)
{
a_custom_teardown
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
suite_teardown
(
UnityEnd
());
}
test/expectdata/testsample_mock_yaml.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CEXCEPTION_T
e
;
\
Try
{
\
CMock_Init
();
\
setUp
();
\
TestFunc
();
\
CMock_Verify
();
\
}
Catch
(
e
)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE
(
CEXCEPTION_NONE
,
e
,
"Unhandled Exception!"
);
}
\
}
\
CMock_Destroy
();
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include "two.h"
#include "three.h"
#include <four.h>
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_yaml_setup
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CEXCEPTION_T e; \
Try { \
CMock_Init(); \
setUp(); \
TestFunc(); \
CMock_Verify(); \
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
} \
CMock_Destroy(); \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "cmock.h"
#include "two.h"
#include "three.h"
#include <four.h>
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "funky.h"
#include <setjmp.h>
#include "Mockstanky.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Mock Management=====
static
void
CMock_Init
(
void
)
{
Mockstanky_Init
();
}
static
void
CMock_Verify
(
void
)
{
Mockstanky_Verify
();
}
static
void
CMock_Destroy
(
void
)
{
Mockstanky_Destroy
();
}
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_yaml_setup
();
}
//=======Test Reset Option=====
void
resetTest
()
{
CMock_Verify
();
CMock_Destroy
();
tearDown
();
CMock_Init
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/mocksample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_new1.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CEXCEPTION_T
e
;
\
Try
{
\
setUp
();
\
TestFunc
();
\
}
Catch
(
e
)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE
(
CEXCEPTION_NONE
,
e
,
"Unhandled Exception!"
);
}
\
}
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
int
GlobalExpectCount
;
int
GlobalVerifyOrder
;
char
*
GlobalOrderError
;
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CEXCEPTION_T e; \
Try { \
setUp(); \
TestFunc(); \
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
} \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "funky.h"
#include "stanky.h"
#include <setjmp.h>
int
GlobalExpectCount
;
int
GlobalVerifyOrder
;
char
*
GlobalOrderError
;
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_new2.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
setUp
();
\
TestFunc
();
\
}
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_custom_setup
();
}
//=======Suite Teardown=====
static
int
suite_teardown
(
int
num_failures
)
{
a_custom_teardown
();
}
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
suite_teardown
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
setUp(); \
TestFunc(); \
} \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
#include "funky.h"
#include "stanky.h"
#include <setjmp.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_custom_setup
();
}
//=======Suite Teardown=====
static
int
suite_teardown
(
int
num_failures
)
{
a_custom_teardown
();
}
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
suite_teardown
(
UnityEnd
());
}
test/expectdata/testsample_param.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST_NO_ARGS
#define RUN_TEST(TestFunc, TestLineNum, ...) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
"("
#
__VA_ARGS__
")"
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
setUp
();
\
TestFunc
(
__VA_ARGS__
);
\
}
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
,
RUN_TEST_NO_ARGS
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
,
RUN_TEST_NO_ARGS
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST_NO_ARGS
#define RUN_TEST(TestFunc, TestLineNum, ...) \
{ \
Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
setUp(); \
TestFunc(__VA_ARGS__); \
} \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
#include "funky.h"
#include "stanky.h"
#include <setjmp.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
,
RUN_TEST_NO_ARGS
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
,
RUN_TEST_NO_ARGS
);
return
(
UnityEnd
());
}
test/expectdata/testsample_run1.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CEXCEPTION_T
e
;
\
Try
{
\
setUp
();
\
TestFunc
();
\
}
Catch
(
e
)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE
(
CEXCEPTION_NONE
,
e
,
"Unhandled Exception!"
);
}
\
}
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
int
GlobalExpectCount
;
int
GlobalVerifyOrder
;
char
*
GlobalOrderError
;
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CEXCEPTION_T e; \
Try { \
setUp(); \
TestFunc(); \
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
} \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "one.h"
#include "two.h"
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "funky.h"
#include "stanky.h"
#include <setjmp.h>
int
GlobalExpectCount
;
int
GlobalVerifyOrder
;
char
*
GlobalOrderError
;
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
test/expectdata/testsample_run2.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
setUp
();
\
TestFunc
();
\
}
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_custom_setup
();
}
//=======Suite Teardown=====
static
int
suite_teardown
(
int
num_failures
)
{
a_custom_teardown
();
}
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
suite_teardown
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
setUp(); \
TestFunc(); \
} \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include <setjmp.h>
#include <stdio.h>
#include "funky.h"
#include "stanky.h"
#include <setjmp.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_custom_setup
();
}
//=======Suite Teardown=====
static
int
suite_teardown
(
int
num_failures
)
{
a_custom_teardown
();
}
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
suite_teardown
(
UnityEnd
());
}
test/expectdata/testsample_yaml.c
浏览文件 @
72c55e02
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{
\
Unity
.
CurrentTestName
=
#
TestFunc
;
\
Unity
.
CurrentTestLineNumber
=
TestLineNum
;
\
Unity
.
NumberOfTests
++
;
\
if
(
TEST_PROTECT
())
\
{
\
CEXCEPTION_T
e
;
\
Try
{
\
setUp
();
\
TestFunc
();
\
}
Catch
(
e
)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE
(
CEXCEPTION_NONE
,
e
,
"Unhandled Exception!"
);
}
\
}
\
if
(
TEST_PROTECT
()
&&
!
TEST_IS_IGNORED
)
\
{
\
tearDown
();
\
}
\
UnityConcludeTest
();
\
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "two.h"
#include "three.h"
#include <four.h>
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_yaml_setup
();
}
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
/* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below=====
#define RUN_TEST(TestFunc, TestLineNum) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
{ \
CEXCEPTION_T e; \
Try { \
setUp(); \
TestFunc(); \
} Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \
} \
if (TEST_PROTECT() && !TEST_IS_IGNORED) \
{ \
tearDown(); \
} \
UnityConcludeTest(); \
}
//=======Automagically Detected Files To Include=====
#include "unity.h"
#include "two.h"
#include "three.h"
#include <four.h>
#include <setjmp.h>
#include <stdio.h>
#include "CException.h"
#include "funky.h"
#include "stanky.h"
#include <setjmp.h>
//=======External Functions This Runner Calls=====
extern
void
setUp
(
void
);
extern
void
tearDown
(
void
);
extern
void
test_TheFirstThingToTest
(
void
);
extern
void
test_TheSecondThingToTest
(
void
);
//=======Suite Setup=====
static
int
suite_setup
(
void
)
{
a_yaml_setup
();
}
//=======Test Reset Option=====
void
resetTest
()
{
tearDown
();
setUp
();
}
//=======MAIN=====
int
main
(
void
)
{
suite_setup
();
Unity
.
TestFile
=
"test/testdata/testsample.c"
;
UnityBegin
();
RUN_TEST
(
test_TheFirstThingToTest
,
21
);
RUN_TEST
(
test_TheSecondThingToTest
,
43
);
return
(
UnityEnd
());
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录