Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
7514b89f
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看板
未验证
提交
7514b89f
编写于
7月 09, 2019
作者:
M
Mark VanderVoord
提交者:
GitHub
7月 09, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #431 from arcadien/AVR_OPTIMISATION
optimisation(AVR): Store static string in AVR EEPROM
上级
1100c5d8
3ac73efe
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
44 addition
and
38 deletion
+44
-38
src/unity.c
src/unity.c
+44
-38
未找到文件。
src/unity.c
浏览文件 @
7514b89f
...
...
@@ -7,6 +7,12 @@
#include "unity.h"
#include <stddef.h>
#ifdef AVR
#include <avr/pgmspace.h>
#else
#define PROGMEM
#endif
/* If omitted from header, declare overrideable prototypes here so they're ready for use */
#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
void
UNITY_OUTPUT_CHAR
(
int
);
...
...
@@ -20,48 +26,48 @@ void UNITY_OUTPUT_CHAR(int);
struct
UNITY_STORAGE_T
Unity
;
#ifdef UNITY_OUTPUT_COLOR
const
char
UnityStrOk
[]
=
"
\033
[42mOK
\033
[00m"
;
const
char
UnityStrPass
[]
=
"
\033
[42mPASS
\033
[00m"
;
const
char
UnityStrFail
[]
=
"
\033
[41mFAIL
\033
[00m"
;
const
char
UnityStrIgnore
[]
=
"
\033
[43mIGNORE
\033
[00m"
;
const
char
PROGMEM
UnityStrOk
[]
=
"
\033
[42mOK
\033
[00m"
;
const
char
PROGMEM
UnityStrPass
[]
=
"
\033
[42mPASS
\033
[00m"
;
const
char
PROGMEM
UnityStrFail
[]
=
"
\033
[41mFAIL
\033
[00m"
;
const
char
PROGMEM
UnityStrIgnore
[]
=
"
\033
[43mIGNORE
\033
[00m"
;
#else
const
char
UnityStrOk
[]
=
"OK"
;
const
char
UnityStrPass
[]
=
"PASS"
;
const
char
UnityStrFail
[]
=
"FAIL"
;
const
char
UnityStrIgnore
[]
=
"IGNORE"
;
const
char
PROGMEM
UnityStrOk
[]
=
"OK"
;
const
char
PROGMEM
UnityStrPass
[]
=
"PASS"
;
const
char
PROGMEM
UnityStrFail
[]
=
"FAIL"
;
const
char
PROGMEM
UnityStrIgnore
[]
=
"IGNORE"
;
#endif
static
const
char
UnityStrNull
[]
=
"NULL"
;
static
const
char
UnityStrSpacer
[]
=
". "
;
static
const
char
UnityStrExpected
[]
=
" Expected "
;
static
const
char
UnityStrWas
[]
=
" Was "
;
static
const
char
UnityStrGt
[]
=
" to be greater than "
;
static
const
char
UnityStrLt
[]
=
" to be less than "
;
static
const
char
UnityStrOrEqual
[]
=
"or equal to "
;
static
const
char
UnityStrElement
[]
=
" Element "
;
static
const
char
UnityStrByte
[]
=
" Byte "
;
static
const
char
UnityStrMemory
[]
=
" Memory Mismatch."
;
static
const
char
UnityStrDelta
[]
=
" Values Not Within Delta "
;
static
const
char
UnityStrPointless
[]
=
" You Asked Me To Compare Nothing, Which Was Pointless."
;
static
const
char
UnityStrNullPointerForExpected
[]
=
" Expected pointer to be NULL"
;
static
const
char
UnityStrNullPointerForActual
[]
=
" Actual pointer was NULL"
;
static
const
char
PROGMEM
UnityStrNull
[]
=
"NULL"
;
static
const
char
PROGMEM
UnityStrSpacer
[]
=
". "
;
static
const
char
PROGMEM
UnityStrExpected
[]
=
" Expected "
;
static
const
char
PROGMEM
UnityStrWas
[]
=
" Was "
;
static
const
char
PROGMEM
UnityStrGt
[]
=
" to be greater than "
;
static
const
char
PROGMEM
UnityStrLt
[]
=
" to be less than "
;
static
const
char
PROGMEM
UnityStrOrEqual
[]
=
"or equal to "
;
static
const
char
PROGMEM
UnityStrElement
[]
=
" Element "
;
static
const
char
PROGMEM
UnityStrByte
[]
=
" Byte "
;
static
const
char
PROGMEM
UnityStrMemory
[]
=
" Memory Mismatch."
;
static
const
char
PROGMEM
UnityStrDelta
[]
=
" Values Not Within Delta "
;
static
const
char
PROGMEM
UnityStrPointless
[]
=
" You Asked Me To Compare Nothing, Which Was Pointless."
;
static
const
char
PROGMEM
UnityStrNullPointerForExpected
[]
=
" Expected pointer to be NULL"
;
static
const
char
PROGMEM
UnityStrNullPointerForActual
[]
=
" Actual pointer was NULL"
;
#ifndef UNITY_EXCLUDE_FLOAT
static
const
char
UnityStrNot
[]
=
"Not "
;
static
const
char
UnityStrInf
[]
=
"Infinity"
;
static
const
char
UnityStrNegInf
[]
=
"Negative Infinity"
;
static
const
char
UnityStrNaN
[]
=
"NaN"
;
static
const
char
UnityStrDet
[]
=
"Determinate"
;
static
const
char
UnityStrInvalidFloatTrait
[]
=
"Invalid Float Trait"
;
static
const
char
PROGMEM
UnityStrNot
[]
=
"Not "
;
static
const
char
PROGMEM
UnityStrInf
[]
=
"Infinity"
;
static
const
char
PROGMEM
UnityStrNegInf
[]
=
"Negative Infinity"
;
static
const
char
PROGMEM
UnityStrNaN
[]
=
"NaN"
;
static
const
char
PROGMEM
UnityStrDet
[]
=
"Determinate"
;
static
const
char
PROGMEM
UnityStrInvalidFloatTrait
[]
=
"Invalid Float Trait"
;
#endif
const
char
UnityStrErrShorthand
[]
=
"Unity Shorthand Support Disabled"
;
const
char
UnityStrErrFloat
[]
=
"Unity Floating Point Disabled"
;
const
char
UnityStrErrDouble
[]
=
"Unity Double Precision Disabled"
;
const
char
UnityStrErr64
[]
=
"Unity 64-bit Support Disabled"
;
static
const
char
UnityStrBreaker
[]
=
"-----------------------"
;
static
const
char
UnityStrResultsTests
[]
=
" Tests "
;
static
const
char
UnityStrResultsFailures
[]
=
" Failures "
;
static
const
char
UnityStrResultsIgnored
[]
=
" Ignored "
;
static
const
char
UnityStrDetail1Name
[]
=
UNITY_DETAIL1_NAME
" "
;
static
const
char
UnityStrDetail2Name
[]
=
" "
UNITY_DETAIL2_NAME
" "
;
const
char
PROGMEM
UnityStrErrShorthand
[]
=
"Unity Shorthand Support Disabled"
;
const
char
PROGMEM
UnityStrErrFloat
[]
=
"Unity Floating Point Disabled"
;
const
char
PROGMEM
UnityStrErrDouble
[]
=
"Unity Double Precision Disabled"
;
const
char
PROGMEM
UnityStrErr64
[]
=
"Unity 64-bit Support Disabled"
;
static
const
char
PROGMEM
UnityStrBreaker
[]
=
"-----------------------"
;
static
const
char
PROGMEM
UnityStrResultsTests
[]
=
" Tests "
;
static
const
char
PROGMEM
UnityStrResultsFailures
[]
=
" Failures "
;
static
const
char
PROGMEM
UnityStrResultsIgnored
[]
=
" Ignored "
;
static
const
char
PROGMEM
UnityStrDetail1Name
[]
=
UNITY_DETAIL1_NAME
" "
;
static
const
char
PROGMEM
UnityStrDetail2Name
[]
=
" "
UNITY_DETAIL2_NAME
" "
;
/*-----------------------------------------------
* Pretty Printers & Test Result Output Handlers
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录