Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
4ffafce3
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看板
提交
4ffafce3
编写于
3月 26, 2017
作者:
M
Mark VanderVoord
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Finish updating documentation to match
上级
083564b8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
8 deletion
+17
-8
README.md
README.md
+17
-8
未找到文件。
README.md
浏览文件 @
4ffafce3
...
...
@@ -2,7 +2,7 @@ Unity Test API
==============
[
![Unity Build Status
](
https://api.travis-ci.org/ThrowTheSwitch/Unity.png?branch=master
)
](https://travis-ci.org/ThrowTheSwitch/Unity)
__Copyright (c) 2007 - 201
4
Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
__Copyright (c) 2007 - 201
7
Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
Running Tests
-------------
...
...
@@ -109,6 +109,18 @@ Compares two integers for equality and display errors as hexadecimal. Like the
you can specify the size... here the size will also effect how many nibbles are shown (for example,
`HEX16`
will show 4 nibbles).
TEST_ASSERT_EQUAL(expected, actual)
Another way of calling TEST_ASSERT_EQUAL_INT
TEST_ASSERT_INT_WITHIN(delta, expected, actual)
Asserts that the actual value is within plus or minus delta of the expected value. This also comes in
size specific variants.
Arrays
------
_ARRAY
You can append
`_ARRAY`
to any of these macros to make an array comparison of that type. Here you will
...
...
@@ -117,15 +129,12 @@ additional argument which is the number of elements to compare. For example:
TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, elements)
TEST_ASSERT_EQUAL(expected, actual)
Another way of calling TEST_ASSERT_EQUAL_INT
TEST_ASSERT_INT_WITHIN(delta, expected, actual)
_EACH_EQUAL
A
sserts that the actual value is within plus or minus delta of the expected value. This also comes in
size specific variants.
A
nother array comparison option is to check that EVERY element of an array is equal to a single expected
value. You do this by specifying the EACH_EQUAL macro. For example:
TEST_ASSERT_EACH_EQUAL_INT32(expected, actual, elements)
Numerical Assertions: Bitwise
-----------------------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录