diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-02-13 03:14:24 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2022-02-13 03:14:24 +0000 |
commit | 79f4b0928427923054f6422f929ecc324e4b0eba (patch) | |
tree | 75c9e3ca828e7aa7e229ed1b1fc72b91e2a1ab3a /Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc | |
parent | 8fde8b9da09dcf6e3612d8086abce27bba8ae94d (diff) |
harfbuzz 3.4.0
git-svn-id: svn://tug.org/texlive/trunk@61999 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc index 8c167b1da19..fd2b2f0e642 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc @@ -25,7 +25,9 @@ #include "hb.hh" #include "hb-map.hh" +#include <string> +static const std::string invalid{"invalid"}; int main (int argc, char **argv) @@ -76,6 +78,14 @@ main (int argc, char **argv) assert (v.get_population () == 2); } + /* Test call fini() twice. */ + { + hb_map_t s; + for (int i = 0; i < 16; i++) + s.set(i, i+1); + s.fini(); + } + /* Test initializing from iterator. */ { hb_map_t s; @@ -108,5 +118,22 @@ main (int argc, char **argv) assert (m3.get_population () == 0); } + { + hb_hashmap_t<int, int, int, int, 0, 0> m0; + hb_hashmap_t<std::string, int, const std::string*, int, &invalid, 0> m1; + hb_hashmap_t<int, std::string, int, const std::string*, 0, &invalid> m2; + hb_hashmap_t<std::string, std::string, const std::string*, const std::string*, &invalid, &invalid> m3; + + std::string s; + for (unsigned i = 1; i < 1000; i++) + { + s += "x"; + m0.set (i, i); + m1.set (s, i); + m2.set (i, s); + m3.set (s, s); + } + } + return 0; } |