Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
0dddf498
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看板
提交
0dddf498
编写于
3月 21, 2017
作者:
M
Mark VanderVoord
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
also update strings to support each element of an array.
上级
a11a1375
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
92 addition
and
15 deletion
+92
-15
src/unity.c
src/unity.c
+30
-9
src/unity.h
src/unity.h
+2
-2
src/unity_internals.h
src/unity_internals.h
+5
-4
test/tests/testunity.c
test/tests/testunity.c
+55
-0
未找到文件。
src/unity.c
浏览文件 @
0dddf498
...
@@ -1016,13 +1016,17 @@ void UnityAssertEqualStringLen(const char* expected,
...
@@ -1016,13 +1016,17 @@ void UnityAssertEqualStringLen(const char* expected,
}
}
/*-----------------------------------------------*/
/*-----------------------------------------------*/
void
UnityAssertEqualStringArray
(
const
char
**
expected
,
void
UnityAssertEqualStringArray
(
UNITY_INTERNAL_PTR
expected
,
const
char
**
actual
,
const
char
**
actual
,
const
UNITY_UINT32
num_elements
,
const
UNITY_UINT32
num_elements
,
const
char
*
msg
,
const
char
*
msg
,
const
UNITY_LINE_TYPE
lineNumber
)
const
UNITY_LINE_TYPE
lineNumber
,
const
UNITY_FLAGS_T
flags
)
{
{
UNITY_UINT32
i
,
j
=
0
;
UNITY_UINT32
i
=
0
;
UNITY_UINT32
j
=
0
;
const
char
*
exp
;
const
char
*
act
;
RETURN_IF_FAIL_OR_IGNORE
;
RETURN_IF_FAIL_OR_IGNORE
;
...
@@ -1032,18 +1036,35 @@ void UnityAssertEqualStringArray(const char** expected,
...
@@ -1032,18 +1036,35 @@ void UnityAssertEqualStringArray(const char** expected,
UnityPrintPointlessAndBail
();
UnityPrintPointlessAndBail
();
}
}
if
(
expected
==
actual
)
return
;
/* Both are NULL or same pointer */
if
((
const
char
**
)
expected
==
actual
)
{
return
;
/* Both are NULL or same pointer */
}
if
(
UnityIsOneArrayNull
((
UNITY_INTERNAL_PTR
)
expected
,
(
UNITY_INTERNAL_PTR
)
actual
,
lineNumber
,
msg
))
if
(
UnityIsOneArrayNull
((
UNITY_INTERNAL_PTR
)
expected
,
(
UNITY_INTERNAL_PTR
)
actual
,
lineNumber
,
msg
))
{
UNITY_FAIL_AND_BAIL
;
UNITY_FAIL_AND_BAIL
;
}
if
(
flags
!=
UNITY_ARRAY_TO_ARRAY
)
{
exp
=
(
const
char
*
)
expected
;
}
do
do
{
{
act
=
actual
[
j
];
if
(
flags
==
UNITY_ARRAY_TO_ARRAY
)
{
exp
=
((
const
char
**
)
expected
)[
j
];
}
/* if both pointers not null compare the strings */
/* if both pointers not null compare the strings */
if
(
exp
ected
[
j
]
&&
actual
[
j
]
)
if
(
exp
&&
act
)
{
{
for
(
i
=
0
;
exp
ected
[
j
][
i
]
||
actual
[
j
]
[
i
];
i
++
)
for
(
i
=
0
;
exp
[
i
]
||
act
[
i
];
i
++
)
{
{
if
(
exp
ected
[
j
][
i
]
!=
actual
[
j
]
[
i
])
if
(
exp
[
i
]
!=
act
[
i
])
{
{
Unity
.
CurrentTestFailed
=
1
;
Unity
.
CurrentTestFailed
=
1
;
break
;
break
;
...
@@ -1052,7 +1073,7 @@ void UnityAssertEqualStringArray(const char** expected,
...
@@ -1052,7 +1073,7 @@ void UnityAssertEqualStringArray(const char** expected,
}
}
else
else
{
/* handle case of one pointers being null (if both null, test should pass) */
{
/* handle case of one pointers being null (if both null, test should pass) */
if
(
exp
ected
[
j
]
!=
actual
[
j
]
)
if
(
exp
!=
act
)
{
{
Unity
.
CurrentTestFailed
=
1
;
Unity
.
CurrentTestFailed
=
1
;
}
}
...
@@ -1066,7 +1087,7 @@ void UnityAssertEqualStringArray(const char** expected,
...
@@ -1066,7 +1087,7 @@ void UnityAssertEqualStringArray(const char** expected,
UnityPrint
(
UnityStrElement
);
UnityPrint
(
UnityStrElement
);
UnityPrintNumberUnsigned
(
j
);
UnityPrintNumberUnsigned
(
j
);
}
}
UnityPrintExpectedAndActualStrings
(
(
const
char
*
)(
expected
[
j
]),
(
const
char
*
)(
actual
[
j
])
);
UnityPrintExpectedAndActualStrings
(
exp
,
act
);
UnityAddMsgIfSpecified
(
msg
);
UnityAddMsgIfSpecified
(
msg
);
UNITY_FAIL_AND_BAIL
;
UNITY_FAIL_AND_BAIL
;
}
}
...
...
src/unity.h
浏览文件 @
0dddf498
...
@@ -174,7 +174,7 @@ void tearDown(void);
...
@@ -174,7 +174,7 @@ void tearDown(void);
#define TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), __LINE__, NULL)
//
#define TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), (num_elements), __LINE__, NULL)
/* Floating Point (If Enabled) */
/* Floating Point (If Enabled) */
...
@@ -301,7 +301,7 @@ void tearDown(void);
...
@@ -301,7 +301,7 @@ void tearDown(void);
#define TEST_ASSERT_EACH_EQUAL_HEX32_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EACH_EQUAL_HEX32_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EACH_EQUAL_HEX64_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EACH_EQUAL_HEX64_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EACH_EQUAL_PTR_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EACH_EQUAL_PTR_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), __LINE__, (message))
//
#define TEST_ASSERT_EACH_EQUAL_STRING_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EACH_EQUAL_STRING_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EACH_EQUAL_MEMORY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EACH_EQUAL_MEMORY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), (num_elements), __LINE__, (message))
/* Floating Point (If Enabled) */
/* Floating Point (If Enabled) */
...
...
src/unity_internals.h
浏览文件 @
0dddf498
...
@@ -480,11 +480,12 @@ void UnityAssertEqualStringLen(const char* expected,
...
@@ -480,11 +480,12 @@ void UnityAssertEqualStringLen(const char* expected,
const
char
*
msg
,
const
char
*
msg
,
const
UNITY_LINE_TYPE
lineNumber
);
const
UNITY_LINE_TYPE
lineNumber
);
void
UnityAssertEqualStringArray
(
const
char
**
expected
,
void
UnityAssertEqualStringArray
(
UNITY_INTERNAL_PTR
expected
,
const
char
**
actual
,
const
char
**
actual
,
const
UNITY_UINT32
num_elements
,
const
UNITY_UINT32
num_elements
,
const
char
*
msg
,
const
char
*
msg
,
const
UNITY_LINE_TYPE
lineNumber
);
const
UNITY_LINE_TYPE
lineNumber
,
const
UNITY_FLAGS_T
flags
);
void
UnityAssertEqualMemory
(
UNITY_INTERNAL_PTR
expected
,
void
UnityAssertEqualMemory
(
UNITY_INTERNAL_PTR
expected
,
UNITY_INTERNAL_PTR
actual
,
UNITY_INTERNAL_PTR
actual
,
...
@@ -680,7 +681,7 @@ int UnityTestMatches(void);
...
@@ -680,7 +681,7 @@ int UnityTestMatches(void);
#define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER, UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((
const char**)(expected), (const char**)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line)
)
#define UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((
UNITY_INTERNAL_PTR)(expected), (const char**)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY
)
#define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
#define UNITY_TEST_ASSERT_EACH_EQUAL_INT(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT) expected, sizeof(int)), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_INT(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT) expected, sizeof(int)), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_VAL)
...
@@ -695,7 +696,7 @@ int UnityTestMatches(void);
...
@@ -695,7 +696,7 @@ int UnityTestMatches(void);
#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX16(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT16 )expected, 2), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX16(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT16 )expected, 2), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT32 )expected, 4), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT32 )expected, 4), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT) expected, sizeof(int*)), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT) expected, sizeof(int*)), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER, UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((
const char**)(expected), (const char**)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line)
)
#define UNITY_TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((
UNITY_INTERNAL_PTR)(expected), (const char**)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL
)
#define UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
#define UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
#ifdef UNITY_SUPPORT_64
#ifdef UNITY_SUPPORT_64
...
...
test/tests/testunity.c
浏览文件 @
0dddf498
...
@@ -1519,6 +1519,61 @@ void testNotEqualStringArrayLengthZero(void)
...
@@ -1519,6 +1519,61 @@ void testNotEqualStringArrayLengthZero(void)
VERIFY_FAILS_END
VERIFY_FAILS_END
}
}
void
testEqualStringEachEqual
(
void
)
{
const
char
*
testStrings1
[]
=
{
"foo"
,
"foo"
,
"foo"
,
"foo"
};
const
char
*
testStrings2
[]
=
{
"boo"
,
"boo"
,
"boo"
,
"zoo"
};
const
char
*
testStrings3
[]
=
{
""
,
""
,
""
,
""
};
TEST_ASSERT_EACH_EQUAL_STRING
(
"foo"
,
testStrings1
,
4
);
TEST_ASSERT_EACH_EQUAL_STRING
(
"foo"
,
testStrings1
,
1
);
TEST_ASSERT_EACH_EQUAL_STRING
(
"boo"
,
testStrings2
,
3
);
TEST_ASSERT_EACH_EQUAL_STRING
(
""
,
testStrings3
,
4
);
}
void
testNotEqualStringEachEqual1
(
void
)
{
const
char
*
testStrings
[]
=
{
"foo"
,
"foo"
,
"foo"
,
"moo"
};
EXPECT_ABORT_BEGIN
TEST_ASSERT_EACH_EQUAL_STRING
(
"foo"
,
testStrings
,
4
);
VERIFY_FAILS_END
}
void
testNotEqualStringEachEqual2
(
void
)
{
const
char
*
testStrings
[]
=
{
"boo"
,
"foo"
,
"foo"
,
"foo"
};
EXPECT_ABORT_BEGIN
TEST_ASSERT_EACH_EQUAL_STRING
(
"foo"
,
testStrings
,
4
);
VERIFY_FAILS_END
}
void
testNotEqualStringEachEqual3
(
void
)
{
const
char
*
testStrings
[]
=
{
"foo"
,
"foo"
,
"foo"
,
NULL
};
EXPECT_ABORT_BEGIN
TEST_ASSERT_EACH_EQUAL_STRING
(
"foo"
,
testStrings
,
4
);
VERIFY_FAILS_END
}
void
testNotEqualStringEachEqual4
(
void
)
{
const
char
*
testStrings
[]
=
{
"foo"
,
"foo"
,
"woo"
,
"foo"
};
EXPECT_ABORT_BEGIN
TEST_ASSERT_EACH_EQUAL_STRING
(
"foo"
,
testStrings
,
4
);
VERIFY_FAILS_END
}
void
testNotEqualStringEachEqual5
(
void
)
{
EXPECT_ABORT_BEGIN
TEST_ASSERT_EACH_EQUAL_STRING
(
"foo"
,
NULL
,
1
);
VERIFY_FAILS_END
}
void
testEqualMemory
(
void
)
void
testEqualMemory
(
void
)
{
{
const
char
*
testString
=
"whatever"
;
const
char
*
testString
=
"whatever"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录