Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
c8609551
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
11 个月 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c8609551
编写于
12月 06, 2017
作者:
K
Khaled Hosny
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add API tests to cmake build
上级
f19126dd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
49 addition
and
0 deletion
+49
-0
CMakeLists.txt
CMakeLists.txt
+5
-0
test/CMakeLists.txt
test/CMakeLists.txt
+1
-0
test/api/CMakeLists.txt
test/api/CMakeLists.txt
+39
-0
test/api/hb-test.h
test/api/hb-test.h
+2
-0
test/api/test-c.c
test/api/test-c.c
+2
-0
未找到文件。
CMakeLists.txt
浏览文件 @
c8609551
cmake_minimum_required
(
VERSION 2.8.0
)
cmake_minimum_required
(
VERSION 2.8.0
)
project
(
harfbuzz
)
project
(
harfbuzz
)
enable_testing
()
## Limit framework build to Xcode generator
## Limit framework build to Xcode generator
if
(
BUILD_FRAMEWORK
)
if
(
BUILD_FRAMEWORK
)
...
@@ -683,3 +684,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
...
@@ -683,3 +684,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
# Needs to come last so that variables defined above are passed to
# subdirectories.
add_subdirectory
(
test
)
test/CMakeLists.txt
0 → 100644
浏览文件 @
c8609551
add_subdirectory
(
api
)
test/api/CMakeLists.txt
0 → 100644
浏览文件 @
c8609551
macro
(
_add_tests
)
foreach
(
test_name
${
ARGV
}
)
if
(
EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
test_name
}
.c
)
add_executable
(
${
test_name
}
${
test_name
}
.c
)
elseif
(
EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
test_name
}
.cc
)
add_executable
(
${
test_name
}
${
test_name
}
.cc
)
else
()
message
(
FATAL_ERROR
"No source file found for test
${
test_name
}
"
)
endif
()
target_link_libraries
(
${
test_name
}
harfbuzz
)
add_test
(
${
test_name
}
${
test_name
}
)
endforeach
()
set_tests_properties
(
${
ARGV
}
PROPERTIES ENVIRONMENT
"G_TEST_SRCDIR=
${
CMAKE_CURRENT_SOURCE_DIR
}
;G_TEST_BUILDDIR=
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
endmacro
()
if
(
HB_HAVE_GLIB
)
_add_tests
(
test-blob
test-buffer
test-common
test-font
test-object
test-set
test-shape
test-unicode
test-version
test-ot-tag
test-c
test-cplusplus
)
if
(
HB_HAVE_FREETYPE
)
_add_tests
(
test-ot-math
)
endif
(
HB_HAVE_FREETYPE
)
endif
(
HB_HAVE_GLIB
)
test/api/hb-test.h
浏览文件 @
c8609551
...
@@ -27,7 +27,9 @@
...
@@ -27,7 +27,9 @@
#ifndef HB_TEST_H
#ifndef HB_TEST_H
#define HB_TEST_H
#define HB_TEST_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <config.h>
#endif
#include <hb-glib.h>
#include <hb-glib.h>
...
...
test/api/test-c.c
浏览文件 @
c8609551
...
@@ -27,7 +27,9 @@
...
@@ -27,7 +27,9 @@
/* This file tests that all headers can be included from .c files */
/* This file tests that all headers can be included from .c files */
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <config.h>
#endif
#include <hb.h>
#include <hb.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录