Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
2cbf5bf3
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
“6ad78a5c75c5bcfdac4551f7d09b777b3dc3c19c”上不存在“arch/mips/kvm/tlb.c”
提交
2cbf5bf3
编写于
12月 27, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[iter] Test OT::Coverage iter
上级
fd75d29f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
5 deletion
+16
-5
src/hb-dsalgs.hh
src/hb-dsalgs.hh
+5
-1
src/hb-ot-layout-common.hh
src/hb-ot-layout-common.hh
+3
-3
src/test-iter.cc
src/test-iter.cc
+8
-1
未找到文件。
src/hb-dsalgs.hh
浏览文件 @
2cbf5bf3
...
@@ -42,8 +42,12 @@ struct hb_void_t { typedef void value; };
...
@@ -42,8 +42,12 @@ struct hb_void_t { typedef void value; };
template
<
typename
T1
,
typename
T2
>
template
<
typename
T1
,
typename
T2
>
struct
hb_pair_t
struct
hb_pair_t
{
{
typedef
hb_pair_t
<
T1
,
T2
>
pair_t
;
hb_pair_t
(
const
T1
&
a
,
const
T2
&
b
)
:
first
(
a
),
second
(
b
)
{}
hb_pair_t
(
const
T1
&
a
,
const
T2
&
b
)
:
first
(
a
),
second
(
b
)
{}
hb_pair_t
(
const
hb_pair_t
<
T1
,
T2
>&
o
)
:
hb_pair_t
(
o
.
first
,
o
.
second
)
{}
hb_pair_t
(
const
pair_t
&
o
)
:
hb_pair_t
(
o
.
first
,
o
.
second
)
{}
bool
operator
==
(
const
pair_t
&
o
)
const
{
return
first
==
o
.
first
&&
second
==
o
.
second
;
}
T1
first
;
T1
first
;
T2
second
;
T2
second
;
...
...
src/hb-ot-layout-common.hh
浏览文件 @
2cbf5bf3
...
@@ -1108,7 +1108,7 @@ struct Coverage
...
@@ -1108,7 +1108,7 @@ struct Coverage
hb_sorted_iter_t
<
Iter
,
const
hb_pair_t
<
unsigned
,
hb_codepoint_t
>
>
,
hb_sorted_iter_t
<
Iter
,
const
hb_pair_t
<
unsigned
,
hb_codepoint_t
>
>
,
hb_iter_mixin_t
<
Iter
,
const
hb_pair_t
<
unsigned
,
hb_codepoint_t
>
>
hb_iter_mixin_t
<
Iter
,
const
hb_pair_t
<
unsigned
,
hb_codepoint_t
>
>
{
{
Iter
(
const
Coverage
&
c_
)
Iter
(
const
Coverage
&
c_
=
Null
(
Coverage
)
)
{
{
memset
(
this
,
0
,
sizeof
(
*
this
));
memset
(
this
,
0
,
sizeof
(
*
this
));
format
=
c_
.
u
.
format
;
format
=
c_
.
u
.
format
;
...
@@ -1137,7 +1137,7 @@ struct Coverage
...
@@ -1137,7 +1137,7 @@ struct Coverage
default:
break
;
default:
break
;
}
}
}
}
typedef
hb_pair_t
<
unsigned
,
hb_codepoint_t
>
__item_type__
;
typedef
const
hb_pair_t
<
unsigned
,
hb_codepoint_t
>
__item_type__
;
__item_type__
__item__
()
const
{
return
hb_pair
(
get_coverage
(),
get_glyph
());
}
__item_type__
__item__
()
const
{
return
hb_pair
(
get_coverage
(),
get_glyph
());
}
hb_codepoint_t
get_glyph
()
const
hb_codepoint_t
get_glyph
()
const
...
@@ -1155,7 +1155,7 @@ struct Coverage
...
@@ -1155,7 +1155,7 @@ struct Coverage
{
{
case
1
:
return
u
.
format1
.
get_coverage
();
case
1
:
return
u
.
format1
.
get_coverage
();
case
2
:
return
u
.
format2
.
get_coverage
();
case
2
:
return
u
.
format2
.
get_coverage
();
default:
return
-
1
;
default:
return
NOT_COVERED
;
}
}
}
}
...
...
src/test-iter.cc
浏览文件 @
2cbf5bf3
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "hb-array.hh"
#include "hb-array.hh"
#include "hb-set.hh"
#include "hb-set.hh"
#include "hb-ot-layout-common.hh"
template
<
typename
T
>
template
<
typename
T
>
...
@@ -81,7 +82,7 @@ test_iterator (Iterator it)
...
@@ -81,7 +82,7 @@ test_iterator (Iterator it)
}
}
template
<
typename
Iterable
>
static
void
template
<
typename
Iterable
>
static
void
test_iterable
(
Iterable
&
lst
=
Null
(
Iterable
))
test_iterable
(
const
Iterable
&
lst
=
Null
(
Iterable
))
{
{
// Test that can take iterator from.
// Test that can take iterator from.
test_iterator
(
lst
.
iter
());
test_iterator
(
lst
.
iter
());
...
@@ -112,5 +113,11 @@ main (int argc, char **argv)
...
@@ -112,5 +113,11 @@ main (int argc, char **argv)
hb_sorted_array_t
<
int
>
sa
;
hb_sorted_array_t
<
int
>
sa
;
test_iterable
(
sa
);
test_iterable
(
sa
);
test_iterable
<
hb_array_t
<
int
>
>
();
test_iterable
<
hb_sorted_array_t
<
const
int
>
>
();
test_iterable
<
hb_vector_t
<
float
>
>
();
test_iterable
<
hb_set_t
>
();
test_iterable
<
OT
::
Coverage
>
();
return
0
;
return
0
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录