projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfa02be
)
[iter][test] Add another test for hb_reduce
author
Ebrahim Byagowi
<ebrahim@gnu.org>
Tue, 2 Apr 2019 15:55:06 +0000
(20:25 +0430)
committer
GitHub
<noreply@github.com>
Tue, 2 Apr 2019 15:55:06 +0000
(20:25 +0430)
Different initial and accumulator types
src/test-iter.cc
patch
|
blob
|
history
diff --git
a/src/test-iter.cc
b/src/test-iter.cc
index
071edab
..
d258c11
100644
(file)
--- a/
src/test-iter.cc
+++ b/
src/test-iter.cc
@@
-181,6
+181,12
@@
main (int argc, char **argv)
;
// The result should be something like 0->10, 1->11, ..., 9->19
assert (hb_map_get (result, 9) == 19);
+
+ unsigned int temp3 = 0;
+ + hb_iter(src)
+ | hb_map([&] (int i) -> int { return ++temp3; })
+ | hb_reduce([&] (float acc, int value) -> float { return acc + value + .05; }, 0)
+ ;
hb_map_destroy (result);
+ hb_iter (src)