mirror of
https://github.com/zlgopen/awtk.git
synced 2025-05-08 19:44:45 +08:00
add ASSERT_STREQ_UNIX
This commit is contained in:
parent
40fe964b5b
commit
9551a9c261
25
3rd/gtest/googletest/include/gtest/gtest_helper.h
Normal file
25
3rd/gtest/googletest/include/gtest/gtest_helper.h
Normal file
@ -0,0 +1,25 @@
|
||||
#include "tkc/str.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#ifndef GTEST_HELPER_H
|
||||
#define GTEST_HELPER_H
|
||||
|
||||
static inline void ASSERT_STREQ_UNIX(const char* str1, const char* str2) {
|
||||
str_t s1;
|
||||
str_t s2;
|
||||
str_init(&s1, 0);
|
||||
str_init(&s2, 0);
|
||||
str_set(&s1, str1);
|
||||
str_replace(&s1, "\r\n", "\n");
|
||||
str_replace(&s1, "\r", "\n");
|
||||
str_set(&s2, str2);
|
||||
str_replace(&s2, "\r\n", "\n");
|
||||
str_replace(&s2, "\r", "\n");
|
||||
|
||||
ASSERT_STREQ(s1.str, s2.str);
|
||||
|
||||
str_reset(&s1);
|
||||
str_reset(&s2);
|
||||
}
|
||||
|
||||
#endif/*GTEST_HELPER_H*/
|
@ -1,5 +1,8 @@
|
||||
# 最新动态
|
||||
|
||||
2023/03/03
|
||||
* 增加ASSERT\_STREQ\_UNIX(gtest\_helper.h)用于在单元测试中跨平台比较从文件中读取的字符串。
|
||||
|
||||
2023/03/02
|
||||
* 增加api doc错误检查工具(感谢俊圣提供补丁)
|
||||
* 完善 previewi\_ui 工具(感谢培煌/朝泽提供补丁)
|
||||
|
@ -7,6 +7,7 @@ cp -fv ../tkc/tools/idl_gen/* tools/idl_gen/.
|
||||
rm -f tools/dll_def_gen/package-lock.json
|
||||
cp -rvf ../tkc/awtk_config_common.py .
|
||||
cp -rf ../tkc/tests/fscripts/* tests/fscripts
|
||||
cp -f ../tkc/3rd/gtest/googletest/include/gtest/gtest_helper.h 3rd/gtest/googletest/include/gtest/gtest_helper.h
|
||||
|
||||
for f in tkc.h compressors platforms conf_io hal streams ubjson charset csv misc tkc xml debugger
|
||||
do
|
||||
|
Loading…
x
Reference in New Issue
Block a user