diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /third_party/rust/icu_collections | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/icu_collections')
83 files changed, 13477 insertions, 0 deletions
diff --git a/third_party/rust/icu_collections/.cargo-checksum.json b/third_party/rust/icu_collections/.cargo-checksum.json new file mode 100644 index 0000000000..8b344a1932 --- /dev/null +++ b/third_party/rust/icu_collections/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"Cargo.toml":"947169718ff0a09d69b480e6c70a0ee508813a6ccde3b47f44033357c85263bb","LICENSE":"853f87c96f3d249f200fec6db1114427bc8bdf4afddc93c576956d78152ce978","README.md":"8fa5b15a274493199cf8abb7b980ff0cd856ad5b13bf0990379a392d34cc234a","src/char16trie/LICENSE":"853f87c96f3d249f200fec6db1114427bc8bdf4afddc93c576956d78152ce978","src/char16trie/README.md":"50e02cdd03f0e654f9bdb8a368ad9c936e2e28c96007de854f4f2902c65cc241","src/char16trie/mod.rs":"1e1134c472a63b928c2c79064dea233d99a20513b72f84f6c860e3bd2d6d0eaa","src/char16trie/tests/test_util.rs":"096c73785008957af9c936520a16da7ae436b8d4e26dd8444fa7d392b2653c8e","src/char16trie/tests/testdata/empty.toml":"b900365b9c786f1b185307f5d8835a901d4860b9b097bce13aa0e592fcb384c4","src/char16trie/tests/testdata/months.toml":"439245fc4385fe693f283b7bc179bf5558dd8039a89987314dfc8c4a9e0092b2","src/char16trie/tests/testdata/test_a.toml":"34b179dd4e7eef73ce373b74e426ecfa05fb7aa2b0fc15e437bfcf3ea4242a9f","src/char16trie/tests/testdata/test_a_ab.toml":"b84452cb9c310203599d3cb8279a3f000c39ff8026728573152026f0d5e2c798","src/char16trie/tests/testdata/test_branches.toml":"d787ffc89c62a564b487f3c8fb94588258be0d891044e5b3a79c2ab876cd3e57","src/char16trie/tests/testdata/test_compact.toml":"30cb3e794d0989e3e087c12de3db077449d82ce6af57666290166d43bdcd27d3","src/char16trie/tests/testdata/test_long_branch.toml":"877d408f7d58063723befd01af6e3b0f01060a9ca1c5611ee1ea88d73383fa5a","src/char16trie/tests/testdata/test_long_sequence.toml":"f58645b3f14e47850e2a03733f7e47b69b193067f4cccf96124846b1ad49d970","src/char16trie/tests/testdata/test_shortest_branch.toml":"af356553506dbc28a2413b9f0ca1489050cd11a72e90ba4b5020bcb596862e64","src/char16trie/tests/trie_tests.rs":"553d4ed0d10b5a7f6f576f544c118941923a10d4e3dcd3e5c7f3f8c5e076dbec","src/char16trie/trie.rs":"71beef991e7a6e1ffee4ab0a1021fd9dddda3b29eea9a414191adb69e71dad89","src/codepointinvlist/LICENSE":"853f87c96f3d249f200fec6db1114427bc8bdf4afddc93c576956d78152ce978","src/codepointinvlist/README.md":"d346216cb53c01c3a2d6ca8f9016f9fe1bf5af2b8fbc3299a9f96040cb067da1","src/codepointinvlist/benches/inv_list.rs":"fec68e927ecea663cbdd94d20989375d6555eefde513515d7762c98e427aa668","src/codepointinvlist/builder.rs":"bee9d7fdd47cc6139677f7d18212ecaf0fe3c6cefe0d5c60ba1ea394709d04b5","src/codepointinvlist/conversions.rs":"54f1f19ded5fe57e8050cc647251b7cf081ae481e101306cdf2756ac0b721300","src/codepointinvlist/cpinvlist.rs":"676f7cacd508bd6c09cedb1ee0e38f32c30188d36f3a9f97768a80444ad2dba7","src/codepointinvlist/examples/unicode_bmp_blocks_selector.rs":"a9b66a1e12993e24fe762914558e8e90fff8ac0fa9648151f71e586027ff72b4","src/codepointinvlist/mod.rs":"7caf7e3c2b65f91caca7aab99e8cd9b282e740d8ac127c3c353a33ab72bd5131","src/codepointinvlist/utils.rs":"49c7166aa910b8c79880ee23e8555d5efe82c14b15fed2a9c580c7dfd5d7b867","src/codepointinvliststringlist/mod.rs":"69eb1d9084011d945e5dc54ff70e4829b6d884affd15a0325396191558534159","src/codepointtrie/LICENSE":"853f87c96f3d249f200fec6db1114427bc8bdf4afddc93c576956d78152ce978","src/codepointtrie/README.md":"f91e0de8cb5c33f62a34a845efbda6d55c3b638c0abd59f66f199eb07dafd4bf","src/codepointtrie/benches/codepointtrie.rs":"d0c8f022f6dd9bf0f8624b9dd599fa78a8a7ac19a3df3a6226a8ebf369ae5872","src/codepointtrie/benches/iai_cpt.rs":"a8ed4e67866d415e6ed0c8c95a9b1887b4198ea409d4cd9efafb50b8c13b3ecc","src/codepointtrie/benches/tries/gc_fast.rs":"4761a339f9b266813f4fa7ffa229b3464ced2ed106ce712ae6a96c0e49e5224e","src/codepointtrie/benches/tries/gc_small.rs":"a1a75d2325dbce031e0127de8d84e900ca7c73ec81da1679965ab0127a99c205","src/codepointtrie/benches/tries/mod.rs":"59424de0ec4f1efc8253365261f679153bd47bb0c834adee92451b8cfadebfc2","src/codepointtrie/cptrie.rs":"61bb7509a1f9ee7039dbc23539c6b47457e33863e525ce1cfda88045451530cf","src/codepointtrie/error.rs":"33ca5d450340e7afe52da5953417bafaf715015bca359c21650b24b41f3dd3b9","src/codepointtrie/impl_const.rs":"ff25fa0d54e174c289b25a6060f50e03c8aa41bad922c9386de3148f8ad95109","src/codepointtrie/mod.rs":"6a87d26d0fc5209dde833faf6bce117078faa14cdaeeeb84456760632ab55c98","src/codepointtrie/planes.rs":"1c53baef1f95889dc803e520eb5bc9aef0d67e0eadc4262e8ca87512797a2243","src/codepointtrie/serde.rs":"b7c806ce3a8db1558d48931b534c0d58a29da9e7d4a174a762bbc7b46d9ca1d7","src/codepointtrie/tests/planes_test.rs":"113f559485c0d69a3d5dec89f17d5d5c9942de2c474b274425dc7373ea7fb6d2","src/codepointtrie/tests/test_util.rs":"3d5993a41ebf091d6063ece76a2e46f473086f97a202d37fbcd90f0b6af68cfd","src/codepointtrie/tests/testdata/free-blocks.16.toml":"e0a66e777c13c0885b6a0f6839cdc9bbbddded2f5fbef4710f8e69a0808791d9","src/codepointtrie/tests/testdata/free-blocks.32.toml":"b0bb6068a84d08d3fbcbd54dce7a59385a42b2dcdf0a6fe9d4160754a80a5f9e","src/codepointtrie/tests/testdata/free-blocks.8.toml":"2de9950cd4475c3cb9cca9c30cb6793b90f3881ea2dd1353bea0701110c76953","src/codepointtrie/tests/testdata/free-blocks.small16.toml":"17cbdef8edec19e8d85802eda775b1095ae2d423a589a4b56064b3b13604af36","src/codepointtrie/tests/testdata/grow-data.16.toml":"802c7c61c2bb70dd7c96ce4633584a2ac4d2e6a61ecfb6f5d19c3c419b76f97c","src/codepointtrie/tests/testdata/grow-data.32.toml":"3cbf6ad1276eda17f18cbeba4db671340ebec0fe6c0b631ea1f52dab63669881","src/codepointtrie/tests/testdata/grow-data.8.toml":"e2d0b066e8a0f0bbf21cffa72393e0fd8c9a7534887886438211600bf7717129","src/codepointtrie/tests/testdata/grow-data.small16.toml":"1d4c5d4b47a3da6b392729be3aa7cfa2cfb58d9ae37565cf10dbc10f0b48beca","src/codepointtrie/tests/testdata/planes.toml":"a2577942758490bd53f4022b30731cff947fae22f4cbbb03b5ae72c65357aa12","src/codepointtrie/tests/testdata/set-empty.16.toml":"6a01c051c5dbbe816097da806b943ca1856312059b0842a1238fe75ad5df220b","src/codepointtrie/tests/testdata/set-empty.32.toml":"ec9dec0296b150ccabde07c255e2971ba407f647824a7c37af0272fa2ba89e2d","src/codepointtrie/tests/testdata/set-empty.8.toml":"478dd49db8670f447f5aae78bcd3cdbeb6f91f7861dec256d480623b5d00941b","src/codepointtrie/tests/testdata/set-empty.small16.toml":"5ff232c9b020bdaaaf762f7c0afe48ccb6f94b40dce08c1ba7dcb66c46ad2423","src/codepointtrie/tests/testdata/set-single-value.16.toml":"6720f4a4d8c113ab7085e6308792ea0005cc8fe3c5d8acacb2cf43e74b12f4b3","src/codepointtrie/tests/testdata/set-single-value.32.toml":"cb93935dc9ce5ed3cbe0f0acb50b49308b232e2d3fc8e39b08d1c33127c9911d","src/codepointtrie/tests/testdata/set-single-value.8.toml":"e5cb6b02341bb8992ec93e49a7b2b059af1fd046ede3021dc207f1833c6a3c95","src/codepointtrie/tests/testdata/set-single-value.small16.toml":"3aef34147b20a5c2c2c6e20f6024d38f7c0518313371b05d3cb83ae78a9ef0db","src/codepointtrie/tests/testdata/set1.16.toml":"01cc1078f281102bd0c9e854a373b7241f2295bb19caa9488caad1b5350d0beb","src/codepointtrie/tests/testdata/set1.32.toml":"cd264d011692df42e9007df87c6500bdde4e098a3a85a89a185f7deeff025a3b","src/codepointtrie/tests/testdata/set1.8.toml":"039aa2fca8f140f5a060bcf01a1da3d45618242dfb0a3c437d4263d5166398a3","src/codepointtrie/tests/testdata/set1.small16.toml":"b8bf6e216201e0a0c61c4b2456eccd1c3b4f38647d67ba251cd7b08f340df0dc","src/codepointtrie/tests/testdata/set2-overlap.16.toml":"49f1d7212cb3f7b10f4a0dbab267b64aeb59380cc28d86c67fd640737da5af0a","src/codepointtrie/tests/testdata/set2-overlap.32.toml":"406104b0532ae249c603c03729f4596ab24460ccbb3a244e04fa2b8401795ef0","src/codepointtrie/tests/testdata/set2-overlap.small16.toml":"4e8d9c5b25cda2fd80fa72e7e9863e6858548608d3fe2a2d774026eda95c959f","src/codepointtrie/tests/testdata/set3-initial-9.16.toml":"f5fdc3d7c6d6813cc527ddffecf35db2d144e2706be0541277bbe4672ea29851","src/codepointtrie/tests/testdata/set3-initial-9.32.toml":"da2887d40005fc071eee1bf4e828f40410266c44585deda208e78d369b5ca9a9","src/codepointtrie/tests/testdata/set3-initial-9.8.toml":"5974d1961bd8334e6fb1be7431f794dfc87d0fecdee4b832ad1c82e2302a6617","src/codepointtrie/tests/testdata/set3-initial-9.small16.toml":"f62d46d2b6492c02944d089885b2ce6b975468e6bceabf986b495ab42a06d595","src/codepointtrie/tests/testdata/short-all-same.16.toml":"5c0252591699a35398f75b3bec977d6ed44cfffbf335a87ed7c3cff86ff74391","src/codepointtrie/tests/testdata/short-all-same.8.toml":"23f7aa3a8e6c3cc75669b8df55827b03c6791aac1ec9f7c8d7f0bbbdd54f23a9","src/codepointtrie/tests/testdata/short-all-same.small16.toml":"5c0252591699a35398f75b3bec977d6ed44cfffbf335a87ed7c3cff86ff74391","src/codepointtrie/tests/testdata/small0-in-fast.16.toml":"8d00f5657ee11c3b00c7a3c1e6333632b37dba0762cd4868b2f8ef90c03aab6c","src/codepointtrie/tests/testdata/small0-in-fast.32.toml":"4736b4ae18cb0e77adc523382ec44bc517a01e17abdb91522b8859d77fbdc7c6","src/codepointtrie/tests/testdata/small0-in-fast.8.toml":"e9214d75c421989eb79b7060817f51fa1d648d55b854fad651ff729962bc49e4","src/codepointtrie/tests/testdata/small0-in-fast.small16.toml":"20eb07e89364a1fd6ddf26f3bc302e92c1aaa724be792d9bf8656e4e5a7a6379","src/codepointtrie/tests/trie_test_data_test.rs":"d43b91866d12358a3a07fccc1f2fc26bf690cc95b157e8d153377a4f0e88a5b3","src/codepointtrie/toml.rs":"d19e1525eab5efb1aac51e35f8e894bdba6de3be5534dd79c17fe8b10f7ffb2f","src/iterator_utils.rs":"69a01e24f8af9f122464208ac633c5a7f456581eeafa6f7e80622a6eef573dcf","src/lib.rs":"e80c21544fdb59aa9c4d82eb88087e1f61d95aafaaf217ea5cd8e317c395cc3b"},"package":"137d96353afc8544d437e8a99eceb10ab291352699573b0de5b08bda38c78c60"}
\ No newline at end of file diff --git a/third_party/rust/icu_collections/Cargo.toml b/third_party/rust/icu_collections/Cargo.toml new file mode 100644 index 0000000000..7ecc93c7d8 --- /dev/null +++ b/third_party/rust/icu_collections/Cargo.toml @@ -0,0 +1,128 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies. +# +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +edition = "2021" +rust-version = "1.67" +name = "icu_collections" +version = "1.4.0" +authors = ["The ICU4X Project Developers"] +include = [ + "data/**/*", + "src/**/*", + "examples/**/*", + "benches/**/*", + "tests/**/*", + "Cargo.toml", + "LICENSE", + "README.md", +] +description = "Collection of API for use in ICU libraries." +homepage = "https://icu4x.unicode.org" +readme = "README.md" +categories = ["internationalization"] +license-file = "LICENSE" +repository = "https://github.com/unicode-org/icu4x" + +[package.metadata.cargo-all-features] +denylist = ["bench"] + +[package.metadata.docs.rs] +all-features = true + +[lib] +bench = false + +[[bench]] +name = "codepointtrie" +path = "src/codepointtrie/benches/codepointtrie.rs" +harness = false + +[[bench]] +name = "iai_cpt" +path = "src/codepointtrie/benches/iai_cpt.rs" +harness = false +required-features = ["bench"] + +[[bench]] +name = "inv_list" +path = "src/codepointinvlist/benches/inv_list.rs" +harness = false + +[dependencies.databake] +version = "0.1.7" +features = ["derive"] +optional = true +default-features = false + +[dependencies.displaydoc] +version = "0.2.3" +default-features = false + +[dependencies.serde] +version = "1.0" +features = [ + "derive", + "alloc", +] +optional = true +default-features = false + +[dependencies.yoke] +version = "0.7.3" +features = ["derive"] +default-features = false + +[dependencies.zerofrom] +version = "0.1.2" +features = ["derive"] +default-features = false + +[dependencies.zerovec] +version = "0.10.1" +features = [ + "derive", + "yoke", +] +default-features = false + +[dev-dependencies.iai] +version = "0.1.1" + +[dev-dependencies.postcard] +version = "1.0.0" +features = ["alloc"] +default-features = false + +[dev-dependencies.serde] +version = "1.0" +features = ["derive"] + +[dev-dependencies.serde_json] +version = "1.0" + +[dev-dependencies.toml] +version = "0.5" + +[features] +bench = [] +databake = [ + "dep:databake", + "zerovec/databake", +] +serde = [ + "dep:serde", + "zerovec/serde", +] +std = [] + +[target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies.criterion] +version = "0.4" diff --git a/third_party/rust/icu_collections/LICENSE b/third_party/rust/icu_collections/LICENSE new file mode 100644 index 0000000000..9845aa5f48 --- /dev/null +++ b/third_party/rust/icu_collections/LICENSE @@ -0,0 +1,44 @@ +UNICODE LICENSE V3 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 2020-2023 Unicode, Inc. + +NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR +SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT +DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + +— + +Portions of ICU4X may have been adapted from ICU4C and/or ICU4J. +ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others. diff --git a/third_party/rust/icu_collections/README.md b/third_party/rust/icu_collections/README.md new file mode 100644 index 0000000000..e3052deabb --- /dev/null +++ b/third_party/rust/icu_collections/README.md @@ -0,0 +1,27 @@ +# icu_collections [![crates.io](https://img.shields.io/crates/v/icu_collections)](https://crates.io/crates/icu_collections) + +<!-- cargo-rdme start --> + +Efficient collections for Unicode data. + +This module is published as its own crate ([`icu_collections`](https://docs.rs/icu_collections/latest/icu_collections/)) +and as part of the [`icu`](https://docs.rs/icu/latest/icu/) crate. See the latter for more details on the ICU4X project. + +ICU4X `CodePointTrie` provides a read-only view of CodePointTrie data that is exported +from ICU4C. Detailed information about the design of the data structure can be found in the documentation +for the `CodePointTrie` struct. + +ICU4X `CodePointInversionList` provides necessary functionality for highly efficient querying of sets of Unicode characters. +It is an implementation of the existing [ICU4C UnicodeSet API](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UnicodeSet.html). + +ICU4X `Char16Trie` provides a data structure for a space-efficient and time-efficient lookup of +sequences of 16-bit units (commonly but not necessarily UTF-16 code units) +which map to integer values. +It is an implementation of the existing [ICU4C UCharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UCharsTrie.html) +/ [ICU4J CharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/util/CharsTrie.html) API. + +<!-- cargo-rdme end --> + +## More Information + +For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x). diff --git a/third_party/rust/icu_collections/src/char16trie/LICENSE b/third_party/rust/icu_collections/src/char16trie/LICENSE new file mode 100644 index 0000000000..9845aa5f48 --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/LICENSE @@ -0,0 +1,44 @@ +UNICODE LICENSE V3 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 2020-2023 Unicode, Inc. + +NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR +SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT +DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + +— + +Portions of ICU4X may have been adapted from ICU4C and/or ICU4J. +ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others. diff --git a/third_party/rust/icu_collections/src/char16trie/README.md b/third_party/rust/icu_collections/src/char16trie/README.md new file mode 100644 index 0000000000..0bbd59656f --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/README.md @@ -0,0 +1,40 @@ +# `Char16Trie` + +This module provides a data structure for a space-efficient and time-efficient lookup of +sequences of 16-bit units (commonly but not necessarily UTF-16 code units) +which map to integer values. + +It is an implementation of the existing [ICU4C UCharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UCharsTrie.html) +/ [ICU4J CharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/util/CharsTrie.html) API. + +## Architecture + +ICU4X [`Char16Trie`](crate::char16trie::Char16Trie) is designed to provide a read-only view of UCharsTrie data that is exported from ICU4C. + +## Examples + +### Querying a `Char16Trie` + +```rust +use icu_collections::char16trie::{Char16Trie, TrieResult}; +use zerovec::ZeroVec; + +// A Char16Trie containing the ASCII characters mapping 'a' to 1 and 'ab' +// to 100. +let trie_data = vec![48, 97, 176, 98, 32868]; +let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + +let mut iter = trie.iter(); +let res = iter.next('a'); +assert_eq!(res, TrieResult::Intermediate(1)); +let res = iter.next('b'); +assert_eq!(res, TrieResult::FinalValue(100)); +let res = iter.next('c'); +assert_eq!(res, TrieResult::NoMatch); +``` + +[`ICU4X`]: ../icu/index.html + +## More Information + +For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x). diff --git a/third_party/rust/icu_collections/src/char16trie/mod.rs b/third_party/rust/icu_collections/src/char16trie/mod.rs new file mode 100644 index 0000000000..288dbd141b --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/mod.rs @@ -0,0 +1,44 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! This module provides a data structure for a space-efficient and time-efficient lookup of +//! sequences of 16-bit units (commonly but not necessarily UTF-16 code units) +//! which map to integer values. +//! +//! It is an implementation of the existing [ICU4C UCharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UCharsTrie.html) +//! / [ICU4J CharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/util/CharsTrie.html) API. +//! +//! ## Architecture +//! +//! ICU4X [`Char16Trie`] is designed to provide a read-only view of UCharsTrie data that is exported from ICU4C. +//! +//! ## Examples +//! +//! ### Querying a `Char16Trie` +//! +//! ```rust +//! use icu_collections::char16trie::{Char16Trie, TrieResult}; +//! use zerovec::ZeroVec; +//! +//! // A Char16Trie containing the ASCII characters mapping 'a' to 1 and 'ab' +//! // to 100. +//! let trie_data = [48, 97, 176, 98, 32868]; +//! let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(&trie_data)); +//! +//! let mut iter = trie.iter(); +//! let res = iter.next('a'); +//! assert_eq!(res, TrieResult::Intermediate(1)); +//! let res = iter.next('b'); +//! assert_eq!(res, TrieResult::FinalValue(100)); +//! let res = iter.next('c'); +//! assert_eq!(res, TrieResult::NoMatch); +//! ``` +//! +//! [`ICU4X`]: ../icu/index.html + +mod trie; + +pub use trie::Char16Trie; +pub use trie::Char16TrieIterator; +pub use trie::TrieResult; diff --git a/third_party/rust/icu_collections/src/char16trie/tests/test_util.rs b/third_party/rust/icu_collections/src/char16trie/tests/test_util.rs new file mode 100644 index 0000000000..6f6d0ccbc0 --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/test_util.rs @@ -0,0 +1,38 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use std::fs::File; +use std::io::Read; +use std::path::Path; + +#[derive(serde::Deserialize)] +pub struct TestFile { + ucharstrie: Char16Trie, +} + +#[derive(serde::Deserialize)] +pub struct Char16Trie { + data: Vec<u16>, +} + +// Given a .toml file dumped from ICU4C test data for UCharsTrie, run the test +// data file deserialization into the test file struct and return the data. +pub fn load_char16trie_data(test_file_path: &str) -> Vec<u16> { + let path = Path::new(test_file_path); + let display = path.display(); + + let mut file = match File::open(&path) { + Err(err) => panic!("couldn't open {}: {}", display, err), + Ok(file) => file, + }; + + let mut toml_str = String::new(); + + if let Err(err) = file.read_to_string(&mut toml_str) { + panic!("couldn't read {}: {}", display, err) + } + + let test_file: TestFile = toml::from_str(&toml_str).unwrap(); + test_file.ucharstrie.data +} diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/empty.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/empty.toml new file mode 100644 index 0000000000..91f04b03ac --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/empty.toml @@ -0,0 +1,11 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: empty.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 32768, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/months.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/months.toml new file mode 100644 index 0000000000..79bfd4c92d --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/months.toml @@ -0,0 +1,19 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: months.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 1,97,134,106,1,97,13,117,1,108,6,110,449,46,32774,101,32774, + 48,121,32775,48,110,147,106,72,111,22,111,32769,112,11,113,12, + 114,32769,117,49,97,114,176,121,32769,48,112,32769,49,113,113,32769, + 106,32769,107,35,108,32769,109,32769,110,58,110,110,110,110,110,110, + 110,110,110,110,110,63,110,110,110,110,110,110,110,110,110,110, + 110,110,110,110,110,110,32769,2,107,32769,108,32769,109,48,109,32769, + 101,22,101,12,102,32769,103,13,104,32769,105,50,105,105,105,32769, + 1,101,32769,102,32769,48,103,32769,46,32769,97,32769,98,7,99,32769, + 100,49,100,100,32769,48,98,32769,52,117,103,117,115,116,32776, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_a.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_a.toml new file mode 100644 index 0000000000..48f53aaa86 --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_a.toml @@ -0,0 +1,11 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: test_a.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 48,97,32769, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_a_ab.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_a_ab.toml new file mode 100644 index 0000000000..c4633ba560 --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_a_ab.toml @@ -0,0 +1,11 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: test_a_ab.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 48,97,176,98,32868, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_branches.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_branches.toml new file mode 100644 index 0000000000..1c7c626191 --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_branches.toml @@ -0,0 +1,15 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: test_branches.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 13,112,42,116,22,116,49216,0,117,8,118,10,122,48,122,65535,32768, + 0,48,117,49280,0,48,118,65535,32767,65535,112,9,114,49168,0,115, + 49,115,115,49184,0,51,112,112,112,112,49156,0,103,19,103,7, + 105,36864,107,7,110,49153,0,49,103,103,33792,50,107,107,107,49152, + 16384,97,32784,99,2,101,33024,48,99,32832, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_compact.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_compact.toml new file mode 100644 index 0000000000..780ca9491a --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_compact.toml @@ -0,0 +1,16 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: test_compact.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 2,43,13,45,11,120,49,106,117,1,108,53,110,48,101,32774,69, + 110,32,110,13,111,20,115,55,101,112,116,101,109,98,101,114, + 32777,54,111,118,101,109,98,101,114,32779,53,99,116,111,98,101, + 114,32778,97,15,100,20,106,48,117,1,108,4,110,48,101,32774, + 48,121,32775,52,117,103,117,115,116,32776,54,101,99,101,109,98, + 101,114,32780, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_long_branch.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_long_branch.toml new file mode 100644 index 0000000000..4c260ce61b --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_long_branch.toml @@ -0,0 +1,28 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: test_long_branch.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 16,107,240,112,92,112,11,114,49203,13107,115,65,116,70,122,65535,32768, + 1,52,112,112,112,112,112,63,112,112,112,112,112,112,112,112, + 112,112,112,112,112,112,112,112,63,112,112,112,112,112,112,112, + 112,112,112,112,112,112,112,112,112,63,112,112,112,112,112,112, + 112,112,112,112,112,112,112,112,112,112,49170,0,51,50,51,52, + 53,50244,17476,56,50,51,52,53,54,55,56,57,48,65535,30583,30583, + 107,64,108,67,110,81,111,52,111,111,111,111,111,63,111,111, + 111,111,111,111,111,111,111,111,111,111,111,111,111,111,63,111, + 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,63, + 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111, + 49169,0,1,50,39552,51,39679,56,50,51,52,53,54,55,56,57, + 48,16498,6912,49,50,51,39681,52,110,110,110,110,110,63,110,110, + 110,110,110,110,110,110,110,110,110,110,110,110,110,110,63,110, + 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,63, + 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, + 49168,65535,102,16,102,32831,103,32832,104,32833,106,48,50,2,51,39168, + 52,39423,53,39424,97,65535,65535,65534,98,65535,65535,65535,99,32768,100,48, + 50,32769, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_long_sequence.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_long_sequence.toml new file mode 100644 index 0000000000..72722a369c --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_long_sequence.toml @@ -0,0 +1,32 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: test_long_sequence.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 48,97,32754,65535,65535,98,99,100,63,101,102,103,104,105,106,107,108, + 109,110,111,112,113,114,115,116,63,117,118,119,120,121,122,65, + 66,67,68,69,70,71,72,73,74,63,75,76,77,78,79,80, + 81,82,83,84,85,86,87,88,89,90,32755,65535,65534,97,98,99, + 100,63,101,102,103,104,105,106,107,108,109,110,111,112,113,114, + 115,116,63,117,118,119,120,121,122,65,66,67,68,69,70,71, + 72,73,74,63,75,76,77,78,79,80,81,82,83,84,85,86, + 87,88,89,90,63,97,98,99,100,101,102,103,104,105,106,107, + 108,109,110,111,112,63,113,114,115,116,117,118,119,120,121,122, + 65,66,67,68,69,70,63,71,72,73,74,75,76,77,78,79, + 80,81,82,83,84,85,86,63,87,88,89,90,97,98,99,100, + 101,102,103,104,105,106,107,108,63,109,110,111,112,113,114,115, + 116,117,118,119,120,121,122,65,66,63,67,68,69,70,71,72, + 73,74,75,76,77,78,79,80,81,82,63,83,84,85,86,87, + 88,89,90,97,98,99,100,101,102,103,104,63,105,106,107,108, + 109,110,111,112,113,114,115,116,117,118,119,120,63,121,122,65, + 66,67,68,69,70,71,72,73,74,75,76,77,78,63,79,80, + 81,82,83,84,85,86,87,88,89,90,97,98,99,100,63,101, + 102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,63, + 117,118,119,120,121,122,65,66,67,68,69,70,71,72,73,74, + 63,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89, + 90,65535,65535,65533, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_shortest_branch.toml b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_shortest_branch.toml new file mode 100644 index 0000000000..639cb0314c --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/testdata/test_shortest_branch.toml @@ -0,0 +1,11 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: test_shortest_branch.toml +# +# machine-generated by: ucharstrietest.c + +[ucharstrie] +data = [ + 1,97,33768,98,34768, +] diff --git a/third_party/rust/icu_collections/src/char16trie/tests/trie_tests.rs b/third_party/rust/icu_collections/src/char16trie/tests/trie_tests.rs new file mode 100644 index 0000000000..f1048ac9d9 --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/tests/trie_tests.rs @@ -0,0 +1,266 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +mod test_util; + +use icu_collections::char16trie::{Char16Trie, TrieResult}; +use zerovec::ZeroVec; + +#[test] +fn char16trie_test_empty() { + let trie_data = test_util::load_char16trie_data("tests/testdata/empty.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + let res = trie.iter().next('h'); + assert_eq!(res, TrieResult::NoMatch); +} + +#[test] +fn char16trie_test_a() { + let trie_data = test_util::load_char16trie_data("tests/testdata/test_a.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + + let mut iter = trie.iter(); + let res = iter.next('h'); + assert_eq!(res, TrieResult::NoMatch); + + let mut iter = trie.iter(); + let res = iter.next('a'); + assert_eq!(res, TrieResult::FinalValue(1)); + let res = iter.next('a'); + assert_eq!(res, TrieResult::NoMatch); +} + +#[test] +fn char16trie_test_a_b() { + let trie_data = test_util::load_char16trie_data("tests/testdata/test_a_ab.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + + let mut iter = trie.iter(); + let res = iter.next('a'); + assert_eq!(res, TrieResult::Intermediate(1)); + let res = iter.next('a'); + assert_eq!(res, TrieResult::NoMatch); + + let mut iter = trie.iter(); + let res = iter.next('a'); + assert_eq!(res, TrieResult::Intermediate(1)); + let res = iter.next('b'); + assert_eq!(res, TrieResult::FinalValue(100)); + let res = iter.next('b'); + assert_eq!(res, TrieResult::NoMatch); +} + +#[test] +fn char16trie_test_shortest_branch() { + let trie_data = test_util::load_char16trie_data("tests/testdata/test_shortest_branch.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + + let mut iter = trie.iter(); + let res = iter.next('a'); + assert_eq!(res, TrieResult::FinalValue(1000)); + let res = iter.next('b'); + assert_eq!(res, TrieResult::NoMatch); + + let mut iter = trie.iter(); + let res = iter.next('b'); + assert_eq!(res, TrieResult::FinalValue(2000)); + let res = iter.next('a'); + assert_eq!(res, TrieResult::NoMatch); +} + +#[test] +fn char16trie_test_branches() { + let trie_data = test_util::load_char16trie_data("tests/testdata/test_branches.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + + for (query, expected) in [ + ("a", TrieResult::FinalValue(0x10)), + ("cc", TrieResult::FinalValue(0x40)), + ("e", TrieResult::FinalValue(0x100)), + ("ggg", TrieResult::FinalValue(0x400)), + ("i", TrieResult::FinalValue(0x1000)), + ("kkkk", TrieResult::FinalValue(0x4000)), + ("n", TrieResult::FinalValue(0x10000)), + ("ppppp", TrieResult::FinalValue(0x40000)), + ("r", TrieResult::FinalValue(0x100000)), + ("sss", TrieResult::FinalValue(0x200000)), + ("t", TrieResult::FinalValue(0x400000)), + ("uu", TrieResult::FinalValue(0x800000)), + ("vv", TrieResult::FinalValue(0x7fffffff)), + ("zz", TrieResult::FinalValue(-2147483648)), + ] { + let mut iter = trie.iter(); + for (i, chr) in query.chars().enumerate() { + let res = iter.next(chr); + if i + 1 == query.len() { + assert_eq!(res, expected); + } else { + assert_eq!(res, TrieResult::NoValue); + } + } + } +} + +#[test] +fn char16trie_test_long_sequence() { + let trie_data = test_util::load_char16trie_data("tests/testdata/test_long_sequence.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + + for (query, expected) in [ + ("a", TrieResult::Intermediate(-1)), + // sequence of linear-match nodes + ( + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + TrieResult::Intermediate(-2), + ), + // more than 256 units + ( + concat!( + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + ), + TrieResult::FinalValue(-3), + ), + ] { + let mut iter = trie.iter(); + for (i, chr) in query.chars().enumerate() { + let res = iter.next(chr); + if i + 1 == query.len() { + assert_eq!(res, expected); + } else if i == 0 { + assert_eq!(res, TrieResult::Intermediate(-1)); + } else if i == 51 { + assert_eq!(res, TrieResult::Intermediate(-2)); + } else { + assert_eq!(res, TrieResult::NoValue); + } + } + } +} + +#[test] +fn char16trie_test_long_branch() { + let trie_data = test_util::load_char16trie_data("tests/testdata/test_long_branch.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + + for (query, expected) in [ + ("a", TrieResult::FinalValue(-2)), + ("b", TrieResult::FinalValue(-1)), + ("c", TrieResult::FinalValue(0)), + ("d2", TrieResult::FinalValue(1)), + ("f", TrieResult::FinalValue(0x3f)), + ("g", TrieResult::FinalValue(0x40)), + ("h", TrieResult::FinalValue(0x41)), + ("j23", TrieResult::FinalValue(0x1900)), + ("j24", TrieResult::FinalValue(0x19ff)), + ("j25", TrieResult::FinalValue(0x1a00)), + ("k2", TrieResult::FinalValue(0x1a80)), + ("k3", TrieResult::FinalValue(0x1aff)), + ("l234567890", TrieResult::Intermediate(0x1b00)), + ("l234567890123", TrieResult::FinalValue(0x1b01)), + ( + "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn", + TrieResult::FinalValue(0x10ffff), + ), + ( + "oooooooooooooooooooooooooooooooooooooooooooooooooooooo", + TrieResult::FinalValue(0x110000), + ), + ( + "pppppppppppppppppppppppppppppppppppppppppppppppppppppp", + TrieResult::FinalValue(0x120000), + ), + ("r", TrieResult::FinalValue(0x333333)), + ("s2345", TrieResult::FinalValue(0x4444444)), + ("t234567890", TrieResult::FinalValue(0x77777777)), + ("z", TrieResult::FinalValue(-2147483647)), + ] { + let mut iter = trie.iter(); + for (i, chr) in query.chars().enumerate() { + let res = iter.next(chr); + if i + 1 == query.len() { + assert_eq!(res, expected); + } else if query == "l234567890123" && i == 9 { + assert_eq!(res, TrieResult::Intermediate(0x1b00)); + } else { + assert_eq!(res, TrieResult::NoValue); + } + } + } +} + +#[test] +fn char16trie_test_compact() { + let trie_data = test_util::load_char16trie_data("tests/testdata/test_compact.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + + for (query, expected) in [ + ("+", TrieResult::Intermediate(0)), + ("+august", TrieResult::FinalValue(8)), + ("+december", TrieResult::FinalValue(12)), + ("+july", TrieResult::FinalValue(7)), + ("+june", TrieResult::FinalValue(6)), + ("+november", TrieResult::FinalValue(11)), + ("+october", TrieResult::FinalValue(10)), + ("+september", TrieResult::FinalValue(9)), + ("-", TrieResult::Intermediate(0)), + ("-august", TrieResult::FinalValue(8)), + ("-december", TrieResult::FinalValue(12)), + ("-july", TrieResult::FinalValue(7)), + ("-june", TrieResult::FinalValue(6)), + ("-november", TrieResult::FinalValue(11)), + ("-october", TrieResult::FinalValue(10)), + ("-september", TrieResult::FinalValue(9)), + ("xjuly", TrieResult::FinalValue(7)), + ("xjune", TrieResult::FinalValue(6)), + ] { + let mut iter = trie.iter(); + for (i, chr) in query.chars().enumerate() { + let res = iter.next(chr); + if i + 1 == query.len() { + assert_eq!(res, expected); + } else if chr == '-' || chr == '+' { + assert_eq!(res, TrieResult::Intermediate(0)); + } else { + assert_eq!(res, TrieResult::NoValue); + } + } + } +} + +#[test] +fn char16trie_test_months() { + let trie_data = test_util::load_char16trie_data("tests/testdata/months.toml"); + let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(trie_data.as_slice())); + + let mut iter = trie.iter(); + for (chr, expected) in [ + ('j', TrieResult::NoValue), + ('u', TrieResult::NoValue), + ('n', TrieResult::Intermediate(6)), + ('e', TrieResult::FinalValue(6)), + ] { + let res = iter.next(chr); + assert_eq!(res, expected); + } + let res = iter.next('h'); + assert_eq!(res, TrieResult::NoMatch); + + let mut iter = trie.iter(); + for (chr, expected) in [ + ('j', TrieResult::NoValue), + ('u', TrieResult::NoValue), + ('l', TrieResult::NoValue), + ('y', TrieResult::FinalValue(7)), + ] { + let res = iter.next(chr); + assert_eq!(res, expected); + } + let res = iter.next('h'); + assert_eq!(res, TrieResult::NoMatch); +} diff --git a/third_party/rust/icu_collections/src/char16trie/trie.rs b/third_party/rust/icu_collections/src/char16trie/trie.rs new file mode 100644 index 0000000000..2aa4f1b303 --- /dev/null +++ b/third_party/rust/icu_collections/src/char16trie/trie.rs @@ -0,0 +1,489 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use zerofrom::ZeroFrom; +use zerovec::{ZeroSlice, ZeroVec}; + +// Match-node lead unit values, after masking off intermediate-value bits: + +// 00..0f: Branch node. If node!=0 then the length is node+1, otherwise +// the length is one more than the next byte. + +// For a branch sub-node with at most this many entries, we drop down +// to a linear search. +const MAX_BRANCH_LINEAR_SUB_NODE_LENGTH: usize = 5; + +// 0030..003f: Linear-match node, match 1..16 units and continue reading the next node. +const MIN_LINEAR_MATCH: u16 = 0x30; +const MAX_LINEAR_MATCH_LENGTH: u16 = 0x10; + +// Match-node lead unit bits 14..6 for the optional intermediate value. +// If these bits are 0, then there is no intermediate value. +// Otherwise, see the *NodeValue* constants below. +const MIN_VALUE_LEAD: u16 = MIN_LINEAR_MATCH + MAX_LINEAR_MATCH_LENGTH; // 0x40 +const NODE_TYPE_MASK: u16 = MIN_VALUE_LEAD - 1; // 0x003f + +// A final-value node has bit 15 set. +const VALUE_IS_FINAL: u16 = 0x8000; + +// Compact value: After testing bit 0, shift right by 15 and then use the following thresholds. +const MAX_ONE_UNIT_VALUE: u16 = 0x3fff; + +const MIN_TWO_UNIT_VALUE_LEAD: u16 = MAX_ONE_UNIT_VALUE + 1; // 0x4000 + +const MAX_ONE_UNIT_NODE_VALUE: u16 = 0xff; + +const MIN_TWO_UNIT_NODE_VALUE_LEAD: u16 = MIN_VALUE_LEAD + ((MAX_ONE_UNIT_NODE_VALUE + 1) << 6); // 0x4040 + +const THREE_UNIT_NODE_VALUE_LEAD: u16 = 0x7fc0; + +const THREE_UNIT_VALUE_LEAD: u16 = 0x7fff; + +// Compact delta integers. +const MAX_ONE_UNIT_DELTA: u16 = 0xfbff; +const MIN_TWO_UNIT_DELTA_LEAD: u16 = MAX_ONE_UNIT_DELTA + 1; // 0xfc00 +const THREE_UNIT_DELTA_LEAD: u16 = 0xffff; + +fn skip_value(pos: usize, lead: u16) -> usize { + if lead < MIN_TWO_UNIT_VALUE_LEAD { + pos + } else if lead < THREE_UNIT_VALUE_LEAD { + pos + 1 + } else { + pos + 2 + } +} + +fn skip_node_value(pos: usize, lead: u16) -> usize { + if lead < MIN_TWO_UNIT_NODE_VALUE_LEAD { + pos + } else if lead < THREE_UNIT_NODE_VALUE_LEAD { + pos + 1 + } else { + pos + 2 + } +} + +/// This struct represents a de-serialized `Char16Trie` that was exported from +/// ICU binary data. +/// +/// Light-weight, non-const reader class for a `CharsTrie`. Traverses a +/// char-serialized data structure with minimal state, for mapping 16-bit-unit +/// sequences to non-negative integer values. +/// +/// For more information: +/// - [ICU4C UCharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UCharsTrie.html) +/// - [ICU4J CharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/util/CharsTrie.html) API. +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] +#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = icu_collections::char16trie))] +#[derive(Clone, Debug, PartialEq, Eq, ZeroFrom)] +pub struct Char16Trie<'data> { + /// An array of u16 containing the trie data. + #[cfg_attr(feature = "serde", serde(borrow))] + #[doc(hidden)] // #2417 + pub data: ZeroVec<'data, u16>, +} + +impl<'data> Char16Trie<'data> { + /// Returns a new [`Char16Trie`] with ownership of the provided data. + pub fn new(data: ZeroVec<'data, u16>) -> Self { + Self { data } + } + + /// Returns a new [`Char16TrieIterator`] backed by borrowed data from the `trie` data + pub fn iter(&self) -> Char16TrieIterator { + Char16TrieIterator::new(&self.data) + } +} + +/// This struct represents an iterator over a [`Char16Trie`]. +#[derive(Clone)] +pub struct Char16TrieIterator<'a> { + /// A reference to the Char16Trie data to iterate over. + trie: &'a ZeroSlice<u16>, + /// Index of next trie unit to read, or `None` if there are no more matches. + pos: Option<usize>, + /// Remaining length of a linear-match node, minus 1, or `None` if not in + /// such a node. + remaining_match_length: Option<usize>, +} + +/// An enum representing the return value from a lookup in [`Char16Trie`]. +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum TrieResult { + /// The input unit(s) did not continue a matching string. + /// Once `next()` returns `TrieResult::NoMatch`, all further calls to `next()` + /// will also return `TrieResult::NoMatch`. + NoMatch, + /// The input unit(s) matched a string but there is no value for the string + /// so far. (It is a prefix of a longer string.) + NoValue, + /// The input unit(s) continued a matching string and there is a value for + /// the string so far. No further input byte/unit can continue a matching + /// string. + FinalValue(i32), + /// The input unit(s) continued a matching string and there is a value for + /// the string so far. Another input byte/unit can continue a matching + /// string. + Intermediate(i32), +} + +// Get the lead surrogate (0xd800..0xdbff) for a +// supplementary code point (0x10000..0x10ffff). +// @param supplementary 32-bit code point (U+10000..U+10ffff) +// @return lead surrogate (U+d800..U+dbff) for supplementary +fn u16_lead(supplementary: i32) -> u16 { + (((supplementary) >> 10) + 0xd7c0) as u16 +} + +// Get the trail surrogate (0xdc00..0xdfff) for a +// supplementary code point (0x10000..0x10ffff). +// @param supplementary 32-bit code point (U+10000..U+10ffff) +// @return trail surrogate (U+dc00..U+dfff) for supplementary +fn u16_tail(supplementary: i32) -> u16 { + (((supplementary) & 0x3ff) | 0xdc00) as u16 +} + +/// A macro that takes an `Option` argument and either unwraps it if it has a value or +/// causes the function to return `TrieResult::NoMatch` if there is no value. +/// This could perhaps be done with `std::ops::Try` once stabilized. +macro_rules! trie_unwrap { + ($option:expr) => { + match $option { + Some(x) => x, + None => { + // Unexpected + debug_assert!(false); + return TrieResult::NoMatch; + } + } + }; +} + +impl<'a> Char16TrieIterator<'a> { + /// Returns a new [`Char16TrieIterator`] backed by borrowed data for the `trie` array + pub fn new(trie: &'a ZeroSlice<u16>) -> Self { + Self { + trie, + pos: Some(0), + remaining_match_length: None, + } + } + + /// Traverses the trie from the current state for this input char. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::char16trie::{Char16Trie, TrieResult}; + /// use zerovec::ZeroVec; + /// + /// // A Char16Trie containing the ASCII characters 'a' and 'b'. + /// let trie_data = [48, 97, 176, 98, 32868]; + /// let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(&trie_data)); + /// + /// let mut iter = trie.iter(); + /// let res = iter.next('a'); + /// assert_eq!(res, TrieResult::Intermediate(1)); + /// let res = iter.next('b'); + /// assert_eq!(res, TrieResult::FinalValue(100)); + /// let res = iter.next('c'); + /// assert_eq!(res, TrieResult::NoMatch); + /// ``` + pub fn next(&mut self, c: char) -> TrieResult { + if (c as u32) <= 0xffff { + self.next16(c as u16) + } else { + match self.next16(u16_lead(c as i32)) { + TrieResult::NoValue | TrieResult::Intermediate(_) => { + self.next16(u16_tail(c as i32)) + } + _ => TrieResult::NoMatch, + } + } + } + + /// Traverses the trie from the current state for this input char. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::char16trie::{Char16Trie, TrieResult}; + /// use zerovec::ZeroVec; + /// + /// // A Char16Trie containing the ASCII characters 'a' and 'b'. + /// let trie_data = [48, 97, 176, 98, 32868]; + /// let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(&trie_data)); + /// + /// let mut iter = trie.iter(); + /// let res = iter.next('a'); + /// assert_eq!(res, TrieResult::Intermediate(1)); + /// let res = iter.next('b'); + /// assert_eq!(res, TrieResult::FinalValue(100)); + /// let res = iter.next('c'); + /// assert_eq!(res, TrieResult::NoMatch); + /// ``` + pub fn next32(&mut self, c: u32) -> TrieResult { + if c <= 0xffff { + self.next16(c as u16) + } else { + match self.next16(u16_lead(c as i32)) { + TrieResult::NoValue | TrieResult::Intermediate(_) => { + self.next16(u16_tail(c as i32)) + } + _ => TrieResult::NoMatch, + } + } + } + + /// Traverses the trie from the current state for this input char. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::char16trie::{Char16Trie, TrieResult}; + /// use zerovec::ZeroVec; + /// + /// // A Char16Trie containing the ASCII characters 'a' and 'b'. + /// let trie_data = [48, 97, 176, 98, 32868]; + /// let trie = Char16Trie::new(ZeroVec::from_slice_or_alloc(&trie_data)); + /// + /// let mut iter = trie.iter(); + /// let res = iter.next16('a' as u16); + /// assert_eq!(res, TrieResult::Intermediate(1)); + /// let res = iter.next16('b' as u16); + /// assert_eq!(res, TrieResult::FinalValue(100)); + /// let res = iter.next16('c' as u16); + /// assert_eq!(res, TrieResult::NoMatch); + /// ``` + pub fn next16(&mut self, c: u16) -> TrieResult { + let mut pos = match self.pos { + Some(p) => p, + None => return TrieResult::NoMatch, + }; + if let Some(length) = self.remaining_match_length { + // Remaining part of a linear-match node + if c == trie_unwrap!(self.trie.get(pos)) { + pos += 1; + self.pos = Some(pos); + if length == 0 { + self.remaining_match_length = None; + let node = trie_unwrap!(self.trie.get(pos)); + if node >= MIN_VALUE_LEAD { + return self.value_result(pos); + } + } else { + self.remaining_match_length = Some(length - 1); + } + return TrieResult::NoValue; + } + self.stop(); + TrieResult::NoMatch + } else { + self.next_impl(pos, c) + } + } + + fn branch_next(&mut self, pos: usize, length: usize, in_unit: u16) -> TrieResult { + let mut pos = pos; + let mut length = length; + if length == 0 { + length = trie_unwrap!(self.trie.get(pos)) as usize; + pos += 1; + } + length += 1; + + // The length of the branch is the number of units to select from. + // The data structure encodes a binary search. + while length > MAX_BRANCH_LINEAR_SUB_NODE_LENGTH { + if in_unit < trie_unwrap!(self.trie.get(pos)) { + length >>= 1; + pos = trie_unwrap!(self.jump_by_delta(pos + 1)); + } else { + length = length - (length >> 1); + pos = trie_unwrap!(self.skip_delta(pos + 1)); + } + } + // Drop down to linear search for the last few bytes. + // length>=2 because the loop body above sees length>kMaxBranchLinearSubNodeLength>=3 + // and divides length by 2. + loop { + if in_unit == trie_unwrap!(self.trie.get(pos)) { + pos += 1; + let mut node = trie_unwrap!(self.trie.get(pos)); + if node & VALUE_IS_FINAL != 0 { + self.pos = Some(pos); + return self.value_result(pos); + } + // Use the non-final value as the jump delta. + pos += 1; + + if node < MIN_TWO_UNIT_VALUE_LEAD { + pos += node as usize; + } else if node < THREE_UNIT_VALUE_LEAD { + pos += (((node - MIN_TWO_UNIT_VALUE_LEAD) as u32) << 16) as usize + | trie_unwrap!(self.trie.get(pos)) as usize; + pos += 1; + } else { + pos += (trie_unwrap!(self.trie.get(pos)) as usize) << 16 + | trie_unwrap!(self.trie.get(pos + 1)) as usize; + pos += 2; + } + node = trie_unwrap!(self.trie.get(pos)); + self.pos = Some(pos); + + if node >= MIN_VALUE_LEAD { + return self.value_result(pos); + } + return TrieResult::NoValue; + } + length -= 1; + pos = trie_unwrap!(self.skip_value(pos + 1)); + if length <= 1 { + break; + } + } + + if in_unit == trie_unwrap!(self.trie.get(pos)) { + pos += 1; + self.pos = Some(pos); + let node = trie_unwrap!(self.trie.get(pos)); + if node >= MIN_VALUE_LEAD { + return self.value_result(pos); + } + TrieResult::NoValue + } else { + self.stop(); + TrieResult::NoMatch + } + } + + fn next_impl(&mut self, pos: usize, in_unit: u16) -> TrieResult { + let mut node = trie_unwrap!(self.trie.get(pos)); + let mut pos = pos + 1; + loop { + if node < MIN_LINEAR_MATCH { + return self.branch_next(pos, node as usize, in_unit); + } else if node < MIN_VALUE_LEAD { + // Match the first of length+1 units. + let length = node - MIN_LINEAR_MATCH; + if in_unit == trie_unwrap!(self.trie.get(pos)) { + pos += 1; + if length == 0 { + self.remaining_match_length = None; + self.pos = Some(pos); + node = trie_unwrap!(self.trie.get(pos)); + if node >= MIN_VALUE_LEAD { + return self.value_result(pos); + } + return TrieResult::NoValue; + } + self.remaining_match_length = Some(length as usize - 1); + self.pos = Some(pos); + return TrieResult::NoValue; + } + // No match + break; + } else if (node & VALUE_IS_FINAL) != 0 { + // No further matching units. + break; + } else { + // Skip intermediate value. + pos = skip_node_value(pos, node); + node &= NODE_TYPE_MASK; + } + } + self.stop(); + TrieResult::NoMatch + } + + fn stop(&mut self) { + self.pos = None; + } + + #[inline(always)] // 1 call site and we want the Option to go away + fn jump_by_delta(&self, pos: usize) -> Option<usize> { + let delta = self.trie.get(pos)?; + let v = if delta < MIN_TWO_UNIT_DELTA_LEAD { + // nothing to do + pos + 1 + delta as usize + } else if delta == THREE_UNIT_DELTA_LEAD { + let delta = + ((self.trie.get(pos + 1)? as usize) << 16) | (self.trie.get(pos + 2)? as usize); + pos + delta + 3 + } else { + let delta = ((delta - MIN_TWO_UNIT_DELTA_LEAD) as usize) << 16 + | (self.trie.get(pos + 1)? as usize); + pos + delta + 2 + }; + Some(v) + } + + #[inline(always)] // 1 call site and we want the Option to go away + fn skip_value(&self, pos: usize) -> Option<usize> { + let lead_unit = self.trie.get(pos)?; + Some(skip_value(pos + 1, lead_unit & 0x7fff)) + } + + #[inline(always)] // 1 call site and we want the Option to go away + fn skip_delta(&self, pos: usize) -> Option<usize> { + let delta = self.trie.get(pos)?; + let v = if delta < MIN_TWO_UNIT_DELTA_LEAD { + pos + 1 + } else if delta == THREE_UNIT_DELTA_LEAD { + pos + 3 + } else { + pos + 2 + }; + Some(v) + } + + fn value_result(&self, pos: usize) -> TrieResult { + match self.get_value(pos) { + Some(result) => result, + None => { + // Unexpected + debug_assert!(false); + TrieResult::NoMatch + } + } + } + + #[inline(always)] // 1 call site and we want the Option to go away + fn get_value(&self, pos: usize) -> Option<TrieResult> { + let lead_unit = self.trie.get(pos)?; + if lead_unit & VALUE_IS_FINAL == VALUE_IS_FINAL { + self.read_value(pos + 1, lead_unit & 0x7fff) + .map(TrieResult::FinalValue) + } else { + self.read_node_value(pos + 1, lead_unit) + .map(TrieResult::Intermediate) + } + } + + #[inline(always)] // 1 call site and we want the Option to go away + fn read_value(&self, pos: usize, lead_unit: u16) -> Option<i32> { + let v = if lead_unit < MIN_TWO_UNIT_VALUE_LEAD { + lead_unit.into() + } else if lead_unit < THREE_UNIT_VALUE_LEAD { + ((lead_unit - MIN_TWO_UNIT_VALUE_LEAD) as i32) << 16 | self.trie.get(pos)? as i32 + } else { + (self.trie.get(pos)? as i32) << 16 | self.trie.get(pos + 1)? as i32 + }; + Some(v) + } + + #[inline(always)] // 1 call site and we want the Option to go away + fn read_node_value(&self, pos: usize, lead_unit: u16) -> Option<i32> { + let v = if lead_unit < (MIN_TWO_UNIT_NODE_VALUE_LEAD) { + ((lead_unit >> 6) - 1).into() + } else if lead_unit < THREE_UNIT_NODE_VALUE_LEAD { + (((lead_unit & 0x7fc0) - MIN_TWO_UNIT_NODE_VALUE_LEAD) as i32) << 10 + | self.trie.get(pos)? as i32 + } else { + (self.trie.get(pos)? as i32) << 16 | self.trie.get(pos + 1)? as i32 + }; + Some(v) + } +} diff --git a/third_party/rust/icu_collections/src/codepointinvlist/LICENSE b/third_party/rust/icu_collections/src/codepointinvlist/LICENSE new file mode 100644 index 0000000000..9845aa5f48 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/LICENSE @@ -0,0 +1,44 @@ +UNICODE LICENSE V3 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 2020-2023 Unicode, Inc. + +NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR +SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT +DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + +— + +Portions of ICU4X may have been adapted from ICU4C and/or ICU4J. +ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others. diff --git a/third_party/rust/icu_collections/src/codepointinvlist/README.md b/third_party/rust/icu_collections/src/codepointinvlist/README.md new file mode 100644 index 0000000000..6220882e3a --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/README.md @@ -0,0 +1,49 @@ +# `CodePointInversionList` + +This module provides necessary functionality for highly efficient querying of sets of Unicode characters. + +It is an implementation of the existing [ICU4C UnicodeSet API](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UnicodeSet.html). + +## Architecture +ICU4X [`CodePointInversionList`] is split up into independent levels, with [`CodePointInversionList`] representing the membership/query API, +and [`CodePointInversionListBuilder`] representing the builder API. + +## Examples: + +### Creating a `CodePointInversionList` + +CodePointSets are created from either serialized [`CodePointSets`](CodePointInversionList), +represented by [inversion lists](http://userguide.icu-project.org/strings/properties), +the [`CodePointInversionListBuilder`], or from the Properties API. + +```rust +use icu_collections::codepointinvlist::{CodePointInversionList, CodePointInversionListBuilder}; + +let mut builder = CodePointInversionListBuilder::new(); +builder.add_range(&('A'..'Z')); +let set: CodePointInversionList = builder.build(); + +assert!(set.contains('A')); +``` + +### Querying a `CodePointInversionList` + +Currently, you can check if a character/range of characters exists in the [`CodePointInversionList`], or iterate through the characters. + +```rust +use icu_collections::codepointinvlist::{CodePointInversionList, CodePointInversionListBuilder}; + +let mut builder = CodePointInversionListBuilder::new(); +builder.add_range(&('A'..'Z')); +let set: CodePointInversionList = builder.build(); + +assert!(set.contains('A')); +assert!(set.contains_range(&('A'..='C'))); +assert_eq!(set.iter_chars().next(), Some('A')); +``` + +[`ICU4X`]: ../icu/index.html + +## More Information + +For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x). diff --git a/third_party/rust/icu_collections/src/codepointinvlist/benches/inv_list.rs b/third_party/rust/icu_collections/src/codepointinvlist/benches/inv_list.rs new file mode 100644 index 0000000000..7a0ac0d992 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/benches/inv_list.rs @@ -0,0 +1,70 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use criterion::{criterion_group, criterion_main, Criterion}; +use icu_collections::codepointinvlist::CodePointInversionList; +use std::char; + +fn uniset_bench(c: &mut Criterion) { + let best_ex = [0x41, 0x46]; + let best_sample = CodePointInversionList::try_from_inversion_list_slice(&best_ex).unwrap(); + let worst_ex: Vec<u32> = (0x0..((char::MAX as u32) + 1)).collect(); + let worst_sample = CodePointInversionList::try_from_inversion_list_slice(&worst_ex).unwrap(); + + c.bench_function("uniset/overview", |b| { + #[allow(clippy::suspicious_map)] + b.iter(|| { + best_sample + .iter_chars() + .map(|ch| best_sample.contains(ch)) + .count(); + worst_sample + .iter_chars() + .map(|ch| worst_sample.contains(ch)) + .count(); + best_sample + .iter_chars() + .map(|ch| best_sample.contains_range(&('A'..ch))) + .count(); + worst_sample + .iter_chars() + .take(100) + .map(|ch| worst_sample.contains_range(&(char::from_u32(0x0).unwrap()..ch))) + .count(); + }) + }); + + #[cfg(feature = "bench")] + { + let mut group = c.benchmark_group("uniset/contains"); + group.bench_with_input("best", &best_sample, |b, sample| { + b.iter(|| sample.iter_chars().map(|ch| sample.contains(ch))) + }); + group.bench_with_input("worst", &worst_sample, |b, sample| { + b.iter(|| sample.iter_chars().take(100).map(|ch| sample.contains(ch))) + }); + group.finish(); + + let mut group = c.benchmark_group("uniset/contains_range"); + group.bench_with_input("best", &best_sample, |b, sample| { + b.iter(|| { + sample + .iter_chars() + .map(|ch| sample.contains_range(&('A'..ch))) + }) + }); + group.bench_with_input("worst", &worst_sample, |b, sample| { + b.iter(|| { + sample + .iter_chars() + .take(100) + .map(|ch| sample.contains_range(&(char::from_u32(0x0).unwrap()..ch))) + }) + }); + group.finish(); + } +} + +criterion_group!(benches, uniset_bench); +criterion_main!(benches); diff --git a/third_party/rust/icu_collections/src/codepointinvlist/builder.rs b/third_party/rust/icu_collections/src/codepointinvlist/builder.rs new file mode 100644 index 0000000000..bd6ab9764c --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/builder.rs @@ -0,0 +1,955 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use alloc::vec; +use alloc::vec::Vec; +use core::{char, cmp::Ordering, ops::RangeBounds}; + +use crate::codepointinvlist::{utils::deconstruct_range, CodePointInversionList}; +use zerovec::{ule::AsULE, ZeroVec}; + +/// A builder for [`CodePointInversionList`]. +/// +/// Provides exposure to builder functions and conversion to [`CodePointInversionList`] +#[derive(Default)] +pub struct CodePointInversionListBuilder { + // A sorted list of even length, with values <= char::MAX + 1 + intervals: Vec<u32>, +} + +impl CodePointInversionListBuilder { + /// Returns empty [`CodePointInversionListBuilder`] + pub const fn new() -> Self { + Self { intervals: vec![] } + } + + /// Returns a [`CodePointInversionList`] and consumes the [`CodePointInversionListBuilder`] + pub fn build(self) -> CodePointInversionList<'static> { + let inv_list: ZeroVec<u32> = ZeroVec::alloc_from_slice(&self.intervals); + #[allow(clippy::unwrap_used)] // by invariant + CodePointInversionList::try_from_inversion_list(inv_list).unwrap() + } + + /// Abstraction for adding/removing a range from start..end + /// + /// If add is true add, else remove + fn add_remove_middle(&mut self, start: u32, end: u32, add: bool) { + if start >= end || end > char::MAX as u32 + 1 { + return; + } + let start_res = self.intervals.binary_search(&start); + let end_res = self.intervals.binary_search(&end); + let mut start_ind = start_res.unwrap_or_else(|x| x); + let mut end_ind = end_res.unwrap_or_else(|x| x); + let start_pos_check = (start_ind % 2 == 0) == add; + let end_pos_check = (end_ind % 2 == 0) == add; + let start_eq_end = start_ind == end_ind; + + #[allow(clippy::indexing_slicing)] // all indices are binary search results + if start_eq_end && start_pos_check && end_res.is_err() { + let ins = &[start, end]; + self.intervals + .splice(start_ind..end_ind, ins.iter().copied()); + } else { + if start_pos_check { + self.intervals[start_ind] = start; + start_ind += 1; + } + if end_pos_check { + if end_res.is_ok() { + end_ind += 1; + } else { + end_ind -= 1; + self.intervals[end_ind] = end; + } + } + if start_ind < end_ind { + self.intervals.drain(start_ind..end_ind); + } + } + } + + /// Add the range to the [`CodePointInversionListBuilder`] + /// + /// Accomplishes this through binary search for the start and end indices and merges intervals + /// in between with inplace memory. Performs `O(1)` operation if adding to end of list, and `O(N)` otherwise, + /// where `N` is the number of endpoints. + fn add(&mut self, start: u32, end: u32) { + if start >= end { + return; + } + if self.intervals.is_empty() { + self.intervals.extend_from_slice(&[start, end]); + return; + } + self.add_remove_middle(start, end, true); + } + + /// Add the character to the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_char('a'); + /// let check = builder.build(); + /// assert_eq!(check.iter_chars().next(), Some('a')); + /// ``` + pub fn add_char(&mut self, c: char) { + let to_add = c as u32; + self.add(to_add, to_add + 1); + } + + /// Add the code point value to the [`CodePointInversionListBuilder`] + /// + /// Note: Even though [`u32`] and [`prim@char`] in Rust are non-negative 4-byte + /// values, there is an important difference. A [`u32`] can take values up to + /// a very large integer value, while a [`prim@char`] in Rust is defined to be in + /// the range from 0 to the maximum valid Unicode Scalar Value. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_u32(0x41); + /// let check = builder.build(); + /// assert!(check.contains32(0x41)); + /// ``` + pub fn add_u32(&mut self, c: u32) { + if c <= char::MAX as u32 { + // we already know 0 <= c because c: u32 + self.add(c, c + 1); + } + } + + /// Add the range of characters to the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_range(&('A'..='Z')); + /// let check = builder.build(); + /// assert_eq!(check.iter_chars().next(), Some('A')); + /// ``` + pub fn add_range(&mut self, range: &impl RangeBounds<char>) { + let (start, end) = deconstruct_range(range); + self.add(start, end); + } + + /// Add the range of characters, represented as u32, to the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_range_u32(&(0xd800..=0xdfff)); + /// let check = builder.build(); + /// assert!(check.contains32(0xd900)); + /// ``` + pub fn add_range_u32(&mut self, range: &impl RangeBounds<u32>) { + let (start, end) = deconstruct_range(range); + // Sets that include char::MAX need to allow an end value of MAX + 1 + if start <= end && end <= char::MAX as u32 + 1 { + self.add(start, end); + } + } + + /// Add the [`CodePointInversionList`] reference to the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::{ + /// CodePointInversionList, CodePointInversionListBuilder, + /// }; + /// let mut builder = CodePointInversionListBuilder::new(); + /// let set = + /// CodePointInversionList::try_from_inversion_list_slice(&[0x41, 0x4C]) + /// .unwrap(); + /// builder.add_set(&set); + /// let check = builder.build(); + /// assert_eq!(check.iter_chars().next(), Some('A')); + /// ``` + #[allow(unused_assignments)] + pub fn add_set(&mut self, set: &CodePointInversionList) { + #[allow(clippy::indexing_slicing)] // chunks + set.as_inversion_list() + .as_ule_slice() + .chunks(2) + .for_each(|pair| { + self.add( + AsULE::from_unaligned(pair[0]), + AsULE::from_unaligned(pair[1]), + ) + }); + } + + /// Removes the range from the [`CodePointInversionListBuilder`] + /// + /// Performs binary search to find start and end affected intervals, then removes in an `O(N)` fashion + /// where `N` is the number of endpoints, with in-place memory. + fn remove(&mut self, start: u32, end: u32) { + if start >= end || self.intervals.is_empty() { + return; + } + if let Some(&last) = self.intervals.last() { + #[allow(clippy::indexing_slicing)] + // by invariant, if we have a last we have a (different) first + if start <= self.intervals[0] && end >= last { + self.intervals.clear(); + } else { + self.add_remove_middle(start, end, false); + } + } + } + + /// Remove the character from the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_range(&('A'..='Z')); + /// builder.remove_char('A'); + /// let check = builder.build(); + /// assert_eq!(check.iter_chars().next(), Some('B')); + pub fn remove_char(&mut self, c: char) { + let to_remove = c as u32; + self.remove(to_remove, to_remove + 1); + } + + /// Remove the range of characters from the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_range(&('A'..='Z')); + /// builder.remove_range(&('A'..='C')); + /// let check = builder.build(); + /// assert_eq!(check.iter_chars().next(), Some('D')); + pub fn remove_range(&mut self, range: &impl RangeBounds<char>) { + let (start, end) = deconstruct_range(range); + self.remove(start, end); + } + + /// Remove the [`CodePointInversionList`] from the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::{CodePointInversionList, CodePointInversionListBuilder}; + /// let mut builder = CodePointInversionListBuilder::new(); + /// let set = CodePointInversionList::try_from_inversion_list_slice(&[0x41, 0x46]).unwrap(); + /// builder.add_range(&('A'..='Z')); + /// builder.remove_set(&set); // removes 'A'..='E' + /// let check = builder.build(); + /// assert_eq!(check.iter_chars().next(), Some('F')); + #[allow(clippy::indexing_slicing)] // chunks + pub fn remove_set(&mut self, set: &CodePointInversionList) { + set.as_inversion_list() + .as_ule_slice() + .chunks(2) + .for_each(|pair| { + self.remove( + AsULE::from_unaligned(pair[0]), + AsULE::from_unaligned(pair[1]), + ) + }); + } + + /// Retain the specified character in the [`CodePointInversionListBuilder`] if it exists + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_range(&('A'..='Z')); + /// builder.retain_char('A'); + /// let set = builder.build(); + /// let mut check = set.iter_chars(); + /// assert_eq!(check.next(), Some('A')); + /// assert_eq!(check.next(), None); + /// ``` + pub fn retain_char(&mut self, c: char) { + let code_point = c as u32; + self.remove(0, code_point); + self.remove(code_point + 1, (char::MAX as u32) + 1); + } + + /// Retain the range of characters located within the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_range(&('A'..='Z')); + /// builder.retain_range(&('A'..='B')); + /// let set = builder.build(); + /// let mut check = set.iter_chars(); + /// assert_eq!(check.next(), Some('A')); + /// assert_eq!(check.next(), Some('B')); + /// assert_eq!(check.next(), None); + /// ``` + pub fn retain_range(&mut self, range: &impl RangeBounds<char>) { + let (start, end) = deconstruct_range(range); + self.remove(0, start); + self.remove(end, (char::MAX as u32) + 1); + } + + /// Retain the elements in the specified set within the [`CodePointInversionListBuilder`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::{ + /// CodePointInversionList, CodePointInversionListBuilder, + /// }; + /// let mut builder = CodePointInversionListBuilder::new(); + /// let set = CodePointInversionList::try_from_inversion_list_slice(&[65, 70]) + /// .unwrap(); + /// builder.add_range(&('A'..='Z')); + /// builder.retain_set(&set); // retains 'A'..='E' + /// let check = builder.build(); + /// assert!(check.contains('A')); + /// assert!(!check.contains('G')); + /// ``` + #[allow(clippy::indexing_slicing)] // chunks + pub fn retain_set(&mut self, set: &CodePointInversionList) { + let mut prev = 0; + for pair in set.as_inversion_list().as_ule_slice().chunks(2) { + let range_start = AsULE::from_unaligned(pair[0]); + let range_limit = AsULE::from_unaligned(pair[1]); + self.remove(prev, range_start); + prev = range_limit; + } + self.remove(prev, (char::MAX as u32) + 1); + } + + /// Computes the complement of the argument, adding any elements that do not yet exist in the builder, + /// and removing any elements that already exist in the builder. See public functions for examples. + /// + /// Performs in `O(B + S)`, where `B` is the number of endpoints in the Builder, and `S` is the number + /// of endpoints in the argument. + fn complement_list(&mut self, set_iter: impl core::iter::Iterator<Item = u32>) { + let mut res: Vec<u32> = vec![]; // not the biggest fan of having to allocate new memory + let mut ai = self.intervals.iter(); + let mut bi = set_iter; + let mut a = ai.next(); + let mut b = bi.next(); + while let (Some(c), Some(d)) = (a, b) { + match c.cmp(&d) { + Ordering::Less => { + res.push(*c); + a = ai.next(); + } + Ordering::Greater => { + res.push(d); + b = bi.next(); + } + Ordering::Equal => { + a = ai.next(); + b = bi.next(); + } + } + } + if let Some(c) = a { + res.push(*c) + } + if let Some(d) = b { + res.push(d) + } + res.extend(ai); + res.extend(bi); + self.intervals = res; + } + + /// Computes the complement of the builder, inverting the builder (any elements in the builder are removed, + /// while any elements not in the builder are added) + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::{ + /// CodePointInversionList, CodePointInversionListBuilder, + /// }; + /// let mut builder = CodePointInversionListBuilder::new(); + /// let set = CodePointInversionList::try_from_inversion_list_slice(&[ + /// 0x0, + /// 0x41, + /// 0x46, + /// (std::char::MAX as u32) + 1, + /// ]) + /// .unwrap(); + /// builder.add_set(&set); + /// builder.complement(); + /// let check = builder.build(); + /// assert_eq!(check.iter_chars().next(), Some('A')); + /// ``` + pub fn complement(&mut self) { + if !self.intervals.is_empty() { + #[allow(clippy::indexing_slicing)] // by invariant + if self.intervals[0] == 0 { + self.intervals.drain(0..1); + } else { + self.intervals.insert(0, 0); + } + if self.intervals.last() == Some(&(char::MAX as u32 + 1)) { + self.intervals.pop(); + } else { + self.intervals.push(char::MAX as u32 + 1); + } + } else { + self.intervals + .extend_from_slice(&[0, (char::MAX as u32 + 1)]); + } + } + + /// Complements the character in the builder, adding it if not in the builder, and removing it otherwise. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_range(&('A'..='D')); + /// builder.complement_char('A'); + /// builder.complement_char('E'); + /// let check = builder.build(); + /// assert!(check.contains('E')); + /// assert!(!check.contains('A')); + /// ``` + pub fn complement_char(&mut self, c: char) { + let code_point = c as u32; + let to_complement = [code_point, code_point + 1]; + self.complement_list(to_complement.iter().copied()); + } + + /// Complements the range in the builder, adding any elements in the range if not in the builder, and + /// removing them otherwise. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionListBuilder; + /// let mut builder = CodePointInversionListBuilder::new(); + /// builder.add_range(&('A'..='D')); + /// builder.complement_range(&('C'..='F')); + /// let check = builder.build(); + /// assert!(check.contains('F')); + /// assert!(!check.contains('C')); + /// ``` + pub fn complement_range(&mut self, range: &impl RangeBounds<char>) { + let (start, end) = deconstruct_range(range); + let to_complement = [start, end]; + self.complement_list(to_complement.iter().copied()); + } + + /// Complements the set in the builder, adding any elements in the set if not in the builder, and + /// removing them otherwise. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::{ + /// CodePointInversionList, CodePointInversionListBuilder, + /// }; + /// let mut builder = CodePointInversionListBuilder::new(); + /// let set = CodePointInversionList::try_from_inversion_list_slice(&[ + /// 0x41, 0x46, 0x4B, 0x5A, + /// ]) + /// .unwrap(); + /// builder.add_range(&('C'..='N')); // 67 - 78 + /// builder.complement_set(&set); + /// let check = builder.build(); + /// assert!(check.contains('Q')); // 81 + /// assert!(!check.contains('N')); // 78 + /// ``` + pub fn complement_set(&mut self, set: &CodePointInversionList) { + let inv_list_iter_owned = set.as_inversion_list().iter(); + self.complement_list(inv_list_iter_owned); + } + + /// Returns whether the build is empty. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::{ + /// CodePointInversionList, CodePointInversionListBuilder, + /// }; + /// let mut builder = CodePointInversionListBuilder::new(); + /// let check = builder.build(); + /// assert!(check.is_empty()); + /// ``` + pub fn is_empty(&self) -> bool { + self.intervals.is_empty() + } +} + +#[cfg(test)] +mod tests { + use super::{CodePointInversionList, CodePointInversionListBuilder}; + use core::char; + use zerovec::ZeroVec; + + fn generate_tester(ex: &[u32]) -> CodePointInversionListBuilder { + let inv_list = ZeroVec::<u32>::alloc_from_slice(ex); + let check = CodePointInversionList::try_from_inversion_list(inv_list).unwrap(); + let mut builder = CodePointInversionListBuilder::new(); + builder.add_set(&check); + builder + } + + #[test] + fn test_new() { + let ex = CodePointInversionListBuilder::new(); + assert!(ex.intervals.is_empty()); + } + + #[test] + fn test_build() { + let mut builder = CodePointInversionListBuilder::new(); + builder.add(0x41, 0x42); + let check: CodePointInversionList = builder.build(); + assert_eq!(check.iter_chars().next(), Some('A')); + } + + #[test] + fn test_empty_build() { + let builder = CodePointInversionListBuilder::new(); + let check: CodePointInversionList = builder.build(); + assert!(check.is_empty()); + } + + #[test] + fn test_add_to_empty() { + let mut builder = CodePointInversionListBuilder::new(); + builder.add(0x0, 0xA); + assert_eq!(builder.intervals, [0x0, 0xA]); + } + + #[test] + fn test_add_invalid() { + let mut builder = CodePointInversionListBuilder::new(); + builder.add(0x0, 0x0); + builder.add(0x5, 0x0); + assert!(builder.intervals.is_empty()); + } + + #[test] + fn test_add_to_start() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x0, 0x5); + let expected = [0x0, 0x5, 0xA, 0x14, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_start_overlap() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x0, 0xE); + let expected = [0x0, 0x14, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_end() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x3C, 0x46); + let expected = [0xA, 0x14, 0x28, 0x32, 60, 70]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_end_overlap() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x2B, 0x46); + let expected = [0xA, 0x14, 0x28, 0x46]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_middle_no_overlap() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x19, 0x1B); + let expected = [0xA, 0x14, 0x19, 0x1B, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_middle_inside() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0xA, 0x14); + let expected = [0xA, 0x14, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_middle_left_overlap() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0xF, 0x19); + let expected = [0xA, 0x19, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_middle_right_overlap() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x1E, 0x28); + let expected = [0xA, 0x14, 0x1E, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_full_encompass() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x0, 0x3C); + let expected = [0x0, 0x3C]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_to_partial_encompass() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x0, 0x23); + let expected = [0x0, 0x23, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_aligned_front() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(5, 10); + let expected = [5, 0x14, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_aligned_back() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x32, 0x37); + let expected = [0xA, 0x14, 0x28, 0x37]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_aligned_start_middle() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x14, 0x19); + let expected = [0xA, 0x19, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_aligned_end_middle() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x23, 0x28); + let expected = [0xA, 0x14, 0x23, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_aligned_in_between_end() { + let mut builder = generate_tester(&[0xA, 0x14, 0x1E, 0x28, 0x32, 0x3C]); + builder.add(0xF, 0x1E); + let expected = [0xA, 0x28, 0x32, 0x3C]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_aligned_in_between_start() { + let mut builder = generate_tester(&[0xA, 0x14, 0x1E, 0x28, 0x32, 0x3C]); + builder.add(20, 35); + let expected = [0xA, 0x28, 0x32, 0x3C]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_adjacent_ranges() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.add(0x13, 0x14); + builder.add(0x14, 0x15); + builder.add(0x15, 0x16); + let expected = [0xA, 0x16, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_codepointinversionlist() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + let check = CodePointInversionList::try_from_inversion_list_slice(&[ + 0x5, 0xA, 0x16, 0x21, 0x2C, 0x33, + ]) + .unwrap(); + builder.add_set(&check); + let expected = [0x5, 0x14, 0x16, 0x21, 0x28, 0x33]; + assert_eq!(builder.intervals, expected); + } + #[test] + fn test_add_char() { + let mut builder = CodePointInversionListBuilder::new(); + builder.add_char('a'); + let expected = [0x61, 0x62]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_range() { + let mut builder = CodePointInversionListBuilder::new(); + builder.add_range(&('A'..='Z')); + let expected = [0x41, 0x5B]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_range_u32() { + let mut builder = CodePointInversionListBuilder::new(); + builder.add_range_u32(&(0xd800..=0xdfff)); + let expected = [0xd800, 0xe000]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_add_invalid_range() { + let mut builder = CodePointInversionListBuilder::new(); + builder.add_range(&('Z'..='A')); + assert!(builder.intervals.is_empty()); + } + + #[test] + fn test_remove_empty() { + let mut builder = CodePointInversionListBuilder::new(); + builder.remove(0x0, 0xA); + assert!(builder.intervals.is_empty()); + } + + #[test] + fn test_remove_entire_builder() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.remove(0xA, 0x32); + assert!(builder.intervals.is_empty()); + } + + #[test] + fn test_remove_entire_range() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.remove(0xA, 0x14); + let expected = [0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_partial_range_left() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.remove(0xA, 0x2B); + let expected = [0x2B, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_ne_range() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.remove(0x14, 0x28); + let expected = [0xA, 0x14, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_partial_range_right() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.remove(0xF, 0x37); + let expected = [0xA, 0xF]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_middle_range() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.remove(0xC, 0x12); + let expected = [0xA, 0xC, 0x12, 0x14, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_ne_middle_range() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.remove(0x19, 0x1B); + let expected = [0xA, 0x14, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_encompassed_range() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32, 70, 80]); + builder.remove(0x19, 0x37); + let expected = [0xA, 0x14, 0x46, 0x50]; + assert_eq!(builder.intervals, expected); + } + #[test] + fn test_remove_adjacent_ranges() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.remove(0x27, 0x28); + builder.remove(0x28, 0x29); + builder.remove(0x29, 0x2A); + let expected = [0xA, 0x14, 0x2A, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_char() { + let mut builder = generate_tester(&[0x41, 0x46]); + builder.remove_char('A'); // 65 + let expected = [0x42, 0x46]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_range() { + let mut builder = generate_tester(&[0x41, 0x5A]); + builder.remove_range(&('A'..'L')); // 65 - 76 + let expected = [0x4C, 0x5A]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_remove_set() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32, 70, 80]); + let remove = + CodePointInversionList::try_from_inversion_list_slice(&[0xA, 0x14, 0x2D, 0x4B]) + .unwrap(); + builder.remove_set(&remove); + let expected = [0x28, 0x2D, 0x4B, 0x50]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_retain_char() { + let mut builder = generate_tester(&[0x41, 0x5A]); + builder.retain_char('A'); // 65 + let expected = [0x41, 0x42]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_retain_range() { + let mut builder = generate_tester(&[0x41, 0x5A]); + builder.retain_range(&('C'..'F')); // 67 - 70 + let expected = [0x43, 0x46]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_retain_range_empty() { + let mut builder = generate_tester(&[0x41, 0x46]); + builder.retain_range(&('F'..'Z')); + assert!(builder.intervals.is_empty()); + } + + #[test] + fn test_retain_set() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32, 70, 80]); + let retain = CodePointInversionList::try_from_inversion_list_slice(&[ + 0xE, 0x14, 0x19, 0x37, 0x4D, 0x51, + ]) + .unwrap(); + builder.retain_set(&retain); + let expected = [0xE, 0x14, 0x28, 0x32, 0x4D, 0x50]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.complement(); + let expected = [0x0, 0xA, 0x14, 0x28, 0x32, (char::MAX as u32) + 1]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement_empty() { + let mut builder = generate_tester(&[]); + builder.complement(); + let expected = [0x0, (char::MAX as u32) + 1]; + assert_eq!(builder.intervals, expected); + + builder.complement(); + let expected: [u32; 0] = []; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement_zero_max() { + let mut builder = generate_tester(&[0x0, 0xA, 0x5A, (char::MAX as u32) + 1]); + builder.complement(); + let expected = [0xA, 0x5A]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement_interior() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.complement_list([0xE, 0x14].iter().copied()); + let expected = [0xA, 0xE, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement_exterior() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.complement_list([0x19, 0x23].iter().copied()); + let expected = [0xA, 0x14, 0x19, 0x23, 0x28, 0x32]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement_larger_list() { + let mut builder = generate_tester(&[0xA, 0x14, 0x28, 0x32]); + builder.complement_list([0x1E, 0x37, 0x3C, 0x46].iter().copied()); + let expected = [0xA, 0x14, 0x1E, 0x28, 0x32, 0x37, 0x3C, 0x46]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement_char() { + let mut builder = generate_tester(&[0x41, 0x4C]); // A - K + builder.complement_char('A'); + builder.complement_char('L'); + let expected = [0x42, 0x4D]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement_range() { + let mut builder = generate_tester(&[0x46, 0x4C]); // F - K + builder.complement_range(&('A'..='Z')); + let expected = [0x41, 0x46, 0x4C, 0x5B]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_complement_set() { + let mut builder = generate_tester(&[0x43, 0x4E]); + let set = CodePointInversionList::try_from_inversion_list_slice(&[0x41, 0x46, 0x4B, 0x5A]) + .unwrap(); + builder.complement_set(&set); + let expected = [0x41, 0x43, 0x46, 0x4B, 0x4E, 0x5A]; + assert_eq!(builder.intervals, expected); + } + + #[test] + fn test_is_empty() { + let builder = CodePointInversionListBuilder::new(); + assert!(builder.is_empty()); + } +} diff --git a/third_party/rust/icu_collections/src/codepointinvlist/conversions.rs b/third_party/rust/icu_collections/src/codepointinvlist/conversions.rs new file mode 100644 index 0000000000..0f56b9ac71 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/conversions.rs @@ -0,0 +1,184 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use core::{ + convert::TryFrom, + iter::FromIterator, + ops::{Range, RangeBounds, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive}, +}; + +use super::CodePointInversionListError; +use crate::codepointinvlist::utils::deconstruct_range; +use crate::codepointinvlist::{CodePointInversionList, CodePointInversionListBuilder}; +use zerovec::ZeroVec; + +fn try_from_range<'data>( + range: &impl RangeBounds<char>, +) -> Result<CodePointInversionList<'data>, CodePointInversionListError> { + let (from, till) = deconstruct_range(range); + if from < till { + let set = [from, till]; + let inv_list: ZeroVec<u32> = ZeroVec::alloc_from_slice(&set); + #[allow(clippy::unwrap_used)] // valid + Ok(CodePointInversionList::try_from_inversion_list(inv_list).unwrap()) + } else { + Err(CodePointInversionListError::InvalidRange(from, till)) + } +} + +impl<'data> TryFrom<&Range<char>> for CodePointInversionList<'data> { + type Error = CodePointInversionListError; + + fn try_from(range: &Range<char>) -> Result<Self, Self::Error> { + try_from_range(range) + } +} + +impl<'data> TryFrom<&RangeFrom<char>> for CodePointInversionList<'data> { + type Error = CodePointInversionListError; + + fn try_from(range: &RangeFrom<char>) -> Result<Self, Self::Error> { + try_from_range(range) + } +} + +impl<'data> TryFrom<&RangeFull> for CodePointInversionList<'data> { + type Error = CodePointInversionListError; + + fn try_from(_: &RangeFull) -> Result<Self, Self::Error> { + Ok(Self::all()) + } +} + +impl<'data> TryFrom<&RangeInclusive<char>> for CodePointInversionList<'data> { + type Error = CodePointInversionListError; + + fn try_from(range: &RangeInclusive<char>) -> Result<Self, Self::Error> { + try_from_range(range) + } +} + +impl<'data> TryFrom<&RangeTo<char>> for CodePointInversionList<'data> { + type Error = CodePointInversionListError; + + fn try_from(range: &RangeTo<char>) -> Result<Self, Self::Error> { + try_from_range(range) + } +} + +impl<'data> TryFrom<&RangeToInclusive<char>> for CodePointInversionList<'data> { + type Error = CodePointInversionListError; + + fn try_from(range: &RangeToInclusive<char>) -> Result<Self, Self::Error> { + try_from_range(range) + } +} + +impl FromIterator<RangeInclusive<u32>> for CodePointInversionList<'_> { + fn from_iter<I: IntoIterator<Item = RangeInclusive<u32>>>(iter: I) -> Self { + let mut builder = CodePointInversionListBuilder::new(); + for range in iter { + builder.add_range_u32(&range); + } + builder.build() + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::codepointinvlist::CodePointInversionList; + use core::{char, convert::TryFrom}; + + #[test] + fn test_try_from_range() { + let check: Vec<char> = CodePointInversionList::try_from(&('A'..'B')) + .unwrap() + .iter_chars() + .collect(); + assert_eq!(vec!['A'], check); + } + + #[test] + fn test_try_from_range_error() { + let check = CodePointInversionList::try_from(&('A'..'A')); + assert!(matches!( + check, + Err(CodePointInversionListError::InvalidRange(65, 65)) + )); + } + + #[test] + fn test_try_from_range_inclusive() { + let check: Vec<char> = CodePointInversionList::try_from(&('A'..='A')) + .unwrap() + .iter_chars() + .collect(); + assert_eq!(vec!['A'], check); + } + + #[test] + fn test_try_from_range_inclusive_err() { + let check = CodePointInversionList::try_from(&('B'..'A')); + assert!(matches!( + check, + Err(CodePointInversionListError::InvalidRange(66, 65)) + )); + } + + #[test] + fn test_try_from_range_from() { + let uset = CodePointInversionList::try_from(&('A'..)).unwrap(); + let check: usize = uset.size(); + let expected: usize = (char::MAX as usize) + 1 - 65; + assert_eq!(expected, check); + } + + #[test] + fn test_try_from_range_to() { + let uset = CodePointInversionList::try_from(&(..'A')).unwrap(); + let check: usize = uset.size(); + let expected: usize = 65; + assert_eq!(expected, check); + } + + #[test] + fn test_try_from_range_to_err() { + let check = CodePointInversionList::try_from(&(..(0x0 as char))); + assert!(matches!( + check, + Err(CodePointInversionListError::InvalidRange(0, 0)) + )); + } + + #[test] + fn test_try_from_range_to_inclusive() { + let uset = CodePointInversionList::try_from(&(..='A')).unwrap(); + let check: usize = uset.size(); + let expected: usize = 66; + assert_eq!(expected, check); + } + + #[test] + fn test_try_from_range_full() { + let uset = CodePointInversionList::try_from(&(..)).unwrap(); + let check: usize = uset.size(); + let expected: usize = (char::MAX as usize) + 1; + assert_eq!(expected, check); + } + + #[test] + fn test_from_range_iterator() { + let ranges = [ + RangeInclusive::new(0, 0x3FFF), + RangeInclusive::new(0x4000, 0x7FFF), + RangeInclusive::new(0x8000, 0xBFFF), + RangeInclusive::new(0xC000, 0xFFFF), + ]; + let expected = + CodePointInversionList::try_from_inversion_list_slice(&[0x0, 0x1_0000]).unwrap(); + let actual = CodePointInversionList::from_iter(ranges); + assert_eq!(expected, actual); + } +} diff --git a/third_party/rust/icu_collections/src/codepointinvlist/cpinvlist.rs b/third_party/rust/icu_collections/src/codepointinvlist/cpinvlist.rs new file mode 100644 index 0000000000..759a31d056 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/cpinvlist.rs @@ -0,0 +1,1073 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +#[cfg(feature = "serde")] +use alloc::format; +#[cfg(feature = "serde")] +use alloc::string::String; +use alloc::vec::Vec; +use core::{char, ops::RangeBounds, ops::RangeInclusive}; +use yoke::Yokeable; +use zerofrom::ZeroFrom; +use zerovec::{ule::AsULE, zerovec, ZeroVec}; + +use super::CodePointInversionListError; +use crate::codepointinvlist::utils::{deconstruct_range, is_valid_zv}; + +/// Represents the end code point of the Basic Multilingual Plane range, starting from code point 0, inclusive +const BMP_MAX: u32 = 0xFFFF; + +/// Represents the inversion list for a set of all code points in the Basic Multilingual Plane. +const BMP_INV_LIST_VEC: ZeroVec<u32> = + zerovec!(u32; <u32 as AsULE>::ULE::from_unsigned; [0x0, BMP_MAX + 1]); + +/// Represents the inversion list for all of the code points in the Unicode range. +const ALL_VEC: ZeroVec<u32> = + zerovec!(u32; <u32 as AsULE>::ULE::from_unsigned; [0x0, (char::MAX as u32) + 1]); + +/// A membership wrapper for [`CodePointInversionList`]. +/// +/// Provides exposure to membership functions and constructors from serialized `CodePointSet`s (sets of code points) +/// and predefined ranges. +#[zerovec::make_varule(CodePointInversionListULE)] +#[zerovec::skip_derive(Ord)] +#[zerovec::derive(Debug)] +#[derive(Debug, Eq, PartialEq, Clone, Yokeable, ZeroFrom)] +pub struct CodePointInversionList<'data> { + // If we wanted to use an array to keep the memory on the stack, there is an unsafe nightly feature + // https://doc.rust-lang.org/nightly/core/array/trait.FixedSizeArray.html + // Allows for traits of fixed size arrays + + // Implements an [inversion list.](https://en.wikipedia.org/wiki/Inversion_list) + inv_list: ZeroVec<'data, u32>, + size: u32, +} + +#[cfg(feature = "serde")] +impl<'de: 'a, 'a> serde::Deserialize<'de> for CodePointInversionList<'a> { + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + use serde::de::Error; + + let parsed_inv_list = if deserializer.is_human_readable() { + #[derive(serde::Deserialize)] + #[serde(untagged)] + pub enum De<'data> { + // TODO(#2856): Remove in ICU4X 2.0 + #[serde(borrow)] + OldStyle(ZeroVec<'data, u32>), + #[serde(borrow)] + NewStyle(Vec<alloc::borrow::Cow<'data, str>>), + } + + match De::<'de>::deserialize(deserializer)? { + De::OldStyle(parsed_inv_list) => parsed_inv_list, + De::NewStyle(parsed_strings) => { + let mut inv_list = + ZeroVec::new_owned(Vec::with_capacity(parsed_strings.len() * 2)); + for range in parsed_strings { + fn internal(range: &str) -> Option<(u32, u32)> { + let (start, range) = UnicodeCodePoint::parse(range)?; + if range.is_empty() { + return Some((start.0, start.0)); + } + let (hyphen, range) = UnicodeCodePoint::parse(range)?; + if hyphen.0 != '-' as u32 { + return None; + } + let (end, range) = UnicodeCodePoint::parse(range)?; + range.is_empty().then_some((start.0, end.0)) + } + let (start, end) = internal(&range).ok_or_else(|| Error::custom(format!( + "Cannot deserialize invalid inversion list for CodePointInversionList: {range:?}" + )))?; + inv_list.with_mut(|v| { + v.push(start.to_unaligned()); + v.push((end + 1).to_unaligned()); + }); + } + inv_list + } + } + } else { + ZeroVec::<u32>::deserialize(deserializer)? + }; + CodePointInversionList::try_from_inversion_list(parsed_inv_list).map_err(|e| { + Error::custom(format!( + "Cannot deserialize invalid inversion list for CodePointInversionList: {e:?}" + )) + }) + } +} + +#[cfg(feature = "databake")] +impl databake::Bake for CodePointInversionList<'_> { + fn bake(&self, env: &databake::CrateEnv) -> databake::TokenStream { + env.insert("icu_collections"); + let inv_list = self.inv_list.bake(env); + let size = self.size.bake(env); + // Safe because our parts are safe. + databake::quote! { unsafe { + #[allow(unused_unsafe)] + icu_collections::codepointinvlist::CodePointInversionList::from_parts_unchecked(#inv_list, #size) + }} + } +} + +#[cfg(feature = "serde")] +#[derive(Debug, Copy, Clone)] +struct UnicodeCodePoint(u32); + +#[cfg(feature = "serde")] +impl UnicodeCodePoint { + fn from_u32(cp: u32) -> Result<Self, String> { + if cp <= char::MAX as u32 { + Ok(Self(cp)) + } else { + Err(format!("Not a Unicode code point {}", cp)) + } + } + + fn parse(value: &str) -> Option<(Self, &str)> { + Some(if let Some(hex) = value.strip_prefix("U+") { + let (escape, remainder) = (hex.get(..4)?, hex.get(4..)?); + (Self(u32::from_str_radix(escape, 16).ok()?), remainder) + } else { + let c = value.chars().next()?; + (Self(c as u32), value.get(c.len_utf8()..)?) + }) + } +} + +#[cfg(feature = "serde")] +impl core::fmt::Display for UnicodeCodePoint { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self.0 { + s @ 0xD800..=0xDFFF => write!(f, "U+{s:X}"), + // SAFETY: c <= char::MAX by construction, and not a surrogate + c => write!(f, "{}", unsafe { char::from_u32_unchecked(c) }), + } + } +} + +#[cfg(feature = "serde")] +impl<'data> serde::Serialize for CodePointInversionList<'data> { + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + if serializer.is_human_readable() { + use serde::ser::Error; + use serde::ser::SerializeSeq; + let mut seq = serializer.serialize_seq(Some(self.inv_list.len() / 2))?; + for range in self.iter_ranges() { + let start = UnicodeCodePoint::from_u32(*range.start()).map_err(S::Error::custom)?; + if range.start() == range.end() { + seq.serialize_element(&format!("{start}"))?; + } else { + let end = UnicodeCodePoint::from_u32(*range.end()).map_err(S::Error::custom)?; + seq.serialize_element(&format!("{start}-{end}",))?; + } + } + seq.end() + } else { + // Note: serde(flatten) currently does not promote a struct field of type Vec + // to replace the struct when serializing. The error message from the default + // serialization is: "can only flatten structs and maps (got a sequence)". + self.inv_list.serialize(serializer) + } + } +} + +impl<'data> CodePointInversionList<'data> { + /// Returns a new [`CodePointInversionList`] from an [inversion list](https://en.wikipedia.org/wiki/Inversion_list) + /// represented as a [`ZeroVec`]`<`[`u32`]`>` of code points. + /// + /// The inversion list must be of even length, sorted ascending non-overlapping, + /// and within the bounds of `0x0 -> 0x10FFFF` inclusive, and end points being exclusive. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use icu_collections::codepointinvlist::CodePointInversionListError; + /// use zerovec::ZeroVec; + /// let valid = [0x0, 0x10000]; + /// let inv_list: ZeroVec<u32> = ZeroVec::from_slice_or_alloc(&valid); + /// let result = CodePointInversionList::try_from_inversion_list(inv_list); + /// assert!(matches!(result, CodePointInversionList)); + /// + /// let invalid: Vec<u32> = vec![0x0, 0x80, 0x3]; + /// let inv_list: ZeroVec<u32> = ZeroVec::from_slice_or_alloc(&invalid); + /// let result = CodePointInversionList::try_from_inversion_list(inv_list); + /// assert!(matches!( + /// result, + /// Err(CodePointInversionListError::InvalidSet(_)) + /// )); + /// if let Err(CodePointInversionListError::InvalidSet(actual)) = result { + /// assert_eq!(&invalid, &actual); + /// } + /// ``` + pub fn try_from_inversion_list( + inv_list: ZeroVec<'data, u32>, + ) -> Result<Self, CodePointInversionListError> { + #[allow(clippy::indexing_slicing)] // chunks + if is_valid_zv(&inv_list) { + let size = inv_list + .as_ule_slice() + .chunks(2) + .map(|end_points| { + <u32 as AsULE>::from_unaligned(end_points[1]) + - <u32 as AsULE>::from_unaligned(end_points[0]) + }) + .sum::<u32>(); + Ok(Self { inv_list, size }) + } else { + Err(CodePointInversionListError::InvalidSet(inv_list.to_vec())) + } + } + + #[doc(hidden)] // databake internal + pub const unsafe fn from_parts_unchecked(inv_list: ZeroVec<'data, u32>, size: u32) -> Self { + Self { inv_list, size } + } + + /// Returns a new [`CodePointInversionList`] by borrowing an [inversion list](https://en.wikipedia.org/wiki/Inversion_list) + /// represented as a slice of [`u32`] code points. + /// + /// The inversion list must be of even length, sorted ascending non-overlapping, + /// and within the bounds of `0x0 -> 0x10FFFF` inclusive, and end points being exclusive. + /// + /// Note: The slice may be cloned on certain platforms; for more information, see [`ZeroVec::from_slice_or_alloc`]. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use icu_collections::codepointinvlist::CodePointInversionListError; + /// use zerovec::ZeroVec; + /// let valid = [0x0, 0x10000]; + /// let result = CodePointInversionList::try_from_inversion_list_slice(&valid); + /// assert!(matches!(result, CodePointInversionList)); + /// + /// let invalid: Vec<u32> = vec![0x0, 0x80, 0x3]; + /// let result = + /// CodePointInversionList::try_from_inversion_list_slice(&invalid); + /// assert!(matches!( + /// result, + /// Err(CodePointInversionListError::InvalidSet(_)) + /// )); + /// if let Err(CodePointInversionListError::InvalidSet(actual)) = result { + /// assert_eq!(&invalid, &actual); + /// } + /// ``` + pub fn try_from_inversion_list_slice( + inv_list: &'data [u32], + ) -> Result<Self, CodePointInversionListError> { + let inv_list_zv: ZeroVec<u32> = ZeroVec::from_slice_or_alloc(inv_list); + CodePointInversionList::try_from_inversion_list(inv_list_zv) + } + + /// Returns a new, fully-owned [`CodePointInversionList`] by cloning an [inversion list](https://en.wikipedia.org/wiki/Inversion_list) + /// represented as a slice of [`u32`] code points. + /// + /// The inversion list must be of even length, sorted ascending non-overlapping, + /// and within the bounds of `0x0 -> 0x10FFFF` inclusive, and end points being exclusive. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use std::vec::Vec; + /// use zerovec::ZeroVec; + /// + /// let bmp_list = &[0x0, 0x10000]; + /// let smp_list = &[0x10000, 0x20000]; + /// let sip_list = &[0x20000, 0x30000]; + /// + /// let lists: Vec<CodePointInversionList> = + /// [&bmp_list[..], smp_list, sip_list] + /// .into_iter() + /// .map(|l| { + /// CodePointInversionList::try_clone_from_inversion_list_slice(l) + /// .unwrap() + /// }) + /// .collect(); + /// + /// let bmp = &lists[0]; + /// assert!(bmp.contains32(0xFFFF)); + /// assert!(!bmp.contains32(0x10000)); + /// + /// assert!(!lists.iter().any(|set| set.contains32(0x40000))); + /// ``` + pub fn try_clone_from_inversion_list_slice( + inv_list: &[u32], + ) -> Result<Self, CodePointInversionListError> { + let inv_list_zv: ZeroVec<u32> = ZeroVec::alloc_from_slice(inv_list); + CodePointInversionList::try_from_inversion_list(inv_list_zv) + } + + /// Attempts to convert this list into a fully-owned one. No-op if already fully owned + pub fn into_owned(self) -> CodePointInversionList<'static> { + CodePointInversionList { + inv_list: self.inv_list.into_owned(), + size: self.size, + } + } + + /// Returns an owned inversion list representing the current [`CodePointInversionList`] + pub fn get_inversion_list_vec(&self) -> Vec<u32> { + let result: Vec<u32> = self.as_inversion_list().to_vec(); // Only crate public, to not leak impl + result + } + + /// Returns [`CodePointInversionList`] spanning entire Unicode range + /// + /// The range spans from `0x0 -> 0x10FFFF` inclusive. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use zerovec::ZeroVec; + /// + /// let expected = [0x0, (char::MAX as u32) + 1]; + /// assert_eq!( + /// CodePointInversionList::all().get_inversion_list_vec(), + /// expected + /// ); + /// assert_eq!( + /// CodePointInversionList::all().size(), + /// (expected[1] - expected[0]) as usize + /// ); + /// ``` + pub fn all() -> Self { + Self { + inv_list: ALL_VEC, + size: (char::MAX as u32) + 1, + } + } + + /// Returns [`CodePointInversionList`] spanning BMP range + /// + /// The range spans from `0x0 -> 0xFFFF` inclusive. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use zerovec::ZeroVec; + /// + /// const BMP_MAX: u32 = 0xFFFF; + /// + /// let expected = [0x0, BMP_MAX + 1]; + /// assert_eq!( + /// CodePointInversionList::bmp().get_inversion_list_vec(), + /// expected + /// ); + /// assert_eq!( + /// CodePointInversionList::bmp().size(), + /// (expected[1] - expected[0]) as usize + /// ); + /// ``` + pub fn bmp() -> Self { + Self { + inv_list: BMP_INV_LIST_VEC, + size: BMP_MAX + 1, + } + } + + /// Returns the inversion list as a slice + /// + /// Public only to the crate, not exposed to public + pub(crate) fn as_inversion_list(&self) -> &ZeroVec<u32> { + &self.inv_list + } + + /// Yields an [`Iterator`] going through the character set in the [`CodePointInversionList`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x44, 0x45, 0x46]; + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// let mut ex_iter_chars = example.iter_chars(); + /// assert_eq!(Some('A'), ex_iter_chars.next()); + /// assert_eq!(Some('B'), ex_iter_chars.next()); + /// assert_eq!(Some('C'), ex_iter_chars.next()); + /// assert_eq!(Some('E'), ex_iter_chars.next()); + /// assert_eq!(None, ex_iter_chars.next()); + /// ``` + pub fn iter_chars(&self) -> impl Iterator<Item = char> + '_ { + #[allow(clippy::indexing_slicing)] // chunks + self.inv_list + .as_ule_slice() + .chunks(2) + .flat_map(|pair| (AsULE::from_unaligned(pair[0])..AsULE::from_unaligned(pair[1]))) + .filter_map(char::from_u32) + } + + /// Yields an [`Iterator`] returning the ranges of the code points that are + /// included in the [`CodePointInversionList`] + /// + /// Ranges are returned as [`RangeInclusive`], which is inclusive of its + /// `end` bound value. An end-inclusive behavior matches the ICU4C/J + /// behavior of ranges, ex: `CodePointInversionList::contains(UChar32 start, UChar32 end)`. + /// + /// # Example + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x44, 0x45, 0x46]; + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// let mut example_iter_ranges = example.iter_ranges(); + /// assert_eq!(Some(0x41..=0x43), example_iter_ranges.next()); + /// assert_eq!(Some(0x45..=0x45), example_iter_ranges.next()); + /// assert_eq!(None, example_iter_ranges.next()); + /// ``` + pub fn iter_ranges(&self) -> impl ExactSizeIterator<Item = RangeInclusive<u32>> + '_ { + #[allow(clippy::indexing_slicing)] // chunks + self.inv_list.as_ule_slice().chunks(2).map(|pair| { + let range_start: u32 = AsULE::from_unaligned(pair[0]); + let range_limit: u32 = AsULE::from_unaligned(pair[1]); + RangeInclusive::new(range_start, range_limit - 1) + }) + } + + /// Yields an [`Iterator`] returning the ranges of the code points that are + /// *not* included in the [`CodePointInversionList`] + /// + /// Ranges are returned as [`RangeInclusive`], which is inclusive of its + /// `end` bound value. An end-inclusive behavior matches the ICU4C/J + /// behavior of ranges, ex: `CodePointInversionList::contains(UChar32 start, UChar32 end)`. + /// + /// # Example + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x44, 0x45, 0x46]; + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// let mut example_iter_ranges = example.iter_ranges_complemented(); + /// assert_eq!(Some(0..=0x40), example_iter_ranges.next()); + /// assert_eq!(Some(0x44..=0x44), example_iter_ranges.next()); + /// assert_eq!(Some(0x46..=char::MAX as u32), example_iter_ranges.next()); + /// assert_eq!(None, example_iter_ranges.next()); + /// ``` + pub fn iter_ranges_complemented(&self) -> impl Iterator<Item = RangeInclusive<u32>> + '_ { + let inv_ule = self.inv_list.as_ule_slice(); + let middle = inv_ule.get(1..inv_ule.len() - 1).unwrap_or(&[]); + let beginning = if let Some(first) = self.inv_list.first() { + if first == 0 { + None + } else { + Some(0..=first - 1) + } + } else { + None + }; + let end = if let Some(last) = self.inv_list.last() { + if last == char::MAX as u32 { + None + } else { + Some(last..=char::MAX as u32) + } + } else { + None + }; + #[allow(clippy::indexing_slicing)] // chunks + let chunks = middle.chunks(2).map(|pair| { + let range_start: u32 = AsULE::from_unaligned(pair[0]); + let range_limit: u32 = AsULE::from_unaligned(pair[1]); + RangeInclusive::new(range_start, range_limit - 1) + }); + beginning.into_iter().chain(chunks).chain(end) + } + + /// Returns the number of ranges contained in this [`CodePointInversionList`] + pub fn get_range_count(&self) -> usize { + self.inv_list.len() / 2 + } + + /// Returns a specific range contained in this [`CodePointInversionList`] by index. + /// Intended for use in FFI. + pub fn get_nth_range(&self, idx: usize) -> Option<RangeInclusive<u32>> { + let start_idx = idx * 2; + let end_idx = start_idx + 1; + let start = self.inv_list.get(start_idx)?; + let end = self.inv_list.get(end_idx)?; + Some(RangeInclusive::new(start, end - 1)) + } + + /// Returns the number of elements of the [`CodePointInversionList`] + pub fn size(&self) -> usize { + if self.is_empty() { + return 0; + } + self.size as usize + } + + /// Returns whether or not the [`CodePointInversionList`] is empty + pub fn is_empty(&self) -> bool { + self.inv_list.is_empty() + } + + /// Wrapper for contains + /// + /// Returns an [`Option`] as to whether or not it is possible for the query to be contained. + /// The value in the [`Option`] is the start index of the range that contains the query. + fn contains_query(&self, query: u32) -> Option<usize> { + match self.inv_list.binary_search(&query) { + Ok(pos) => { + if pos % 2 == 0 { + Some(pos) + } else { + None + } + } + Err(pos) => { + if pos % 2 != 0 && pos < self.inv_list.len() { + Some(pos - 1) + } else { + None + } + } + } + } + + /// Checks to see the query is in the [`CodePointInversionList`] + /// + /// Runs a binary search in `O(log(n))` where `n` is the number of start and end points + /// in the set using [`core`] implementation + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x43, 0x44, 0x45]; + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// assert!(example.contains('A')); + /// assert!(!example.contains('C')); + /// ``` + pub fn contains(&self, query: char) -> bool { + self.contains_query(query as u32).is_some() + } + + /// Checks to see the unsigned int is in the [`CodePointInversionList::all()`](CodePointInversionList::all()) + /// + /// Note: Even though [`u32`] and [`prim@char`] in Rust are non-negative 4-byte + /// values, there is an important difference. A [`u32`] can take values up to + /// a very large integer value, while a [`prim@char`] in Rust is defined to be in + /// the range from 0 to the maximum valid Unicode Scalar Value. + /// + /// Runs a binary search in `O(log(n))` where `n` is the number of start and end points + /// in the set using [`core`] implementation + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x43, 0x44, 0x45]; + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// assert!(example.contains32(0x41)); + /// assert!(!example.contains32(0x43)); + /// ``` + pub fn contains32(&self, query: u32) -> bool { + self.contains_query(query).is_some() + } + + /// Checks to see if the range is in the [`CodePointInversionList`] + /// + /// Runs a binary search in `O(log(n))` where `n` is the number of start and end points + /// in the set using [`Vec`] implementation. Only runs the search once on the `start` + /// parameter, while the `end` parameter is checked in a single `O(1)` step. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x43, 0x44, 0x45]; + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// assert!(example.contains_range(&('A'..'C'))); + /// assert!(example.contains_range(&('A'..='B'))); + /// assert!(!example.contains_range(&('A'..='C'))); + /// ``` + /// + /// Surrogate points (`0xD800 -> 0xDFFF`) will return [`false`] if the Range contains them but the + /// [`CodePointInversionList`] does not. + /// + /// Note: when comparing to ICU4C/J, keep in mind that `Range`s in Rust are + /// constructed inclusive of start boundary and exclusive of end boundary. + /// The ICU4C/J `CodePointInversionList::contains(UChar32 start, UChar32 end)` method + /// differs by including the end boundary. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use std::char; + /// let check = + /// char::from_u32(0xD7FE).unwrap()..char::from_u32(0xE001).unwrap(); + /// let example_list = [0xD7FE, 0xD7FF, 0xE000, 0xE001]; + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// assert!(!example.contains_range(&(check))); + /// ``` + pub fn contains_range(&self, range: &impl RangeBounds<char>) -> bool { + let (from, till) = deconstruct_range(range); + if from >= till { + return false; + } + match self.contains_query(from) { + Some(pos) => { + if let Some(x) = self.inv_list.get(pos + 1) { + (till) <= x + } else { + debug_assert!( + false, + "Inversion list query should not return out of bounds index" + ); + false + } + } + None => false, + } + } + + /// Check if the calling [`CodePointInversionList`] contains all the characters of the given [`CodePointInversionList`] + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x46, 0x55, 0x5B]; // A - E, U - Z + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// let a_to_d = + /// CodePointInversionList::try_from_inversion_list_slice(&[0x41, 0x45]) + /// .unwrap(); + /// let f_to_t = + /// CodePointInversionList::try_from_inversion_list_slice(&[0x46, 0x55]) + /// .unwrap(); + /// let r_to_x = + /// CodePointInversionList::try_from_inversion_list_slice(&[0x52, 0x58]) + /// .unwrap(); + /// assert!(example.contains_set(&a_to_d)); // contains all + /// assert!(!example.contains_set(&f_to_t)); // contains none + /// assert!(!example.contains_set(&r_to_x)); // contains some + /// ``` + pub fn contains_set(&self, set: &Self) -> bool { + if set.size() > self.size() { + return false; + } + + let mut set_ranges = set.iter_ranges(); + let mut check_elem = set_ranges.next(); + + let ranges = self.iter_ranges(); + for range in ranges { + match check_elem { + Some(ref check_range) => { + if check_range.start() >= range.start() + && check_range.end() <= &(range.end() + 1) + { + check_elem = set_ranges.next(); + } + } + _ => break, + } + } + check_elem.is_none() + } + + /// Returns the end of the initial substring where the characters are either contained/not contained + /// in the set. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x44]; // {A, B, C} + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// assert_eq!(example.span("CABXYZ", true), 3); + /// assert_eq!(example.span("XYZC", false), 3); + /// assert_eq!(example.span("XYZ", true), 0); + /// assert_eq!(example.span("ABC", false), 0); + /// ``` + pub fn span(&self, span_str: &str, contained: bool) -> usize { + span_str + .chars() + .take_while(|&x| self.contains(x) == contained) + .count() + } + + /// Returns the start of the trailing substring (starting from end of string) where the characters are + /// either contained/not contained in the set. Returns the length of the string if no valid return. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// let example_list = [0x41, 0x44]; // {A, B, C} + /// let example = + /// CodePointInversionList::try_from_inversion_list_slice(&example_list) + /// .unwrap(); + /// assert_eq!(example.span_back("XYZCAB", true), 3); + /// assert_eq!(example.span_back("ABCXYZ", true), 6); + /// assert_eq!(example.span_back("CABXYZ", false), 3); + /// ``` + pub fn span_back(&self, span_str: &str, contained: bool) -> usize { + span_str.len() + - span_str + .chars() + .rev() + .take_while(|&x| self.contains(x) == contained) + .count() + } +} + +#[cfg(test)] +mod tests { + use super::{CodePointInversionList, CodePointInversionListError}; + use std::{char, vec::Vec}; + use zerovec::ZeroVec; + + #[test] + fn test_codepointinversionlist_try_from_vec() { + let ex = vec![0x2, 0x3, 0x4, 0x5]; + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert_eq!(ex, check.get_inversion_list_vec()); + assert_eq!(2, check.size()); + } + + #[test] + fn test_codepointinversionlist_try_from_vec_error() { + let check = vec![0x1, 0x1, 0x2, 0x3, 0x4]; + let inv_list = ZeroVec::from_slice_or_alloc(&check); + let set = CodePointInversionList::try_from_inversion_list(inv_list); + assert!(matches!( + set, + Err(CodePointInversionListError::InvalidSet(_)) + )); + if let Err(CodePointInversionListError::InvalidSet(actual)) = set { + assert_eq!(&check, &actual); + } + } + + // CodePointInversionList membership functions + #[test] + fn test_codepointinversionlist_contains_query() { + let ex = vec![0x41, 0x46, 0x4B, 0x55]; + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert!(check.contains_query(0x40).is_none()); + assert_eq!(check.contains_query(0x41).unwrap(), 0); + assert_eq!(check.contains_query(0x44).unwrap(), 0); + assert!(check.contains_query(0x46).is_none()); + assert_eq!(check.contains_query(0x4C).unwrap(), 2); + assert!(check.contains_query(0x56).is_none()); + } + + #[test] + fn test_codepointinversionlist_contains() { + let ex = vec![0x2, 0x5, 0xA, 0xF]; + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert!(check.contains(0x2 as char)); + assert!(check.contains(0x4 as char)); + assert!(check.contains(0xA as char)); + assert!(check.contains(0xE as char)); + } + + #[test] + fn test_codepointinversionlist_contains_false() { + let ex = vec![0x2, 0x5, 0xA, 0xF]; + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert!(!check.contains(0x1 as char)); + assert!(!check.contains(0x5 as char)); + assert!(!check.contains(0x9 as char)); + assert!(!check.contains(0xF as char)); + assert!(!check.contains(0x10 as char)); + } + + #[test] + fn test_codepointinversionlist_contains_range() { + let ex = vec![0x41, 0x46, 0x4B, 0x55]; + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert!(check.contains_range(&('A'..='E'))); // 65 - 69 + assert!(check.contains_range(&('C'..'D'))); // 67 - 67 + assert!(check.contains_range(&('L'..'P'))); // 76 - 80 + assert!(!check.contains_range(&('L'..='U'))); // 76 - 85 + } + + #[test] + fn test_codepointinversionlist_contains_range_false() { + let ex = vec![0x41, 0x46, 0x4B, 0x55]; + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert!(!check.contains_range(&('!'..'A'))); // 33 - 65 + assert!(!check.contains_range(&('F'..'K'))); // 70 - 74 + assert!(!check.contains_range(&('U'..))); // 85 - .. + } + + #[test] + fn test_codepointinversionlist_contains_range_invalid() { + let check = CodePointInversionList::all(); + assert!(!check.contains_range(&('A'..'!'))); // 65 - 33 + assert!(!check.contains_range(&('A'..'A'))); // 65 - 65 + } + + #[test] + fn test_codepointinversionlist_contains_set_u() { + let ex = vec![0xA, 0x14, 0x28, 0x32, 0x46, 0x50, 0x64, 0x6E]; + let u = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + let inside = vec![0xF, 0x14, 0x2C, 0x31, 0x46, 0x50, 0x64, 0x6D]; + let s = CodePointInversionList::try_from_inversion_list_slice(&inside).unwrap(); + assert!(u.contains_set(&s)); + } + + #[test] + fn test_codepointinversionlist_contains_set_u_false() { + let ex = vec![0xA, 0x14, 0x28, 0x32, 0x46, 0x50, 0x64, 0x78]; + let u = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + let outside = vec![0x0, 0xA, 0x16, 0x2C, 0x32, 0x46, 0x4F, 0x51, 0x6D, 0x6F]; + let s = CodePointInversionList::try_from_inversion_list_slice(&outside).unwrap(); + assert!(!u.contains_set(&s)); + } + + #[test] + fn test_codepointinversionlist_size() { + let ex = vec![0x2, 0x5, 0xA, 0xF]; + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert_eq!(8, check.size()); + let check = CodePointInversionList::all(); + let expected = (char::MAX as u32) + 1; + assert_eq!(expected as usize, check.size()); + let inv_list_vec: Vec<u32> = vec![]; + let check = CodePointInversionList { + inv_list: ZeroVec::from_slice_or_alloc(&inv_list_vec), + size: 0, + }; + assert_eq!(check.size(), 0); + } + + #[test] + fn test_codepointinversionlist_is_empty() { + let inv_list_vec: Vec<u32> = vec![]; + let check = CodePointInversionList { + inv_list: ZeroVec::from_slice_or_alloc(&inv_list_vec), + size: 0, + }; + assert!(check.is_empty()); + } + + #[test] + fn test_codepointinversionlist_is_not_empty() { + let check = CodePointInversionList::all(); + assert!(!check.is_empty()); + } + + #[test] + fn test_codepointinversionlist_iter_chars() { + let ex = vec![0x41, 0x44, 0x45, 0x46, 0xD800, 0xD801]; + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + let mut iter = check.iter_chars(); + assert_eq!(Some('A'), iter.next()); + assert_eq!(Some('B'), iter.next()); + assert_eq!(Some('C'), iter.next()); + assert_eq!(Some('E'), iter.next()); + assert_eq!(None, iter.next()); + } + + #[test] + fn test_codepointinversionlist_iter_ranges() { + let ex = vec![0x41, 0x44, 0x45, 0x46, 0xD800, 0xD801]; + let set = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + let mut ranges = set.iter_ranges(); + assert_eq!(Some(0x41..=0x43), ranges.next()); + assert_eq!(Some(0x45..=0x45), ranges.next()); + assert_eq!(Some(0xD800..=0xD800), ranges.next()); + assert_eq!(None, ranges.next()); + } + + #[test] + fn test_codepointinversionlist_iter_ranges_exactsizeiter_trait() { + let ex = vec![0x41, 0x44, 0x45, 0x46, 0xD800, 0xD801]; + let set = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + let ranges = set.iter_ranges(); + assert_eq!(3, ranges.len()); + } + + #[test] + fn test_codepointinversionlist_range_count() { + let ex = vec![0x41, 0x44, 0x45, 0x46, 0xD800, 0xD801]; + let set = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert_eq!(3, set.get_range_count()); + } + + #[test] + fn test_codepointinversionlist_get_nth_range() { + let ex = vec![0x41, 0x44, 0x45, 0x46, 0xD800, 0xD801]; + let set = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert_eq!(Some(0x41..=0x43), set.get_nth_range(0)); + assert_eq!(Some(0x45..=0x45), set.get_nth_range(1)); + assert_eq!(Some(0xD800..=0xD800), set.get_nth_range(2)); + assert_eq!(None, set.get_nth_range(3)); + } + + // Range<char> cannot represent the upper bound (non-inclusive) for + // char::MAX, whereas Range<u32> can. + #[test] + fn test_codepointinversionlist_iter_ranges_with_max_code_point() { + let ex = vec![0x80, (char::MAX as u32) + 1]; + let set = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + let mut ranges = set.iter_ranges(); + assert_eq!(Some(0x80..=(char::MAX as u32)), ranges.next()); + assert_eq!(None, ranges.next()); + } + + #[test] + fn test_codepointinversionlist_span_contains() { + let ex = vec![0x41, 0x44, 0x46, 0x4B]; // A - D, F - K + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert_eq!(check.span("ABCDE", true), 3); + assert_eq!(check.span("E", true), 0); + } + + #[test] + fn test_codepointinversionlist_span_does_not_contain() { + let ex = vec![0x41, 0x44, 0x46, 0x4B]; // A - D, F - K + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert_eq!(check.span("DEF", false), 2); + assert_eq!(check.span("KLMA", false), 3); + } + + #[test] + fn test_codepointinversionlist_span_back_contains() { + let ex = vec![0x41, 0x44, 0x46, 0x4B]; // A - D, F - K + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert_eq!(check.span_back("XYZABFH", true), 3); + assert_eq!(check.span_back("ABCXYZ", true), 6); + } + + #[test] + fn test_codepointinversionlist_span_back_does_not_contain() { + let ex = vec![0x41, 0x44, 0x46, 0x4B]; // A - D, F - K + let check = CodePointInversionList::try_from_inversion_list_slice(&ex).unwrap(); + assert_eq!(check.span_back("ABCXYZ", false), 3); + assert_eq!(check.span_back("XYZABC", false), 6); + } + + #[test] + fn test_uniset_to_inv_list() { + let inv_list = [ + 0x9, 0xE, 0x20, 0x21, 0x85, 0x86, 0xA0, 0xA1, 0x1626, 0x1627, 0x2000, 0x2003, 0x2028, + 0x202A, 0x202F, 0x2030, 0x205F, 0x2060, 0x3000, 0x3001, + ]; + let s: CodePointInversionList = + CodePointInversionList::try_from_inversion_list_slice(&inv_list).unwrap(); + let round_trip_inv_list = s.get_inversion_list_vec(); + assert_eq!(round_trip_inv_list, inv_list); + } + + #[test] + fn test_serde_serialize() { + let inv_list = [0x41, 0x46, 0x4B, 0x55]; + let uniset = CodePointInversionList::try_from_inversion_list_slice(&inv_list).unwrap(); + let json_str = serde_json::to_string(&uniset).unwrap(); + assert_eq!(json_str, r#"["A-E","K-T"]"#); + } + + #[test] + fn test_serde_serialize_surrogates() { + let inv_list = [0xDFAB, 0xDFFF]; + let uniset = CodePointInversionList::try_from_inversion_list_slice(&inv_list).unwrap(); + let json_str = serde_json::to_string(&uniset).unwrap(); + assert_eq!(json_str, r#"["U+DFAB-U+DFFE"]"#); + } + + #[test] + fn test_serde_deserialize() { + let inv_list_str = r#"["A-E","K-T"]"#; + let exp_inv_list = [0x41, 0x46, 0x4B, 0x55]; + let exp_uniset = + CodePointInversionList::try_from_inversion_list_slice(&exp_inv_list).unwrap(); + let act_uniset: CodePointInversionList = serde_json::from_str(inv_list_str).unwrap(); + assert_eq!(act_uniset, exp_uniset); + } + + #[test] + fn test_serde_deserialize_surrogates() { + let inv_list_str = r#"["U+DFAB-U+DFFE"]"#; + let exp_inv_list = [0xDFAB, 0xDFFF]; + let exp_uniset = + CodePointInversionList::try_from_inversion_list_slice(&exp_inv_list).unwrap(); + let act_uniset: CodePointInversionList = serde_json::from_str(inv_list_str).unwrap(); + assert_eq!(act_uniset, exp_uniset); + } + + #[test] + fn test_serde_deserialize_legacy() { + let inv_list_str = "[65,70,75,85]"; + let exp_inv_list = [0x41, 0x46, 0x4B, 0x55]; + let exp_uniset = + CodePointInversionList::try_from_inversion_list_slice(&exp_inv_list).unwrap(); + let act_uniset: CodePointInversionList = serde_json::from_str(inv_list_str).unwrap(); + assert_eq!(act_uniset, exp_uniset); + } + + #[test] + fn test_serde_deserialize_invalid() { + assert!(serde_json::from_str::<CodePointInversionList>("[65,70,98775,85]").is_err()); + assert!(serde_json::from_str::<CodePointInversionList>("[65,70,U+FFFFFFFFFF,85]").is_err()); + } + + #[test] + fn test_serde_with_postcard_roundtrip() -> Result<(), postcard::Error> { + let set = CodePointInversionList::bmp(); + let set_serialized: Vec<u8> = postcard::to_allocvec(&set).unwrap(); + let set_deserialized: CodePointInversionList = + postcard::from_bytes::<CodePointInversionList>(&set_serialized)?; + + assert_eq!(&set, &set_deserialized); + assert!(!set_deserialized.inv_list.is_owned()); + + Ok(()) + } + + #[test] + fn databake() { + databake::test_bake!( + CodePointInversionList<'static>, + const: unsafe { + #[allow(unused_unsafe)] + crate::codepointinvlist::CodePointInversionList::from_parts_unchecked( + unsafe { + zerovec::ZeroVec::from_bytes_unchecked( + b"0\0\0\0:\0\0\0A\0\0\0G\0\0\0a\0\0\0g\0\0\0" + ) + }, + 22u32, + ) + }, + icu_collections, + [zerovec], + ); + } +} diff --git a/third_party/rust/icu_collections/src/codepointinvlist/examples/unicode_bmp_blocks_selector.rs b/third_party/rust/icu_collections/src/codepointinvlist/examples/unicode_bmp_blocks_selector.rs new file mode 100644 index 0000000000..2315eccd3e --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/examples/unicode_bmp_blocks_selector.rs @@ -0,0 +1,87 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +// An example application which uses icu_uniset to test what blocks of +// Basic Multilingual Plane a character belongs to. +// +// In this example we use `CodePointInversionListBuilder` to construct just the first +// two blocks of the first plane, and use an instance of a `BMPBlockSelector` +// to retrieve which of those blocks each character of a string belongs to. +// +// This is a simple example of the API use and is severely oversimplified +// compared to real Unicode block selection. + +#![no_main] // https://github.com/unicode-org/icu4x/issues/395 + +icu_benchmark_macros::static_setup!(); + +use icu_collections::codepointinvlist::{CodePointInversionList, CodePointInversionListBuilder}; + +fn get_basic_latin_block() -> CodePointInversionList<'static> { + let mut builder = CodePointInversionListBuilder::new(); + builder.add_range(&('\u{0000}'..='\u{007F}')); + builder.build() +} + +fn get_latin1_supplement_block() -> CodePointInversionList<'static> { + let mut builder = CodePointInversionListBuilder::new(); + builder.add_range(&('\u{0080}'..='\u{00FF}')); + builder.build() +} + +#[derive(Copy, Clone, Debug)] +enum BmpBlock { + Basic, + Latin1Supplement, + Unknown, +} + +struct BmpBlockSelector<'data> { + blocks: Vec<(BmpBlock, CodePointInversionList<'data>)>, +} + +impl<'data> BmpBlockSelector<'data> { + pub fn new() -> Self { + let blocks = vec![ + (BmpBlock::Basic, get_basic_latin_block()), + (BmpBlock::Latin1Supplement, get_latin1_supplement_block()), + ]; + BmpBlockSelector { blocks } + } + + pub fn select(&self, input: char) -> BmpBlock { + for (block, set) in &self.blocks { + if set.contains(input) { + return *block; + } + } + BmpBlock::Unknown + } +} + +fn print(_input: &str) { + #[cfg(debug_assertions)] + println!("{_input}"); +} + +#[no_mangle] +fn main(_argc: isize, _argv: *const *const u8) -> isize { + icu_benchmark_macros::main_setup!(); + let selector = BmpBlockSelector::new(); + + let sample = "Welcome to MyName©®, Алексей!"; + + let mut result = vec![]; + + for ch in sample.chars() { + result.push((ch, selector.select(ch))); + } + + print("\n====== Unicode BMP Block Selector example ============"); + for (ch, block) in result { + print(&format!("{ch}: {block:#?}")); + } + + 0 +} diff --git a/third_party/rust/icu_collections/src/codepointinvlist/mod.rs b/third_party/rust/icu_collections/src/codepointinvlist/mod.rs new file mode 100644 index 0000000000..ac7ed5190b --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/mod.rs @@ -0,0 +1,89 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! This module provides necessary functionality for highly efficient querying of sets of Unicode characters. +//! +//! It is an implementation of the code point portion of the existing +//! [ICU4C UnicodeSet API](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UnicodeSet.html). +//! +//! # Architecture +//! ICU4X [`CodePointInversionList`] is split up into independent levels, with [`CodePointInversionList`] representing the membership/query API, +//! and [`CodePointInversionListBuilder`] representing the builder API. +//! +//! # Examples: +//! +//! ## Creating a `CodePointInversionList` +//! +//! CodePointSets are created from either serialized [`CodePointSets`](CodePointInversionList), +//! represented by [inversion lists](http://userguide.icu-project.org/strings/properties), +//! the [`CodePointInversionListBuilder`], or from the Properties API. +//! +//! ``` +//! use icu_collections::codepointinvlist::{ +//! CodePointInversionList, CodePointInversionListBuilder, +//! }; +//! +//! let mut builder = CodePointInversionListBuilder::new(); +//! builder.add_range(&('A'..='Z')); +//! let set: CodePointInversionList = builder.build(); +//! +//! assert!(set.contains('A')); +//! ``` +//! +//! ## Querying a `CodePointInversionList` +//! +//! Currently, you can check if a character/range of characters exists in the [`CodePointInversionList`], or iterate through the characters. +//! +//! ``` +//! use icu_collections::codepointinvlist::{ +//! CodePointInversionList, CodePointInversionListBuilder, +//! }; +//! +//! let mut builder = CodePointInversionListBuilder::new(); +//! builder.add_range(&('A'..='Z')); +//! let set: CodePointInversionList = builder.build(); +//! +//! assert!(set.contains('A')); +//! assert!(set.contains_range(&('A'..='C'))); +//! assert_eq!(set.iter_chars().next(), Some('A')); +//! ``` +//! +//! [`ICU4X`]: ../icu/index.html + +#![warn(missing_docs)] + +extern crate alloc; + +#[macro_use] +mod builder; +mod conversions; +mod cpinvlist; +mod utils; + +use alloc::vec::Vec; + +pub use builder::CodePointInversionListBuilder; +pub use conversions::*; +pub use cpinvlist::CodePointInversionList; +pub use cpinvlist::CodePointInversionListULE; +use displaydoc::Display; + +/// Custom Errors for [`CodePointInversionList`]. +/// +/// Re-exported as [`Error`]. +#[derive(Display, Debug)] +pub enum CodePointInversionListError { + /// A CodePointInversionList was constructed with an invalid inversion list + #[displaydoc("Invalid set: {0:?}")] + InvalidSet(Vec<u32>), + /// A CodePointInversionList was constructed containing an invalid range + #[displaydoc("Invalid range: {0}..{1}")] + InvalidRange(u32, u32), +} + +#[cfg(feature = "std")] +impl std::error::Error for CodePointInversionListError {} + +#[doc(no_inline)] +pub use CodePointInversionListError as Error; diff --git a/third_party/rust/icu_collections/src/codepointinvlist/utils.rs b/third_party/rust/icu_collections/src/codepointinvlist/utils.rs new file mode 100644 index 0000000000..c2bf8774eb --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvlist/utils.rs @@ -0,0 +1,109 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use core::{ + char, + ops::{Bound::*, RangeBounds}, +}; +use zerovec::ule::AsULE; +use zerovec::ZeroVec; + +/// Returns whether the vector is sorted ascending non inclusive, of even length, +/// and within the bounds of `0x0 -> 0x10FFFF + 1` inclusive. +#[allow(clippy::indexing_slicing)] // windows +#[allow(clippy::unwrap_used)] // by is_empty check +pub fn is_valid_zv(inv_list_zv: &ZeroVec<'_, u32>) -> bool { + inv_list_zv.is_empty() + || (inv_list_zv.len() % 2 == 0 + && inv_list_zv.as_ule_slice().windows(2).all(|chunk| { + <u32 as AsULE>::from_unaligned(chunk[0]) < <u32 as AsULE>::from_unaligned(chunk[1]) + }) + && inv_list_zv.last().unwrap() <= char::MAX as u32 + 1) +} + +/// Returns start (inclusive) and end (exclusive) bounds of [`RangeBounds`] +pub fn deconstruct_range<T, R: RangeBounds<T>>(range: &R) -> (u32, u32) +where + T: Into<u32> + Copy, +{ + let from = match range.start_bound() { + Included(b) => (*b).into(), + Excluded(_) => unreachable!(), + Unbounded => 0, + }; + let till = match range.end_bound() { + Included(b) => (*b).into() + 1, + Excluded(b) => (*b).into(), + Unbounded => (char::MAX as u32) + 1, + }; + (from, till) +} + +#[cfg(test)] +mod tests { + use super::{deconstruct_range, is_valid_zv}; + use core::char; + use zerovec::ZeroVec; + + #[test] + fn test_is_valid_zv() { + let check = ZeroVec::from_slice_or_alloc(&[0x2, 0x3, 0x4, 0x5]); + assert!(is_valid_zv(&check)); + } + + #[test] + fn test_is_valid_zv_empty() { + let check = ZeroVec::from_slice_or_alloc(&[]); + assert!(is_valid_zv(&check)); + } + + #[test] + fn test_is_valid_zv_overlapping() { + let check = ZeroVec::from_slice_or_alloc(&[0x2, 0x5, 0x4, 0x6]); + assert!(!is_valid_zv(&check)); + } + + #[test] + fn test_is_valid_zv_out_of_order() { + let check = ZeroVec::from_slice_or_alloc(&[0x5, 0x4, 0x5, 0x6, 0x7]); + assert!(!is_valid_zv(&check)); + } + + #[test] + fn test_is_valid_zv_duplicate() { + let check = ZeroVec::from_slice_or_alloc(&[0x1, 0x2, 0x3, 0x3, 0x5]); + assert!(!is_valid_zv(&check)); + } + + #[test] + fn test_is_valid_zv_odd() { + let check = ZeroVec::from_slice_or_alloc(&[0x1, 0x2, 0x3, 0x4, 0x5]); + assert!(!is_valid_zv(&check)); + } + + #[test] + fn test_is_valid_zv_out_of_range() { + let check = ZeroVec::from_slice_or_alloc(&[0x1, 0x2, 0x3, 0x4, (char::MAX as u32) + 1]); + assert!(!is_valid_zv(&check)); + } + + // deconstruct_range + + #[test] + fn test_deconstruct_range() { + let expected = (0x41, 0x45); + let check = deconstruct_range(&('A'..'E')); // Range + assert_eq!(check, expected); + let check = deconstruct_range(&('A'..='D')); // Range Inclusive + assert_eq!(check, expected); + let check = deconstruct_range(&('A'..)); // Range From + assert_eq!(check, (0x41, (char::MAX as u32) + 1)); + let check = deconstruct_range(&(..'A')); // Range To + assert_eq!(check, (0x0, 0x41)); + let check = deconstruct_range(&(..='A')); // Range To Inclusive + assert_eq!(check, (0x0, 0x42)); + let check = deconstruct_range::<char, _>(&(..)); // Range Full + assert_eq!(check, (0x0, (char::MAX as u32) + 1)); + } +} diff --git a/third_party/rust/icu_collections/src/codepointinvliststringlist/mod.rs b/third_party/rust/icu_collections/src/codepointinvliststringlist/mod.rs new file mode 100644 index 0000000000..51c5469ea6 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointinvliststringlist/mod.rs @@ -0,0 +1,383 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! This module provides functionality for querying of sets of Unicode code points and strings. +//! +//! It depends on [`CodePointInversionList`] to efficiently represent Unicode code points, while +//! it also maintains a list of strings in the set. +//! +//! It is an implementation of the existing [ICU4C UnicodeSet API](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UnicodeSet.html). + +use crate::codepointinvlist::{ + CodePointInversionList, CodePointInversionListBuilder, CodePointInversionListError, + CodePointInversionListULE, +}; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use displaydoc::Display; +use yoke::Yokeable; +use zerofrom::ZeroFrom; +use zerovec::{VarZeroSlice, VarZeroVec}; + +/// A data structure providing a concrete implementation of a `UnicodeSet` +/// (which represents a set of code points and strings) using an inversion list for the code points and a simple +/// list-like structure to store and iterate over the strings. +#[zerovec::make_varule(CodePointInversionListAndStringListULE)] +#[zerovec::skip_derive(Ord)] +#[zerovec::derive(Debug)] +#[derive(Debug, Eq, PartialEq, Clone, Yokeable, ZeroFrom)] +// Valid to auto-derive Deserialize because the invariants are weakly held +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] +#[cfg_attr(feature = "serde", zerovec::derive(Serialize, Deserialize, Debug))] +pub struct CodePointInversionListAndStringList<'data> { + #[cfg_attr(feature = "serde", serde(borrow))] + #[zerovec::varule(CodePointInversionListULE)] + cp_inv_list: CodePointInversionList<'data>, + // Invariants (weakly held): + // - no input string is length 1 (a length 1 string should be a single code point) + // - the string list is sorted + // - the elements in the string list are unique + #[cfg_attr(feature = "serde", serde(borrow))] + str_list: VarZeroVec<'data, str>, +} + +#[cfg(feature = "databake")] +impl databake::Bake for CodePointInversionListAndStringList<'_> { + fn bake(&self, env: &databake::CrateEnv) -> databake::TokenStream { + env.insert("icu_collections"); + let cp_inv_list = self.cp_inv_list.bake(env); + let str_list = self.str_list.bake(env); + // Safe because our parts are safe. + databake::quote! { + icu_collections::codepointinvliststringlist::CodePointInversionListAndStringList::from_parts_unchecked(#cp_inv_list, #str_list) + } + } +} + +impl<'data> CodePointInversionListAndStringList<'data> { + /// Returns a new [`CodePointInversionListAndStringList`] from both a [`CodePointInversionList`] for the + /// code points and a [`VarZeroVec`]`<`[`str`]`>` of strings. + pub fn try_from( + cp_inv_list: CodePointInversionList<'data>, + str_list: VarZeroVec<'data, str>, + ) -> Result<Self, CodePointInversionListAndStringListError> { + // Verify invariants: + // Do so by using the equivalent of str_list.iter().windows(2) to get + // overlapping windows of size 2. The above putative code is not possible + // because `.windows()` exists on a slice, but VarZeroVec cannot return a slice + // because the non-fixed size elements necessitate at least some type + // of allocation. + { + let mut it = str_list.iter(); + if let Some(mut x) = it.next() { + if x.len() == 1 { + return Err( + CodePointInversionListAndStringListError::InvalidStringLength( + x.to_string(), + ), + ); + } + for y in it { + if x.len() == 1 { + return Err( + CodePointInversionListAndStringListError::InvalidStringLength( + x.to_string(), + ), + ); + } else if x == y { + return Err( + CodePointInversionListAndStringListError::StringListNotUnique( + x.to_string(), + ), + ); + } else if x > y { + return Err( + CodePointInversionListAndStringListError::StringListNotSorted( + x.to_string(), + y.to_string(), + ), + ); + } + + // Next window begins. Update `x` here, `y` will be updated in next loop iteration. + x = y; + } + } + } + + Ok(CodePointInversionListAndStringList { + cp_inv_list, + str_list, + }) + } + + #[doc(hidden)] + pub const fn from_parts_unchecked( + cp_inv_list: CodePointInversionList<'data>, + str_list: VarZeroVec<'data, str>, + ) -> Self { + CodePointInversionListAndStringList { + cp_inv_list, + str_list, + } + } + + /// Returns the number of elements in this set (its cardinality). + /// Note than the elements of a set may include both individual + /// codepoints and strings. + pub fn size(&self) -> usize { + self.cp_inv_list.size() + self.str_list.len() + } + + /// Return true if this set contains multi-code point strings or the empty string. + pub fn has_strings(&self) -> bool { + !self.str_list.is_empty() + } + + /// + /// # Examples + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use icu_collections::codepointinvliststringlist::CodePointInversionListAndStringList; + /// use zerovec::VarZeroVec; + /// + /// let cp_slice = &[0, 0x1_0000, 0x10_FFFF, 0x11_0000]; + /// let cp_list = + /// CodePointInversionList::try_clone_from_inversion_list_slice(cp_slice).unwrap(); + /// let str_slice = &["", "bmp_max", "unicode_max", "zero"]; + /// let str_list = VarZeroVec::<str>::from(str_slice); + /// + /// let cpilsl = CodePointInversionListAndStringList::try_from(cp_list, str_list).unwrap(); + /// + /// assert!(cpilsl.contains("bmp_max")); + /// assert!(cpilsl.contains("")); + /// assert!(cpilsl.contains("A")); + /// assert!(cpilsl.contains("ቔ")); // U+1254 ETHIOPIC SYLLABLE QHEE + /// assert!(!cpilsl.contains("bazinga!")); + /// ``` + pub fn contains(&self, s: &str) -> bool { + let mut chars = s.chars(); + if let Some(first_char) = chars.next() { + if chars.next().is_none() { + return self.contains_char(first_char); + } + } + self.str_list.binary_search(s).is_ok() + } + + /// + /// # Examples + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use icu_collections::codepointinvliststringlist::CodePointInversionListAndStringList; + /// use zerovec::VarZeroVec; + /// + /// let cp_slice = &[0, 0x80, 0xFFFF, 0x1_0000, 0x10_FFFF, 0x11_0000]; + /// let cp_list = + /// CodePointInversionList::try_clone_from_inversion_list_slice(cp_slice).unwrap(); + /// let str_slice = &["", "ascii_max", "bmp_max", "unicode_max", "zero"]; + /// let str_list = VarZeroVec::<str>::from(str_slice); + /// + /// let cpilsl = CodePointInversionListAndStringList::try_from(cp_list, str_list).unwrap(); + /// + /// assert!(cpilsl.contains32(0)); + /// assert!(cpilsl.contains32(0x0042)); + /// assert!(!cpilsl.contains32(0x0080)); + /// ``` + pub fn contains32(&self, cp: u32) -> bool { + self.cp_inv_list.contains32(cp) + } + + /// + /// # Examples + /// ``` + /// use icu_collections::codepointinvlist::CodePointInversionList; + /// use icu_collections::codepointinvliststringlist::CodePointInversionListAndStringList; + /// use zerovec::VarZeroVec; + /// + /// let cp_slice = &[0, 0x1_0000, 0x10_FFFF, 0x11_0000]; + /// let cp_list = + /// CodePointInversionList::try_clone_from_inversion_list_slice(cp_slice).unwrap(); + /// let str_slice = &["", "bmp_max", "unicode_max", "zero"]; + /// let str_list = VarZeroVec::<str>::from(str_slice); + /// + /// let cpilsl = CodePointInversionListAndStringList::try_from(cp_list, str_list).unwrap(); + /// + /// assert!(cpilsl.contains_char('A')); + /// assert!(cpilsl.contains_char('ቔ')); // U+1254 ETHIOPIC SYLLABLE QHEE + /// assert!(!cpilsl.contains_char('\u{1_0000}')); + /// assert!(!cpilsl.contains_char('🨫')); // U+1FA2B NEUTRAL CHESS TURNED QUEEN + pub fn contains_char(&self, ch: char) -> bool { + self.contains32(ch as u32) + } + + /// Access the underlying [`CodePointInversionList`]. + pub fn code_points(&self) -> &CodePointInversionList<'data> { + &self.cp_inv_list + } + + /// Access the contained strings. + pub fn strings(&self) -> &VarZeroSlice<str> { + &self.str_list + } +} + +impl<'a> FromIterator<&'a str> for CodePointInversionListAndStringList<'_> { + fn from_iter<I>(it: I) -> Self + where + I: IntoIterator<Item = &'a str>, + { + let mut builder = CodePointInversionListBuilder::new(); + let mut strings = Vec::<&str>::new(); + for s in it { + let mut chars = s.chars(); + if let Some(first_char) = chars.next() { + if chars.next().is_none() { + builder.add_char(first_char); + continue; + } + } + strings.push(s); + } + + // Ensure that the string list is sorted. If not, the binary search that + // is used for `.contains(&str)` will return garbase otuput. + strings.sort_unstable(); + strings.dedup(); + + let cp_inv_list = builder.build(); + let str_list = VarZeroVec::<str>::from(&strings); + + CodePointInversionListAndStringList { + cp_inv_list, + str_list, + } + } +} + +/// Custom Errors for [`CodePointInversionListAndStringList`]. +/// +/// Re-exported as [`Error`]. +#[derive(Display, Debug)] +pub enum CodePointInversionListAndStringListError { + /// An invalid CodePointInversionList was constructed + #[displaydoc("Invalid code point inversion list: {0:?}")] + InvalidCodePointInversionList(CodePointInversionListError), + /// A string in the string list had an invalid length + #[displaydoc("Invalid string length for string: {0}")] + InvalidStringLength(String), + /// A string in the string list appears more than once + #[displaydoc("String list has duplicate: {0}")] + StringListNotUnique(String), + /// Two strings in the string list compare to each other opposite of sorted order + #[displaydoc("Strings in string list not in sorted order: ({0}, {1})")] + StringListNotSorted(String, String), +} + +#[doc(no_inline)] +pub use CodePointInversionListAndStringListError as Error; + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_size_has_strings() { + let cp_slice = &[0, 1, 0x7F, 0x80, 0xFFFF, 0x1_0000, 0x10_FFFF, 0x11_0000]; + let cp_list = + CodePointInversionList::try_clone_from_inversion_list_slice(cp_slice).unwrap(); + let str_slice = &["ascii_max", "bmp_max", "unicode_max", "zero"]; + let str_list = VarZeroVec::<str>::from(str_slice); + + let cpilsl = CodePointInversionListAndStringList::try_from(cp_list, str_list).unwrap(); + + assert!(cpilsl.has_strings()); + assert_eq!(8, cpilsl.size()); + } + + #[test] + fn test_empty_string_allowed() { + let cp_slice = &[0, 1, 0x7F, 0x80, 0xFFFF, 0x1_0000, 0x10_FFFF, 0x11_0000]; + let cp_list = + CodePointInversionList::try_clone_from_inversion_list_slice(cp_slice).unwrap(); + let str_slice = &["", "ascii_max", "bmp_max", "unicode_max", "zero"]; + let str_list = VarZeroVec::<str>::from(str_slice); + + let cpilsl = CodePointInversionListAndStringList::try_from(cp_list, str_list).unwrap(); + + assert!(cpilsl.has_strings()); + assert_eq!(9, cpilsl.size()); + } + + #[test] + fn test_invalid_string() { + let cp_slice = &[0, 1]; + let cp_list = + CodePointInversionList::try_clone_from_inversion_list_slice(cp_slice).unwrap(); + let str_slice = &["a"]; + let str_list = VarZeroVec::<str>::from(str_slice); + + let cpilsl = CodePointInversionListAndStringList::try_from(cp_list, str_list); + + assert!(matches!( + cpilsl, + Err(CodePointInversionListAndStringListError::InvalidStringLength(_)) + )); + } + + #[test] + fn test_invalid_string_list_has_duplicate() { + let cp_slice = &[0, 1]; + let cp_list = + CodePointInversionList::try_clone_from_inversion_list_slice(cp_slice).unwrap(); + let str_slice = &["abc", "abc"]; + let str_list = VarZeroVec::<str>::from(str_slice); + + let cpilsl = CodePointInversionListAndStringList::try_from(cp_list, str_list); + + assert!(matches!( + cpilsl, + Err(CodePointInversionListAndStringListError::StringListNotUnique(_)) + )); + } + + #[test] + fn test_invalid_string_list_not_sorted() { + let cp_slice = &[0, 1]; + let cp_list = + CodePointInversionList::try_clone_from_inversion_list_slice(cp_slice).unwrap(); + let str_slice = &["xyz", "abc"]; + let str_list = VarZeroVec::<str>::from(str_slice); + + let cpilsl = CodePointInversionListAndStringList::try_from(cp_list, str_list); + + assert!(matches!( + cpilsl, + Err(CodePointInversionListAndStringListError::StringListNotSorted(_, _)) + )); + } + + #[test] + fn test_from_iter_invariants() { + let in_strs_1 = ["a", "abc", "xyz", "abc"]; + let in_strs_2 = ["xyz", "abc", "a", "abc"]; + + let cpilsl_1 = CodePointInversionListAndStringList::from_iter(in_strs_1); + let cpilsl_2 = CodePointInversionListAndStringList::from_iter(in_strs_2); + + assert_eq!(cpilsl_1, cpilsl_2); + + assert!(cpilsl_1.has_strings()); + assert!(cpilsl_1.contains("abc")); + assert!(cpilsl_1.contains("xyz")); + assert!(!cpilsl_1.contains("def")); + + assert_eq!(1, cpilsl_1.cp_inv_list.size()); + assert!(cpilsl_1.contains_char('a')); + assert!(!cpilsl_1.contains_char('0')); + assert!(!cpilsl_1.contains_char('q')); + + assert_eq!(3, cpilsl_1.size()); + } +} diff --git a/third_party/rust/icu_collections/src/codepointtrie/LICENSE b/third_party/rust/icu_collections/src/codepointtrie/LICENSE new file mode 100644 index 0000000000..9845aa5f48 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/LICENSE @@ -0,0 +1,44 @@ +UNICODE LICENSE V3 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 2020-2023 Unicode, Inc. + +NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR +SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT +DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + +— + +Portions of ICU4X may have been adapted from ICU4C and/or ICU4J. +ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others. diff --git a/third_party/rust/icu_collections/src/codepointtrie/README.md b/third_party/rust/icu_collections/src/codepointtrie/README.md new file mode 100644 index 0000000000..595544bc87 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/README.md @@ -0,0 +1,32 @@ +# `CodePointTrie` + +This module provides a data structure for an time-efficient lookup of values +associated to code points. + +It is an implementation of the existing [ICU4C UCPTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/ucptrie_8h.html) +/ [ICU4J CodePointTrie](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4j/) API. + +## Architecture + +ICU4X [`CodePointTrie`](crate::codepointtrie::CodePointTrie) is designed to provide a read-only view of CodePointTrie data that is exported +from ICU4C. Detailed information about the design of the data structure can be found in the documentation +for the [`CodePointTrie`](crate::codepointtrie::CodePointTrie) struct. + +## Examples + +### Querying a `CodePointTrie` + +```rust +use icu_collections::codepointtrie::planes; +let trie = planes::get_planes_trie(); + +assert_eq!(0, trie.get(0x41)); // 'A' as u32 +assert_eq!(0, trie.get(0x13E0)); // 'Ꮰ' as u32 +assert_eq!(1, trie.get(0x10044)); // '𐁄' as u32 +``` + +[`ICU4X`]: ../icu/index.html + +## More Information + +For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x). diff --git a/third_party/rust/icu_collections/src/codepointtrie/benches/codepointtrie.rs b/third_party/rust/icu_collections/src/codepointtrie/benches/codepointtrie.rs new file mode 100644 index 0000000000..5117330752 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/benches/codepointtrie.rs @@ -0,0 +1,97 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use criterion::{black_box, criterion_group, criterion_main, Criterion}; + +use icu_collections::codepointtrie::CodePointTrie; + +#[path = "tries/mod.rs"] +mod tries; + +#[cfg(feature = "bench")] +mod sample_str_lng { + // "eng" is all ASCII + pub const ENG: &str = "Universal Declaration of Human Rights"; + // "pcd" has ASCII mixed with low-BMP code points + pub const PCD: &str = "Dèclaråcion dès dreûts d' l'ome po tos lès payîs dè monde"; + // "ukr" uses low-BMP code points (less than U+1000) + pub const UKR: &str = "ЗАГАЛЬНА ДЕКЛАРАЦІЯ ПРАВ ЛЮДИНІ"; + // "yue" uses high-BMP code points (greater than U+1000), so it benefits from fast mode + pub const YUE: &str = "世界人权宣言"; + // "ccp" exercises supplementary code points + pub const CCP: &str = "𑄟𑄚𑄬𑄭𑄃𑄇𑄴𑄇𑄥𑄧𑄁𑄢𑄴 𑄝𑄬𑄇𑄴𑄅𑄚𑄮𑄢𑄴 𑄟𑄧𑄚𑄳𑄢𑄧𑄧𑄇𑄉𑄮𑄌𑄴"; +} + +const SAMPLE_STRING_MIXED: &str = "Dèclaråcion ЗАГАЛЬНА 世界人权宣言 𑄟𑄚𑄬𑄭𑄃𑄇𑄴𑄇𑄥𑄧𑄁𑄢𑄴"; + +/// A function that returns 100 code points in the desired language +fn one_hundred_code_points(sample_str: &str) -> String { + sample_str.chars().cycle().take(100).collect() +} + +fn get_trie_small() -> CodePointTrie<'static, u8> { + CodePointTrie::try_new( + tries::gc_small::HEADER, + tries::gc_small::INDEX, + tries::gc_small::DATA, + ) + .unwrap() +} + +#[cfg(feature = "bench")] +fn get_trie_fast() -> CodePointTrie<'static, u8> { + CodePointTrie::try_new( + tries::gc_fast::HEADER, + tries::gc_fast::INDEX, + tries::gc_fast::DATA, + ) + .unwrap() +} + +fn overview_bench(c: &mut Criterion) { + let s = one_hundred_code_points(SAMPLE_STRING_MIXED); + let cpt_small = get_trie_small(); + + c.bench_function("cpt/overview", |b| { + b.iter(|| { + black_box(&s) + .chars() + .map(|c| black_box(&cpt_small).get32(c as u32)) + .reduce(|a, b| a.wrapping_add(b)) + }); + }); + + #[cfg(feature = "bench")] + { + let cpt_fast = get_trie_fast(); + lang_bench(c, &cpt_small, "small/eng", sample_str_lng::ENG); + lang_bench(c, &cpt_small, "small/pcd", sample_str_lng::PCD); + lang_bench(c, &cpt_small, "small/ukr", sample_str_lng::UKR); + lang_bench(c, &cpt_small, "small/yue", sample_str_lng::YUE); + lang_bench(c, &cpt_small, "small/ccp", sample_str_lng::CCP); + lang_bench(c, &cpt_fast, "fast/eng", sample_str_lng::ENG); + lang_bench(c, &cpt_fast, "fast/pcd", sample_str_lng::PCD); + lang_bench(c, &cpt_fast, "fast/ukr", sample_str_lng::UKR); + lang_bench(c, &cpt_fast, "fast/yue", sample_str_lng::YUE); + lang_bench(c, &cpt_fast, "fast/ccp", sample_str_lng::CCP); + } +} + +#[cfg(feature = "bench")] +fn lang_bench(c: &mut Criterion, cpt: &CodePointTrie<u8>, lid: &str, sample_str: &str) { + let bench_name = format!("cpt/get/{lid}"); + let s = one_hundred_code_points(sample_str); + + c.bench_function(&bench_name, |b| { + b.iter(|| { + black_box(&s) + .chars() + .map(|c| black_box(&cpt).get32(c as u32)) + .reduce(|a, b| a.wrapping_add(b)) + }); + }); +} + +criterion_group!(benches, overview_bench,); +criterion_main!(benches); diff --git a/third_party/rust/icu_collections/src/codepointtrie/benches/iai_cpt.rs b/third_party/rust/icu_collections/src/codepointtrie/benches/iai_cpt.rs new file mode 100644 index 0000000000..3d57cbb4a1 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/benches/iai_cpt.rs @@ -0,0 +1,77 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use icu_collections::codepointtrie::CodePointTrie; + +#[path = "tries/mod.rs"] +mod tries; + +// The string has 41 chars. +const SAMPLE_STRING_LATIN1: &str = "Declaration loremips umdolo loremipsompi"; +const SAMPLE_STRING_MIXED: &str = "Dèclaråcion ЗАГАЛЬНА 世界人权宣言 𑄟𑄚𑄬𑄭𑄃𑄇𑄴𑄇𑄥𑄧𑄁𑄢𑄴"; + +fn get_trie_small() -> CodePointTrie<'static, u8> { + CodePointTrie::try_new( + tries::gc_small::HEADER, + tries::gc_small::INDEX, + tries::gc_small::DATA, + ) + .unwrap() +} + +fn get_trie_fast() -> CodePointTrie<'static, u8> { + CodePointTrie::try_new( + tries::gc_fast::HEADER, + tries::gc_fast::INDEX, + tries::gc_fast::DATA, + ) + .unwrap() +} + +fn bench_iai_cpt_overview(fast: bool, mixed: bool) { + // Tests the instructions required to get CPT for 100,000 chars. + + let cpt = if fast { + get_trie_fast() + } else { + get_trie_small() + }; + let sample = if mixed { + SAMPLE_STRING_MIXED + } else { + SAMPLE_STRING_LATIN1 + }; + + let mut i: u8 = 0; + for c in sample.chars() { + i = i.wrapping_add(cpt.get32(c as u32)) + //i = i.wrapping_add(1); + } + + // Ensure the loop is not DCEd + assert!(i < 255); +} + +fn bench_iai_cpt_latin_fast() { + bench_iai_cpt_overview(true, false); +} + +fn bench_iai_cpt_latin_small() { + bench_iai_cpt_overview(false, false); +} + +fn bench_iai_cpt_mixed_fast() { + bench_iai_cpt_overview(true, true); +} + +fn bench_iai_cpt_mixed_small() { + bench_iai_cpt_overview(false, true); +} + +iai::main!( + bench_iai_cpt_latin_fast, + bench_iai_cpt_latin_small, + bench_iai_cpt_mixed_fast, + bench_iai_cpt_mixed_small, +); diff --git a/third_party/rust/icu_collections/src/codepointtrie/benches/tries/gc_fast.rs b/third_party/rust/icu_collections/src/codepointtrie/benches/tries/gc_fast.rs new file mode 100644 index 0000000000..ba98a40f78 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/benches/tries/gc_fast.rs @@ -0,0 +1,1128 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use icu_collections::codepointtrie::{CodePointTrieHeader, TrieType}; +use zerovec::ule::AsULE; +use zerovec::{zerovec, ZeroVec}; + +#[rustfmt::skip] +pub const INDEX: ZeroVec<u16> = zerovec!(u16; <u16 as AsULE>::ULE::from_unsigned; + [ + 0,0x40,0x7f,0xbf,0xff,0x12e,0x16d,0x1ad,0x1e5,0x224,0x250,0x28e,0x2ce,0x2de,0x31e,0x34f, + 0x38c,0x3bc,0x3fa,0x43a,0x44a,0x47b,0x4b2,0x4f2,0x532,0x572,0x5a3,0x5cf,0x60f,0x644,0x65e,0x69e, + 0x6de,0x71e,0x756,0x78d,0x7ca,0x809,0x848,0x887,0x8c6,0x905,0x944,0x983,0x9c3,0xa01,0xa3f,0xa7f, + 0xabf,0xafe,0xb3e,0xb7e,0xbbe,0xbfd,0xc3d,0xc7d,0xcbc,0xcfc,0xd3b,0xd7b,0xdbb,0xdfb,0xe3b,0xe79, + 0xeb9,0xef9,0xf37,0xf71,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0xfb1,0xfe8,0x1026,0x1055,0x107a,0x10ba,0x10da, + 0x111a,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x112d,0x116d,0x118d,0x11cd,0x120d,0x124d,0x128b, + 0x12cb,0x1308,0x1348,0x1378,0x13b8,0x13f8,0x1438,0x146e,0x14ae,0x14d9,0x1519,0x1558,0x1598,0x15d6,0x1616,0x1650, + 0x1690,0x16d0,0x1710,0x1750,0x1790,0x17bc,0x17a1,0x2ce,0x17fc,0x17fc,0x1826,0x17fc,0x1865,0x18a5,0x18e5,0x1924, + 0x1964,0x19a3,0x19e3,0x1a22,0x1a62,0x1aa2,0x1adf,0x1b11,0x1b45,0x1b45,0x1b45,0x1b45,0x1b85,0x1bb0,0x1bed,0x1c21, + 0x1c43,0x1c83,0x1ca7,0x1cc3,0x1d03,0x1d03,0x1bb5,0x1d42,0x1d03,0x1bbd,0x1d03,0x1d03,0x1d03,0x1d82,0x1cef,0x1dc2, + 0x1d03,0x1d03,0x1d03,0x1d03,0x1b45,0x1b45,0x1dff,0x1e27,0x1b45,0x1b45,0x1b45,0x1b45,0x1e67,0x1ea2,0x1ed8,0x1d03, + 0x38c,0x1f18,0x17fc,0x1f57,0x1f97,0x1fc7,0x2007,0x2027,0x2067,0x20a7,0x20e7,0x2102,0x1d03,0x1d03,0x1d03,0x2120, + 0x2160,0x21a0,0x21c9,0x21ea,0x222a,0x5a3,0x225b,0x229b,0x22db,0x2313,0x2329,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,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x29f6,0x29f6,0x29f6,0x29f6,0x29f6, + 0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36, + 0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36, + 0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36, + 0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36, + 0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36, + 0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36, + 0x2a36,0x2a36,0x2a36,0x2a36,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x2a76,0x5a3,0x2aa6,0x2ae6,0x2b26,0x2b34,0x2b71, + 0x5a3,0x5a3,0x5a3,0x5a3,0x2b84,0x2bc4,0x2bf4,0x2c2c,0x2c6c,0x2ca8,0x5a3,0x2cde,0x2d1e,0x2d5e,0x2d8f,0x2dce, + 0xac0,0xade,0xafb,0xb1a,0xb3a,0xb3a,0xb47,0xb64,0xb84,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e, + 0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e,0xb8e, + 0xb8e,0xb8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0x5a3,0x2f6f,0x5a3,0x2f7f,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x2f8f,0x10a3,0x1ca1,0x10a3,0x10a3, + 0x2f9e,0x94e,0x5a3,0x2fae,0x2e6a,0x2fbe,0x5a3,0x2fce,0x5a3,0x2fde,0xd18,0xd18,0x2fee,0x5a3,0x2ff9,0x3009, + 0x5a3,0x5a3,0x5a3,0x3019,0x5a3,0x3029,0x5a3,0x3039,0x5a3,0x3049,0x1c9a,0xd18,0xd18,0xd18,0xd18,0xd18, + 0x5a3,0x5a3,0x5a3,0x5a3,0x1338,0xd18,0xd18,0xd18,0x41,0x41,0x41,0x3059,0x28fd,0x28fd,0x28fd,0x3069, + 0x5a3,0x5a3,0x3079,0xb24,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0x10a3,0x10a8,0x5a3,0x5a3,0x3089,0xd99,0xd18,0xd18,0xd18,0xd18,0x5a3,0x2fde,0x3099,0x5a3,0x577,0x30a9, + 0xd18,0x5a3,0x30b9,0xd18,0xd18,0x5a3,0x30c9,0xd18,0x5a3,0x13a7,0x281b,0x5a3,0x5a3,0x575,0x30d9,0x1ca1, + 0x30e9,0x30f9,0x7cb,0x5a3,0x5a3,0x3109,0x3117,0x5a3,0x1338,0xb24,0x773,0x5a3,0x3127,0x3134,0x3144,0x5a3, + 0x5a3,0x3154,0x7cb,0x5a3,0x5a3,0x3164,0x3173,0x3183,0x1ca2,0x3193,0x5a3,0x954,0x31a3,0x31b2,0xd18,0xd18, + 0xd18,0xd18,0x31c2,0x863,0x31d1,0x5a3,0x5a3,0x630,0x31e1,0xb24,0x31f1,0x858,0x868,0x3200,0x3210,0x3220, + 0x322e,0x1562,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x323e,0x324e,0x325e, + 0xd99,0xd18,0x5a3,0x5a3,0x5a3,0x326e,0x327d,0xb24,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x5a3,0x5a3,0xed5,0x328d,0x329c,0x32a4,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x32b4,0x32c3,0xb24, + 0x32d3,0xd18,0x5a3,0x5a3,0x32e3,0x32f3,0xb24,0xd18,0xd18,0xd18,0x5a3,0x108a,0x3303,0x3313,0x13a7,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x31a3,0x3323,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0x41,0x41,0x28fd,0x28fd,0xc23,0x3333,0x3342,0x334e,0x5a3,0x335e,0x336e,0xb24, + 0xd18,0xd18,0xd18,0xd18,0x2a9c,0x5a3,0x5a3,0x337e,0x338e,0xd18,0x339e,0x5a3,0x5a3,0x33ab,0x33ba,0x33ca, + 0x5a3,0x5a3,0x573,0x33da,0x33e8,0x5a3,0x5a3,0x5a3,0x5a3,0x1338,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x868,0x5a3,0xed5,0x33f8,0x3408,0xc23, + 0x10aa,0x550,0x5a3,0xe2a,0x3418,0x3427,0xd18,0xd18,0xd18,0xd18,0x96e,0x5a3,0x5a3,0x3437,0x3446,0xb24, + 0x3456,0x5a3,0x3460,0x3470,0xb24,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0x5a3,0x3480,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0x993,0x10a3,0x3490,0x349f,0x34ad,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x1337,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x1ac2,0x1ac2,0x1ac2,0x1ac2,0x1ac2,0x1ac2,0x34bd,0x34cd,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0xd97,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x34dd,0x5a3,0x5a3,0x50e,0x34ed,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0x5a3,0x5a3,0x5a3,0x5a3,0x13a7,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0x5a3,0x5a3,0x5a3,0x1338,0x5a3,0x50e,0x2770,0x5a3,0x5a3,0x5a3,0x5a3,0x50e,0xb24,0x5a3,0x50f, + 0x34fd,0x5a3,0x5a3,0x5a3,0x350d,0x351d,0x352d,0x353b,0x741,0x5a3,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0x41,0x41,0x28fd,0x28fd,0x10a3,0x354b,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3, + 0x5a3,0xe1d,0x355b,0x355c,0x355c,0x3564,0x3573,0xd18,0xd18,0xd18,0xd18,0x3581,0x3591,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x13a6,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x13a8,0xd18,0xd18,0x1338,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x35a1,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0xd98,0xd18,0xd18,0xd98,0x2ed1,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x511,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x73e,0x510,0x1338,0x35b1,0x35c1, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x2ce,0x2ce,0x641,0x2ce,0x1560,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03, + 0x1d03,0x1c66,0xd18,0xd18,0xd18,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03, + 0x1d03,0x1d03,0x1d03,0x1d03,0x1c64,0x1d03,0x1d03,0x1ecf,0x1d03,0x1d03,0x1d03,0x35d1,0x35de,0x35eb,0x1d03,0x35f7, + 0x1d03,0x1d03,0x1d03,0x1c5f,0xd18,0x1d03,0x1d03,0x1d03,0x1d03,0x3605,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0x10a3,0x3615,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1c63,0x10a3,0x2e6a,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x41,0x3b2,0x28fd,0x3625,0x3ae,0x2ef0,0x1865,0x41,0xdc,0x3635,0x3645, + 0x3653,0x2ef1,0x41,0x3b2,0x28fd,0x3660,0x366d,0x28fd,0x367b,0x368b,0x369a,0x369e,0x41,0xd8,0x28fd,0x41, + 0x3b2,0x28fd,0x3625,0x3ae,0x28fd,0x1865,0x41,0xdc,0x369e,0x41,0xd8,0x28fd,0x41,0x3b2,0x28fd,0x36ae, + 0x41,0x36bd,0xeb,0x38a,0x36cd,0x28fd,0x36d9,0x41,0x36b9,0xe7,0x36c7,0xc7,0x28fd,0xed,0x41,0x36e5, + 0x28fd,0x36f2,0x3700,0x3700,0x3700,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03, + 0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03, + 0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x2ce,0x2ce,0x2ce,0x3710,0x2ce,0x2ce,0x371b,0x3728,0x3734,0x1a27,0x4c2, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x25a,0x1fae,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xe4c,0x3744,0x3752,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x510,0x3762,0x3772,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x3782,0xd18,0x5a3,0x5a3,0x633,0x3792,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x37a2,0x50e,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x37b2,0x1560,0xd18,0xd18,0x41,0x41,0xdc,0x28fd, + 0x37c2,0x2770,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x1ca2,0x10a3,0x10a3,0x37d2, + 0x37e2,0xd18,0xd18,0xd18,0xd18,0x1ca2,0x10a3,0x37f2,0x10a9,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xae4,0x5a3,0x3802,0x380f,0x381d,0x382d,0x383b,0x3843,0x867,0x511,0x3852, + 0x511,0xd18,0xd18,0xd18,0x3862,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x1d03,0x1d03,0x1c5e,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1c66,0x1c5b, + 0x148b,0x148b,0x148b,0x1d03,0x1c64,0x1cb6,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1c5c, + 0xd18,0xd18,0xd18,0x1c7d,0x1d03,0x1c67,0x1d03,0x1d03,0x1c5e,0x1c61,0x1c68,0x1c64,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03, + 0x1d03,0x1d03,0x1d03,0x1d03,0x3872,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03, + 0x1d03,0x1d03,0x3882,0x1c5d,0x1c5d,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1c66,0x1d03,0x1d03,0x1d03, + 0x1d03,0x1d03,0x1c61,0x1c5e,0x1c69,0x1c5e,0x1d03,0x1d03,0x1d03,0x1c62,0x10ca,0x1d03,0x1d03,0x1c62,0x1d03,0x1c5c, + 0x1c68,0xd18,0xd18,0xd18,0xd18,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03, + 0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1c66,0x1c5c,0x388f,0x1c63,0x1d03,0x1c5d,0x1c5f,0x1c64,0x10ca,0x1c62,0x1c63, + 0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1d03,0x1eeb,0x1d03,0x1d03,0x1c5f,0xd18,0xd18,0xb24, + 0x5a3,0x5a3,0x5a3,0x5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38ae,0x38ae,0x38ae,0x38ae,0x38ae,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0xd18, + 0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36, + 0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x2a36,0x38be, + 0x440,0x460,0x480,0x4a0,0x4c0,0x4e0,0x500,0x51a,0x53a,0x55a,0x57a,0x59a,0x5ba,0x5da,0x5fa,0x615, + 0xd0,0x635,0x655,0x66a,0x66a,0x66a,0x66a,0x671,0xd0,0xd0,0x691,0x66a,0x66a,0x66a,0x66a,0x66a, + 0xd0,0x6b1,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a, + 0x66a,0x66a,0xd0,0x6d1,0x66a,0x6ed,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0x70d,0xd0, + 0xd0,0x72d,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a, + 0x66a,0x66a,0x73e,0x75e,0x775,0x66a,0x66a,0x66a,0x66a,0x795,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a, + 0x66a,0x7a5,0x7c5,0x7e5,0x805,0x825,0x845,0x865,0x66a,0x875,0x895,0x8ac,0x66a,0x8bc,0x8dc,0x66a, + 0x8f5,0x915,0x935,0x955,0x845,0x975,0x995,0x9b0,0x66a,0x66a,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0x9d0,0xd0,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0x9e0,0x9ff,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xa15,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xa20,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a, + 0xd0,0xa40,0x66a,0x66a,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xa60,0x66a,0x66a, + 0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a, + 0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0xa80,0x66a, + 0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a, + 0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x66a,0x380,0x380, + 0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380, + 0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0x380,0xaa0 + ] +); + +#[rustfmt::skip] +pub const DATA: ZeroVec<u8> = zerovec!(u8; core::convert::identity; + [ + 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, + 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0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x17,0x1c,0x1d,0x17, + 0x17,0x17,0x17,0x16,0x17,0x17,0x17,0x18,0x14,0x15,0x17,0x17,0x17,0x17,0x17,0x17, + 0x17,0x17,0x17,0x17,0x17,0x18,0x17,0x16,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x17,0x17,0xc,0x10,0x10,0x10,0x10,0x10,0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x10,0x10,0x10,0xb,4,0,0,0xb,0xb,0xb,0xb,0xb,0xb,0x18,0x18,0x18, + 0x14,0x15,4,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0x18,0x18,0x18, + 0x14,0x15,0,4,4,4,4,4,4,4,4,4,4,4,4,4, + 0,0,0,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x19,0x19,0x19,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,7, + 7,7,7,6,7,7,7,6,6,6,6,6,6,6,6,6, + 6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0x1b,0x1b,1,0x1b,0x1b,0x1b,0x1b,1,0x1b,0x1b,2,1,1,1, + 2,2,1,1,1,2,0x1b,1,0x1b,0x1b,0x18,1,1,1,1,1, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1,0x1b,1,0x1b,1,0x1b,1,1,1,1, + 0x1b,2,1,1,1,1,2,5,5,5,5,2,0x1b,0x1b,2,2, + 1,1,0x18,0x18,0x18,0x18,0x18,1,2,2,2,2,0x1b,0x18,0x1b,0x1b, + 2,0x1b,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xb,0xb,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,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,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15, + 0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xb,0xb,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15, + 0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15, + 0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14, + 0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0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+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0, + 0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,0,0,0,0,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x12,0x12,0x12,0x12,0x12,0x12,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, + 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, + 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, + 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, + 0x11,0x11,0x11,0x11,0x11,0x11,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,0,0,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,2,2,2,2,2,2,2,0,0,0, + 0,0,0,0,0,0,0,0,0,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0x13,0x13,0x16, + 0x16,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x14, + 0x15,0x17,0x17,0x17,0x17,0x16,0x16,0x16,0x17,0x17,0x17,0,0x17,0x17,0x17,0x17, + 0x13,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x17,0x18,0x13,0x18,0x18,0x18,0, + 0x17,0x19,0x17,0x17,0,0,0,0,5,5,5,5,5,0,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,0,0,0x10,0,0x17, + 0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18,0x17,0x13,0x17,0x17,9,9, + 9,9,9,9,9,9,9,9,0x17,0x17,0x18,0x18,0x18,0x17,0x17,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,0x14,0x17,0x15,0x1a,0x16,0x1a,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,0x14,0x18,0x15,0x18,0x14,0x15,0x17, + 0x14,0x15,0x17,0x17,5,5,5,5,5,5,5,5,5,5,4,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,4,4,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, + 5,5,5,5,5,5,0,0,5,5,5,5,5,5,0,0, + 5,5,5,5,5,5,0,0,5,5,5,0,0,0,0x19,0x19, + 0x18,0x1a,0x1b,0x19,0x19,0,0x1b,0x18,0x18,0x18,0x18,0x1b,0x1b,0,0,0, + 0,0,0,0,0,0,0,0x10,0x10,0x10,0x1b,0x1b,0,0,5,5, + 5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11,0x11,0x11,0x11,0x11,0x11,0x11,0,0 + ] +); + +pub static HEADER: CodePointTrieHeader = CodePointTrieHeader { + high_start: 0x110000, + shifted12_high_start: 0x110, + trie_type: TrieType::Fast, + index3_null_offset: 0x66a, + data_null_offset: 0xd18, + null_value: 0x0, +}; diff --git a/third_party/rust/icu_collections/src/codepointtrie/benches/tries/gc_small.rs b/third_party/rust/icu_collections/src/codepointtrie/benches/tries/gc_small.rs new file mode 100644 index 0000000000..da297a2d4c --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/benches/tries/gc_small.rs @@ -0,0 +1,865 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use icu_collections::codepointtrie::{CodePointTrieHeader, TrieType}; +use zerovec::ule::AsULE; +use zerovec::{zerovec, ZeroVec}; + +#[rustfmt::skip] +pub const INDEX: ZeroVec<u16> = zerovec!(u16; <u16 as AsULE>::ULE::from_unsigned; + [ + 0,0x40,0x7f,0xbf,0xff,0x12e,0x16d,0x1ad,0x1e5,0x224,0x250,0x28e,0x2ce,0x2de,0x31e,0x34f, + 0x38c,0x3bc,0x3fa,0x43a,0x44a,0x47b,0x4b2,0x4f2,0x532,0x572,0x5a3,0x5cf,0x60f,0x644,0x65e,0x69e, + 0x6de,0x71e,0x756,0x78d,0x7ca,0x809,0x848,0x887,0x8c6,0x905,0x944,0x983,0x9c3,0xa01,0xa3f,0xa7f, + 0xabf,0xafe,0xb3e,0xb7e,0xbbe,0xbfd,0xc3d,0xc7d,0xcbc,0xcfc,0xd3b,0xd7b,0xdbb,0xdfb,0xe3b,0xe79, + 0xbbd,0xbd7,0xbe7,0xbfd,0xc1d,0xc3b,0xc58,0xc77,0xc97,0xc97,0xca4,0xcc1,0xce1,0xceb,0xceb,0xceb, + 0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb, + 0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb, + 0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xceb,0xd0b,0xceb,0xceb,0xceb,0xd2b,0xd2b,0xd2b,0xd2c, + 0xd2b,0xd2b,0xd2b,0xd2c,0,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x7f,0x8f,0x9f,0xaf, + 0xbf,0xcf,0xdf,0xef,0xff,0x10f,0x11f,0x12f,0x12e,0x13e,0x14e,0x15e,0x16d,0x17d,0x18d,0x19d, + 0x1ad,0x1bd,0x1cd,0x1dd,0x1e5,0x1f5,0x205,0x215,0x224,0x234,0x244,0x254,0x250,0x260,0x270,0x280, + 0x28e,0x29e,0x2ae,0x2be,0x2ce,0x2de,0x2ee,0x2fe,0x2de,0x2ee,0x2fe,0x30e,0x31e,0x32e,0x33e,0x34e, + 0x34f,0x35f,0x36f,0x37f,0x38c,0x39c,0x3ac,0x3bc,0x3bc,0x3cc,0x3dc,0x3ec,0x3fa,0x40a,0x41a,0x42a, + 0x43a,0x44a,0x45a,0x46a,0x44a,0x45a,0x46a,0x47a,0x47b,0x48b,0x49b,0x4ab,0x4b2,0x4c2,0x4d2,0x4e2, + 0x4f2,0x502,0x512,0x522,0x532,0x542,0x552,0x562,0x572,0x582,0x592,0x5a2,0x5a3,0x5b3,0x5c3,0x5d3, + 0x5cf,0x5df,0x5ef,0x5ff,0x60f,0x61f,0x62f,0x63f,0x644,0x654,0x664,0x674,0x65e,0x66e,0x67e,0x68e, + 0x69e,0x6ae,0x6be,0x6ce,0x6de,0x6ee,0x6fe,0x70e,0x71e,0x72e,0x73e,0x74e,0x756,0x766,0x776,0x786, + 0x78d,0x79d,0x7ad,0x7bd,0x7ca,0x7da,0x7ea,0x7fa,0x809,0x819,0x829,0x839,0x848,0x858,0x868,0x878, + 0x887,0x897,0x8a7,0x8b7,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3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0xfc0,0x5a3,0xfd0,0xfd5,0x5a3,0x5a3,0x5a3,0x5a3,0xfe5,0xff4,0x5a3,0x1004,0x5a3,0x1013,0x5a3,0x1023, + 0x864,0x1033,0x5a3,0x5a3,0x5a3,0x1043,0x1051,0x105d,0xb24,0x106d,0x107d,0xb24,0x5a3,0x5a3,0x108d,0x5a3, + 0x5a3,0x1094,0x10a4,0x5a3,0x10ab,0x5a3,0x5a3,0x5a3,0x5a3,0x10bb,0x5a3,0x50e,0x10cb,0x10db,0x10eb,0x5a3, + 0x50f,0x10fb,0x5a3,0x5a3,0x511,0x5a3,0x1093,0x110b,0x1119,0x1119,0x5a3,0x1129,0x5a3,0x5a3,0x5a3,0x1139, + 0x1149,0x1156,0xb24,0xb24,0x1166,0x1176,0x640,0xd18,0xd18,0xd18,0x7c9,0x5a3,0x5a3,0x1186,0x1194,0xed8, + 0x11a4,0x11b0,0x7cb,0x5a3,0x11c0,0x69e,0x5a3,0x5a3,0x11ce,0x11dd,0x5a3,0x5a3,0x11ed,0x11f9,0x1209,0x69e, + 0x5a3,0x1216,0x1226,0x41,0x41,0x1236,0x1246,0x1256,0x1265,0x126e,0x61,0x61,0x274,0x280,0x280,0x280, + 0x127e,0x1289,0x61,0x275,0x280,0x280,0x2ce,0x2ce,0x2ce,0x2ce,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1299,0xff,0xff,0xff,0xff,0xff,0xff,0x12a8,0x12b8,0x12a8,0x12a8,0x12b8,0x12c8, + 0x12a8,0x12d8,0x12e8,0x12e8,0x12e8,0x12f8,0x1307,0x1317,0x1327,0x1337,0x1347,0x1357,0x1367,0x1377,0x1386,0x1394, + 0x13a4,0x13b4,0x13c4,0x13d4,0x13e4,0x13e4,0x13f3,0x1403,0x1412,0x1421,0x1431,0x1441,0x144f,0x145f,0x146f,0x147f, + 0x148f,0x148f,0x149c,0x14ac,0x14bc,0x1119,0x14cb,0x14db,0x1119,0x14e7,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, + 0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14fb,0x1119,0x150b,0x1119,0x1119,0x1119, + 0x1119,0x1516,0x1119,0x14e0,0x14eb,0x1526,0x1119,0x152a,0x1538,0x1119,0x1119,0x1541,0xd18,0x153d,0xd18,0x147f, + 0x147f,0x147f,0x1551,0x1119,0x1119,0x1119,0x1119,0x155d,0x147f,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x1119,0x1119,0x1119,0x14c3,0x14c9,0x1119,0x1119,0x14e3,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x156d, + 0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x157d, + 0x1587,0x147f,0x1569,0x1119,0x1119,0x1597,0x14eb,0x15a1,0x14eb,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, + 0x14eb,0x15a4,0x15ac,0x14eb,0x14eb,0x14eb,0x15b5,0x14eb,0x15c1,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, + 0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x1119,0x1119,0x1119,0x14eb,0x15cf,0x1119,0x1119, + 0x15dc,0x1119,0x15e6,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x41,0x41,0x41,0x61,0x61,0x61,0x15f6, + 0x1605,0xff,0xff,0xff,0xff,0xff,0xff,0x1614,0x1623,0x61,0x61,0x1633,0x5a3,0x5a3,0x5a3,0x1643, + 0x1653,0x5a3,0x1663,0x86a,0x86a,0x86a,0x86a,0x2ce,0x2ce,0x1673,0x1681,0x1691,0x16a1,0x16b1,0x16c1,0xd18, + 0xd18,0x1119,0x15e2,0x1119,0x1119,0x1119,0x1119,0x1119,0x16d1,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x16e1,0xd18,0x153c,0x16f1,0x16ff,0x170f,0x171f,0x501,0x5a3,0x5a3, + 0x5a3,0x5a3,0x172f,0xfbd,0x5a3,0x5a3,0x5a3,0x5a3,0x173e,0x4fd,0x5a3,0x5a3,0x501,0x5a3,0x5a3,0x5a3, + 0x5a3,0x50e,0x174e,0x5a3,0x5a3,0x1119,0x1119,0x16d1,0x5a3,0x1119,0x1754,0x1553,0x1119,0x1764,0x147e,0x1119, + 0x1119,0x1553,0x1119,0x1119,0x147e,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x1119,0x1119,0x1119,0x1119,0x5a3,0x56d,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x510,0x1119,0x1119, + 0x1119,0x1541,0x5a3,0x5a3,0x1216,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x1774,0x5a3,0x1784,0xd18,0xff,0xff,0x1794,0x17a4,0xff,0x17b4,0x5a3, + 0x5a3,0x5a3,0x5a3,0x17c4,0x17d4,0x2bd,0x17e4,0x17f4,0xfd,0xff,0xff,0xff,0x1804,0x1812,0x1822,0x1828, + 0x1832,0x183e,0x184e,0xd18,0x185c,0x186a,0x5a3,0x1877,0x1887,0x5a3,0x5a3,0x5a3,0x1897,0x18a7,0x5a3,0x5a3, + 0x18b3,0x18bf,0xb24,0x2ce,0x18cf,0x69e,0x5a3,0x18df,0x5a3,0x576,0x18ef,0x5a3,0x510,0x7ca,0x5a3,0x5a3, + 0x18ff,0x190e,0x191e,0x192e,0x10f1,0x5a3,0x5a3,0x1935,0x1944,0x1954,0x1964,0x5a3,0x1974,0x5a3,0x5a3,0x5a3, + 0x1984,0x1994,0x1999,0x19a9,0x19b9,0x19c8,0x10ba,0x86a,0x61,0x61,0x19d8,0x19e8,0x61,0x61,0x61,0x61, + 0x61,0x5a3,0x5a3,0x19f8,0xb24,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0xd97, + 0x5a3,0x1a08,0x5a3,0x5a3,0x511,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18, + 0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a18, + 0x1a18,0x1a18,0x1a18,0x1a18,0x1a18,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28, + 0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28, + 0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x50f,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x1093,0xd18,0xd18,0x1a38, + 0x1a45,0x1a54,0x1a5e,0x1a6e,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x1a7c,0x1a89,0x4ff,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x1a99,0x1119,0x5a3,0x5a3,0x5a3,0x5a3,0x500,0x5a3,0x5a3,0x1aa9,0xd18,0xd18,0x1ab9,0x2ce,0x1ac9,0x2ce, + 0x1ad9,0x1ae5,0x1af5,0x1b04,0xae3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x1b14,0x1b24,0x30,0x40, + 0x50,0x60,0x1b34,0x1b44,0x1b54,0x5a3,0x1b56,0x5a3,0x50e,0x19c7,0x1b66,0x1b76,0x1b85,0x865,0x5a3,0xae1, + 0x1b95,0x50f,0x50f,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x73e,0x1ba5,0x147f,0x147f, + 0xf96,0x148f,0x148f,0x148f,0x1bb5,0x1bbe,0x153b,0x1bcc,0xd18,0xd18,0x1119,0x1119,0x1bdc,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x510,0x5a3,0x5a3,0x5a3,0x993,0x1bec,0x1bf0,0x5a3,0x5a3,0x1bf8, + 0x5a3,0x1c07,0x5a3,0x5a3,0x1c17,0x5a3,0x1c27,0x5a3,0x5a3,0x1c37,0x1c47,0xd18,0xd18,0x41,0x41,0x342, + 0x61,0x61,0x5a3,0x5a3,0x5a3,0x5a3,0x50f,0xb24,0x41,0x41,0x1c57,0x61,0x1c5f,0x5a3,0x5a3,0x1c6f, + 0x5a3,0x5a3,0x5a3,0x1c73,0x335,0x335,0x1c83,0x1c91,0x1c9f,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x1663,0x5a3,0x10bb,0x1c6f,0xd18,0x1caf,0x280,0x280,0x1cb4,0xd18,0xd18,0xd18,0xd18,0x1cc4,0x5a3,0x5a3, + 0x1cce,0x5a3,0x1cdd,0x5a3,0x1ced,0x5a3,0x50e,0x154a,0xd18,0xd18,0xd18,0x5a3,0x1cfd,0x5a3,0x1d0d,0x5a3, + 0x1d1d,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x1d2d,0x147f,0x1d3d,0x147f,0x147f,0x1d4d,0x94e,0x5a3, + 0x1d5d,0x1bf3,0x1d6d,0x5a3,0x1d7d,0x5a3,0x1d8d,0xd18,0xd18,0x1d9d,0x5a3,0x1da8,0x1db8,0x5a3,0x5a3,0x5a3, + 0x1dc8,0x5a3,0x1dd8,0x5a3,0x1de8,0x5a3,0x1df8,0x1548,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3, + 0x5a3,0x1094,0xd18,0xd18,0xd18,0x41,0x41,0x41,0x1e08,0x61,0x61,0x61,0x1e18,0x5a3,0x5a3,0x1e28, + 0xb24,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x147f,0x1bed,0x5a3, + 0x5a3,0x1e38,0xd99,0xd18,0xd18,0xd18,0xd18,0x5a3,0x1d8d,0x1e48,0x5a3,0x577,0x1e58,0xd18,0x5a3,0x1e68, + 0xd18,0xd18,0x5a3,0x1e78,0xd18,0x5a3,0x1663,0x1e88,0x5a3,0x5a3,0x575,0x1e98,0x1d3d,0x1ea8,0x1eb8,0x7cb, + 0x5a3,0x5a3,0x1ec8,0x1ed6,0x5a3,0x1094,0xb24,0x773,0x5a3,0x1ee6,0x1ef3,0x1f03,0x5a3,0x5a3,0x1f13,0x7cb, + 0x5a3,0x5a3,0x1f23,0x1f32,0x1f42,0x1f52,0x1f5d,0x5a3,0x954,0x1f6d,0x1f7c,0xd18,0xd18,0xd18,0xd18,0x1f8c, + 0x863,0x1f9b,0x5a3,0x5a3,0x630,0x1fab,0xb24,0x1fbb,0x858,0x868,0x1fca,0x1fda,0x1fea,0x1ff8,0x141d,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x2008,0x2018,0x2028,0xd99,0xd18,0x5a3, + 0x5a3,0x5a3,0x2038,0x2047,0xb24,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3, + 0x5a3,0x2057,0x2066,0x2075,0x207d,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x208d,0x209c,0xb24,0x20ac,0xd18,0x5a3, + 0x5a3,0x20bc,0x20cc,0xb24,0xd18,0xd18,0xd18,0x5a3,0xf74,0x20dc,0x20ec,0x1663,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x1f6d,0x20fc,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0x41,0x41,0x61,0x61,0xc23,0x210c,0x211b,0x2127,0x5a3,0x2137,0x2147,0xb24,0xd18,0xd18,0xd18, + 0xd18,0x2157,0x5a3,0x5a3,0x2166,0x2176,0xd18,0x2186,0x5a3,0x5a3,0x2193,0x21a2,0x21b2,0x5a3,0x5a3,0x573, + 0x21c2,0x21d0,0x5a3,0x5a3,0x5a3,0x5a3,0x1094,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x868,0x5a3,0x2057,0x21e0,0x21f0,0xc23,0xf8d,0x550,0x5a3, + 0xe2a,0x2200,0x220f,0xd18,0xd18,0xd18,0xd18,0x96e,0x5a3,0x5a3,0x221f,0x222e,0xb24,0x223e,0x5a3,0x2248, + 0x2258,0xb24,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0x5a3,0x2268,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x993,0x147f,0x2278, + 0x2287,0x2295,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x1093,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x148f,0x148f,0x148f,0x148f,0x148f,0x148f,0x22a5,0x22b5,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0xd97,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x22c5,0x5a3,0x5a3, + 0x50e,0x22d5,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3, + 0x5a3,0x5a3,0x1663,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3, + 0x5a3,0x1094,0x5a3,0x50e,0x191e,0x5a3,0x5a3,0x5a3,0x5a3,0x50e,0xb24,0x5a3,0x50f,0x22e5,0x5a3,0x5a3, + 0x5a3,0x22f5,0x2305,0x2315,0x2323,0x741,0x5a3,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x41,0x41, + 0x61,0x61,0x147f,0x2333,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x5a3,0xe1d,0x2343, + 0x2344,0x2344,0x234c,0x235b,0xd18,0xd18,0xd18,0xd18,0x2369,0x2379,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x1c6f,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x10bb,0xd18,0xd18,0x1094,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x2389,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0xd98,0xd18,0xd18, + 0xd98,0x2398,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x511,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x73e,0x510,0x1094,0x23a8,0x23b8,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x2ce,0x2ce,0x641,0x2ce,0x141b,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x16d1,0xd18, + 0xd18,0xd18,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x16e1,0x1119,0x1119,0x23c8,0x1119,0x1119,0x1119,0x23d3,0x23e0,0x23ed,0x1119,0x23f9,0x1119,0x1119,0x1119, + 0x153d,0xd18,0x1119,0x1119,0x1119,0x1119,0x2407,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0x147f,0x2417,0x1119,0x1119,0x1119,0x1119,0x1119,0x1541,0x147f,0x1bf3,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x41,0x3b2,0x61,0x2427,0x3ae,0x1c8e,0x12a8,0x41,0xdc,0x2437,0x2447,0x2455,0x1c8f,0x41, + 0x3b2,0x61,0x2462,0x246f,0x61,0x247d,0x248d,0x249c,0x24a0,0x41,0xd8,0x61,0x41,0x3b2,0x61,0x2427, + 0x3ae,0x61,0x12a8,0x41,0xdc,0x24a0,0x41,0xd8,0x61,0x41,0x3b2,0x61,0x24b0,0x41,0x24bf,0xeb, + 0x38a,0x24cf,0x61,0x24db,0x41,0x24bb,0xe7,0x24c9,0xc7,0x61,0xed,0x41,0x24e7,0x61,0x24f4,0x2502, + 0x2502,0x2502,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x1119,0x2ce,0x2ce,0x2ce,0x2512,0x2ce,0x2ce,0x251d,0x252a,0x2536,0x13f8,0x4c2,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x25a,0x2546,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xe4c,0x2556,0x2564,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x5a3,0x5a3,0x510,0x2574,0x2584,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x5a3,0x2594,0xd18,0x5a3,0x5a3,0x633,0x25a4,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x25b4,0x50e,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x25c4,0x141b,0xd18,0xd18,0x41,0x41,0xdc,0x61,0x25d4,0x191e,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x1f52,0x147f,0x147f,0x25e4,0x25f4,0xd18,0xd18, + 0xd18,0xd18,0x1f52,0x147f,0x2604,0x1bee,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xae4,0x5a3,0x2614,0x2621,0x262f,0x263f,0x264d,0x2655,0x867,0x511,0x2664,0x511,0xd18,0xd18, + 0xd18,0x2674,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x1119,0x1119,0x153c,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x16d1,0x1754,0x1118,0x1118,0x1118, + 0x1119,0x16e1,0x2684,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x153a,0xd18,0xd18,0xd18, + 0x1bd6,0x1119,0x1bca,0x1119,0x1119,0x153c,0x153f,0x1bcb,0x16e1,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x2691,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x26a1, + 0x153b,0x153b,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x16d1,0x1119,0x1119,0x1119,0x1119,0x1119,0x153f, + 0x153c,0x1bcc,0x153c,0x1119,0x1119,0x1119,0x1540,0xf9d,0x1119,0x1119,0x1540,0x1119,0x153a,0x1bcb,0xd18,0xd18, + 0xd18,0xd18,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x1119, + 0x1119,0x1119,0x16d1,0x153a,0x26ae,0x1541,0x1119,0x153b,0x153d,0x16e1,0xf9d,0x1540,0x1541,0x1119,0x1119,0x1119, + 0x1119,0x1119,0x1119,0x1119,0x1119,0x1119,0x26be,0x1119,0x1119,0x153d,0xd18,0xd18,0xb24,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0xd18,0xd18,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x1094,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x50f,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0xd99,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x993,0xd18,0x5a3,0x50f,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18, + 0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x5a3,0x5a3,0x5a3, + 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, + 0x5a3,0x73e,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x26ce,0xd18,0x26de, + 0x26de,0x26de,0x26de,0x26de,0x26de,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0xd18,0x2ce,0x2ce,0x2ce, + 0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0x2ce,0xd18,0x1a28,0x1a28,0x1a28, + 0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28, + 0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x26ee,0x84,0xa4,0xc4, + 0xe4,0x104,0x124,0x144,0x164,0x184,0x1a0,0x1c0,0x1da,0x1fa,0x21a,0x23a,0x25a,0x27a,0x29a,0x2b9, + 0x2d9,0x2f9,0x319,0x339,0x359,0x379,0x399,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3bd,0x3b9,0x3b9, + 0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9, + 0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3dd,0x3b9,0x3f5,0x415,0x435,0x455,0x3b9,0x3b9,0x3b9, + 0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x475,0x495,0x495,0x495,0x495,0x4b5,0x4b5,0x4b5, + 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4c5,0x4df,0x4fd,0x51d,0x53d,0x55d,0x57d, + 0x59d,0x5bd,0x5dd,0x5fd,0x617,0x637,0x657,0x677,0x697,0x6b7,0x6d7,0x6f7,0x712,0x3b9,0x732,0x752, + 0x767,0x767,0x767,0x767,0x76e,0x3b9,0x3b9,0x78e,0x767,0x767,0x767,0x767,0x767,0x3b9,0x7ae,0x767, + 0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x3b9, + 0x7ce,0x767,0x7ea,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x80a,0x3b9,0x3b9,0x82a,0x767, + 0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x83b, + 0x85b,0x872,0x767,0x767,0x767,0x767,0x892,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x8a2,0x8c2, + 0x8e2,0x902,0x922,0x942,0x962,0x767,0x972,0x992,0x9a9,0x767,0x9b9,0x9d9,0x767,0x9f2,0xa12,0xa32, + 0xa52,0x942,0xa72,0xa92,0xaad,0x767,0x767,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9, + 0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9, + 0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0xacd,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0xadd, + 0xafc,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0xb12,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9, + 0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0xb1d,0x767,0x767,0x767,0x767,0x767,0x767,0x3b9,0xb3d,0x767, + 0x767,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0x3b9,0xb5d,0x767,0x767,0x767,0x767,0x767, + 0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767, + 0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0xb7d,0x767,0x767,0x767,0x767, + 0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767, + 0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x767,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, + 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, + 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0xb9d + ] +); + +#[rustfmt::skip] +pub const DATA: ZeroVec<u8> = zerovec!(u8; core::convert::identity; + [ + 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, + 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, + 0xc,0x17,0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18,0x17,0x13,0x17,0x17, + 9,9,9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,1,1,1,1,1,1,2,2,2,2,2,2,0,0, + 1,1,1,1,1,1,0,0,2,2,2,2,2,2,2,2, + 0,1,0,1,0,1,0,1,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,2,2,2,2,2,0,2,2, + 1,1,1,1,3,0x1a,2,0x1a,0x1a,2,2,2,0,2,2,1, + 1,1,1,3,0x1a,0x1a,0x1a,2,2,2,2,0,0,2,2,1, + 1,1,1,0,0x1a,0x1a,0x1a,2,2,2,2,2,2,2,2,1, + 1,1,1,1,0x1a,0x1a,0x1a,0,0,2,2,2,0,2,2,1, + 1,1,1,3,0x1a,0x1a,0,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc, + 0xc,0xc,0x10,0x10,0x10,0x10,0x10,0x13,0x13,0x13,0x13,0x13,0x13,0x17,0x17,0x1c, + 0x1d,0x14,0x1c,0x1c,0x1d,0x14,0x1c,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0xd, + 0xe,0x10,0x10,0x10,0x10,0x10,0xc,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x1c,0x1d,0x17,0x17,0x17,0x17,0x16,0x17,0x17,0x17,0x18,0x14,0x15,0x17,0x17,0x17, + 0x17,0x17,0x17,0x17,0x17,0x17,0x18,0x17,0x16,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x17,0x17,0x17,0xc,0x10,0x10,0x10,0x10,0x10,0,0x10,0x10,0x10,0x10,0x10,0x10, + 0x10,0x10,0x10,0x10,0xb,4,0,0,0xb,0xb,0xb,0xb,0xb,0xb,0x18,0x18, + 0x18,0x14,0x15,4,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0x18,0x18, + 0x18,0x14,0x15,0,4,4,4,4,4,4,4,4,4,4,4,4, + 4,0,0,0,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x19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0x18,0x18,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0, + 0,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0xb,0xb,0xb,0xb,0xb,0xb,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0xb,0xb,0xb, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14, + 0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x14, + 0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,0x15,0x18, + 0x18,0x18,0x18,0x18,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b, + 0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1,2,1,1,1,2,2,1,2,1, + 2,1,2,1,1,1,2,1,2,2,1,2,2,2,2,2, + 2,4,4,1,1,2,1,2,2,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1, + 2,1,2,6,6,1,2,0,0,0,0,0,0x17,0x17,0x17,0x17, + 0xb,0x17,0x17,2,2,2,2,2,2,0,2,0,0,0,0,0, + 2,0,0,5,5,5,5,5,5,5,5,0,0,0,0,0, + 0,0,4,0x17,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,6,5,5,5,5,5,5,5,0,0,0,0,0,0, + 0,0,0,0x17,0x17,0x1c,0x1d,0x1c,0x1d,0x17,0x17,0x17,0x1c,0x1d,0x17,0x1c, + 0x1d,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x13,0x17,0x1c,0x1d,0x17, + 0x17,0x1c,0x1d,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x17,0x17,0x17, + 4,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x13,0x17,0x17,0x17, + 0x17,0x13,0x17,0x14,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x17,0x1b,0x1b,0x17,0x17,0x17,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x13,0, + 0,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0, + 0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0, + 0,0xc,0x17,0x17,0x17,0x1b,4,5,0xa,0x14,0x15,0x14,0x15,0x14,0x15,0x14, + 0x15,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x13,0x14,0x15,0x15,0x1b, + 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,6,6,6,6,8,8,0x13, + 4,4,4,4,4,0x1b,0x1b,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x11,0x11,2,2,2,2,2,2,2,0, + 0,0,0,0,0,0,0,0,2,2,2,2,2,0,0,0, + 0,0,5,6,5,5,5,5,5,5,5,5,5,0x18,5,5, + 5,5,5,5,5,0,5,5,5,5,5,0,5,0,5,5, + 0,5,5,0,5,5,5,5,5,5,5,5,5,5,0x1a,0x1a, + 0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0,0,0,0, + 0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,0x15,0x14,5,5,5,5,5,5,5, + 5,0,0,0,0,0,0,0,0x1b,5,5,5,5,5,5,5, + 5,5,5,5,5,0x19,0x1b,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x14,0x15,0x17,0,0,0,0,0,0,0x17,0x13,0x13,0x16,0x16,0x14,0x15, + 0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x14,0x15,0x17,0x17, + 0x17,0x17,0x16,0x16,0x16,0x17,0x17,0x17,0,0x17,0x17,0x17,0x17,0x13,0x14,0x15, + 0x14,0x15,0x14,0x15,0x17,0x17,0x18,0x13,0x18,0x18,0x18,0,0x17,0x19,0x17,0x17, + 0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0,0,0x10,0,0x17,0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18, + 0x17,0x13,0x17,0x17,2,2,2,2,2,2,2,2,2,2,2,0x14, + 0x18,0x15,0x18,0x14,0x15,0x17,0x14,0x15,0x17,0x17,5,5,5,5,5,5, + 5,5,5,5,4,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,4,4,0,0,5,5,5,5,5,5,0,0, + 5,5,5,0,0,0,0x19,0x19,0x18,0x1a,0x1b,0x19,0x19,0,0x1b,0x18, + 0x18,0x18,0x18,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0x10,0x10, + 0x10,0x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,0x18,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xb,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x1a, + 0x1a,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0x1b,0x1b, + 0x1b,0x1b,0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0x1b,0x1b, + 0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x10, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x10,0x10, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x11,0x11, + 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0,0,0,0 + ] +); + +pub static HEADER: CodePointTrieHeader = CodePointTrieHeader { + high_start: 0x110000, + shifted12_high_start: 0x110, + trie_type: TrieType::Small, + index3_null_offset: 0x767, + data_null_offset: 0xd18, + null_value: 0x0, +}; diff --git a/third_party/rust/icu_collections/src/codepointtrie/benches/tries/mod.rs b/third_party/rust/icu_collections/src/codepointtrie/benches/tries/mod.rs new file mode 100644 index 0000000000..870cc0f1f6 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/benches/tries/mod.rs @@ -0,0 +1,7 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +#[cfg(feature = "bench")] +pub mod gc_fast; +pub mod gc_small; diff --git a/third_party/rust/icu_collections/src/codepointtrie/cptrie.rs b/third_party/rust/icu_collections/src/codepointtrie/cptrie.rs new file mode 100644 index 0000000000..35208356f6 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/cptrie.rs @@ -0,0 +1,1282 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use crate::codepointtrie::error::Error; +use crate::codepointtrie::impl_const::*; + +use crate::codepointinvlist::CodePointInversionList; +use core::char::CharTryFromError; +use core::convert::Infallible; +use core::convert::TryFrom; +use core::fmt::Display; +use core::iter::FromIterator; +use core::num::TryFromIntError; +use core::ops::RangeInclusive; +use yoke::Yokeable; +use zerofrom::ZeroFrom; +use zerovec::ZeroVec; +use zerovec::ZeroVecError; + +/// The type of trie represents whether the trie has an optimization that +/// would make it smaller or faster. +/// +/// Regarding performance, a trie being a small or fast type affects the number of array lookups +/// needed for code points in the range `[0x1000, 0x10000)`. In this range, `Small` tries use 4 array lookups, +/// while `Fast` tries use 2 array lookups. +/// Code points before the interval (in `[0, 0x1000)`) will always use 2 array lookups. +/// Code points after the interval (in `[0x10000, 0x10FFFF]`) will always use 4 array lookups. +/// +/// Regarding size, `Fast` type tries are larger than `Small` type tries because the minimum size of +/// the index array is larger. The minimum size is the "fast max" limit, which is the limit of the range +/// of code points with 2 array lookups. +/// +/// See the document [Unicode Properties and Code Point Tries in ICU4X](https://github.com/unicode-org/icu4x/blob/main/docs/design/properties_code_point_trie.md). +/// +/// Also see [`UCPTrieType`](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/ucptrie_8h.html) in ICU4C. +#[derive(Clone, Copy, PartialEq, Debug, Eq)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] +#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = icu_collections::codepointtrie))] +pub enum TrieType { + /// Represents the "fast" type code point tries for the + /// [`TrieType`] trait. The "fast max" limit is set to `0xffff`. + Fast = 0, + /// Represents the "small" type code point tries for the + /// [`TrieType`] trait. The "fast max" limit is set to `0x0fff`. + Small = 1, +} + +// TrieValue trait + +// AsULE is AsUnalignedLittleEndian, i.e. "allowed in a zerovec" + +/// A trait representing the values stored in the data array of a [`CodePointTrie`]. +/// This trait is used as a type parameter in constructing a `CodePointTrie`. +pub trait TrieValue: Copy + Eq + PartialEq + zerovec::ule::AsULE + 'static { + /// Last-resort fallback value to return if we cannot read data from the trie. + /// + /// In most cases, the error value is read from the last element of the `data` array, + /// this value is used for empty codepointtrie arrays + + /// Error type when converting from a u32 to this TrieValue. + type TryFromU32Error: Display; + /// A parsing function that is primarily motivated by deserialization contexts. + /// When the serialization type width is smaller than 32 bits, then it is expected + /// that the call site will widen the value to a `u32` first. + fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>; + + /// A method for converting back to a u32 that can roundtrip through + /// [`Self::try_from_u32()`]. The default implementation of this trait + /// method panics in debug mode and returns 0 in release mode. + /// + /// This method is allowed to have GIGO behavior when fed a value that has + /// no corresponding u32 (since such values cannot be stored in the trie) + fn to_u32(self) -> u32 { + debug_assert!( + false, + "TrieValue::to_u32() not implemented for {}", + ::core::any::type_name::<Self>() + ); + 0 + } +} + +macro_rules! impl_primitive_trie_value { + ($primitive:ty, $error:ty) => { + impl TrieValue for $primitive { + type TryFromU32Error = $error; + fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error> { + Self::try_from(i) + } + + fn to_u32(self) -> u32 { + // bitcast when the same size, zero-extend/sign-extend + // when not the same size + self as u32 + } + } + }; +} + +impl_primitive_trie_value!(u8, TryFromIntError); +impl_primitive_trie_value!(u16, TryFromIntError); +impl_primitive_trie_value!(u32, Infallible); +impl_primitive_trie_value!(i8, TryFromIntError); +impl_primitive_trie_value!(i16, TryFromIntError); +impl_primitive_trie_value!(i32, TryFromIntError); +impl_primitive_trie_value!(char, CharTryFromError); + +/// Helper function used by [`get_range`]. Converts occurrences of trie's null +/// value into the provided null_value. +/// +/// Note: the ICU version of this helper function uses a ValueFilter function +/// to apply a transform on a non-null value. But currently, this implementation +/// stops short of that functionality, and instead leaves the non-null trie value +/// untouched. This is equivalent to having a ValueFilter function that is the +/// identity function. +fn maybe_filter_value<T: TrieValue>(value: T, trie_null_value: T, null_value: T) -> T { + if value == trie_null_value { + null_value + } else { + value + } +} + +/// This struct represents a de-serialized CodePointTrie that was exported from +/// ICU binary data. +/// +/// For more information: +/// - [ICU Site design doc](http://site.icu-project.org/design/struct/utrie) +/// - [ICU User Guide section on Properties lookup](https://unicode-org.github.io/icu/userguide/strings/properties.html#lookup) +// serde impls in crate::serde +#[derive(Debug, Eq, PartialEq, Yokeable, ZeroFrom)] +pub struct CodePointTrie<'trie, T: TrieValue> { + pub(crate) header: CodePointTrieHeader, + pub(crate) index: ZeroVec<'trie, u16>, + pub(crate) data: ZeroVec<'trie, T>, + // serde impl skips this field + #[zerofrom(clone)] // TrieValue is Copy, this allows us to avoid + // a T: ZeroFrom bound + pub(crate) error_value: T, +} + +/// This struct contains the fixed-length header fields of a [`CodePointTrie`]. +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] +#[cfg_attr(feature = "databake", derive(databake::Bake), databake(path = icu_collections::codepointtrie))] +#[derive(Copy, Clone, Debug, Eq, PartialEq, Yokeable, ZeroFrom)] +pub struct CodePointTrieHeader { + /// The code point of the start of the last range of the trie. A + /// range is defined as a partition of the code point space such that the + /// value in this trie associated with all code points of the same range is + /// the same. + /// + /// For the property value data for many Unicode properties, + /// often times, `high_start` is `U+10000` or lower. In such cases, not + /// reserving space in the `index` array for duplicate values is a large + /// savings. The "highValue" associated with the `high_start` range is + /// stored at the second-to-last position of the `data` array. + /// (See `impl_const::HIGH_VALUE_NEG_DATA_OFFSET`.) + pub high_start: u32, + /// A version of the `high_start` value that is right-shifted 12 spaces, + /// but is rounded up to a multiple `0x1000` for easy testing from UTF-8 + /// lead bytes. + pub shifted12_high_start: u16, + /// Offset for the null block in the "index-3" table of the `index` array. + /// Set to an impossibly high value (e.g., `0xffff`) if there is no + /// dedicated index-3 null block. + pub index3_null_offset: u16, + /// Internal data null block offset, not shifted. + /// Set to an impossibly high value (e.g., `0xfffff`) if there is no + /// dedicated data null block. + pub data_null_offset: u32, + /// The value stored in the trie that represents a null value being + /// associated to a code point. + pub null_value: u32, + /// The enum value representing the type of trie, where trie type is as it + /// is defined in ICU (ex: Fast, Small). + pub trie_type: TrieType, +} + +impl TryFrom<u8> for TrieType { + type Error = crate::codepointtrie::error::Error; + + fn try_from(trie_type_int: u8) -> Result<TrieType, crate::codepointtrie::error::Error> { + match trie_type_int { + 0 => Ok(TrieType::Fast), + 1 => Ok(TrieType::Small), + _ => Err(crate::codepointtrie::error::Error::FromDeserialized { + reason: "Cannot parse value for trie_type", + }), + } + } +} + +impl<'trie, T: TrieValue> CodePointTrie<'trie, T> { + #[doc(hidden)] // databake internal + pub const fn from_parts( + header: CodePointTrieHeader, + index: ZeroVec<'trie, u16>, + data: ZeroVec<'trie, T>, + error_value: T, + ) -> Self { + Self { + header, + index, + data, + error_value, + } + } + + /// Returns a new [`CodePointTrie`] backed by borrowed data for the `index` + /// array and `data` array, whose data values have width `W`. + pub fn try_new( + header: CodePointTrieHeader, + index: ZeroVec<'trie, u16>, + data: ZeroVec<'trie, T>, + ) -> Result<CodePointTrie<'trie, T>, Error> { + // Validation invariants are not needed here when constructing a new + // `CodePointTrie` because: + // + // - Rust includes the size of a slice (or Vec or similar), which allows it + // to prevent lookups at out-of-bounds indices, whereas in C++, it is the + // programmer's responsibility to keep track of length info. + // - For lookups into collections, Rust guarantees that a fallback value will + // be returned in the case of `.get()` encountering a lookup error, via + // the `Option` type. + // - The `ZeroVec` serializer stores the length of the array along with the + // ZeroVec data, meaning that a deserializer would also see that length info. + + let error_value = data.last().ok_or(Error::EmptyDataVector)?; + let trie: CodePointTrie<'trie, T> = CodePointTrie { + header, + index, + data, + error_value, + }; + Ok(trie) + } + + /// Returns the position in the data array containing the trie's stored + /// error value. + #[inline(always)] // `always` based on normalizer benchmarking + fn trie_error_val_index(&self) -> u32 { + self.data.len() as u32 - ERROR_VALUE_NEG_DATA_OFFSET + } + + fn internal_small_index(&self, code_point: u32) -> u32 { + let mut index1_pos: u32 = code_point >> SHIFT_1; + if self.header.trie_type == TrieType::Fast { + debug_assert!( + FAST_TYPE_FAST_INDEXING_MAX < code_point && code_point < self.header.high_start + ); + index1_pos = index1_pos + BMP_INDEX_LENGTH - OMITTED_BMP_INDEX_1_LENGTH; + } else { + assert!(code_point < self.header.high_start && self.header.high_start > SMALL_LIMIT); + index1_pos += SMALL_INDEX_LENGTH; + } + let index1_val = if let Some(index1_val) = self.index.get(index1_pos as usize) { + index1_val + } else { + return self.trie_error_val_index(); + }; + let index3_block_idx: u32 = (index1_val as u32) + ((code_point >> SHIFT_2) & INDEX_2_MASK); + let mut index3_block: u32 = + if let Some(index3_block) = self.index.get(index3_block_idx as usize) { + index3_block as u32 + } else { + return self.trie_error_val_index(); + }; + let mut index3_pos: u32 = (code_point >> SHIFT_3) & INDEX_3_MASK; + let mut data_block: u32; + if index3_block & 0x8000 == 0 { + // 16-bit indexes + data_block = + if let Some(data_block) = self.index.get((index3_block + index3_pos) as usize) { + data_block as u32 + } else { + return self.trie_error_val_index(); + }; + } else { + // 18-bit indexes stored in groups of 9 entries per 8 indexes. + index3_block = (index3_block & 0x7fff) + (index3_pos & !7) + (index3_pos >> 3); + index3_pos &= 7; + data_block = if let Some(data_block) = self.index.get(index3_block as usize) { + data_block as u32 + } else { + return self.trie_error_val_index(); + }; + data_block = (data_block << (2 + (2 * index3_pos))) & 0x30000; + index3_block += 1; + data_block = + if let Some(index3_val) = self.index.get((index3_block + index3_pos) as usize) { + data_block | (index3_val as u32) + } else { + return self.trie_error_val_index(); + }; + } + // Returns data_pos == data_block (offset) + + // portion of code_point bit field for last (4th) lookup + data_block + (code_point & SMALL_DATA_MASK) + } + + /// Returns the position in the `data` array for the given code point, + /// where this code point is at or above the fast limit associated for the + /// `trie_type`. We will refer to that limit as "`fastMax`" here. + /// + /// A lookup of the value in the code point trie for a code point in the + /// code point space range [`fastMax`, `high_start`) will be a 4-step + /// lookup: 3 lookups in the `index` array and one lookup in the `data` + /// array. Lookups for code points in the range [`high_start`, + /// `CODE_POINT_MAX`] are short-circuited to be a single lookup, see + /// [CodePointTrieHeader::high_start]. + fn small_index(&self, code_point: u32) -> u32 { + if code_point >= self.header.high_start { + self.data.len() as u32 - HIGH_VALUE_NEG_DATA_OFFSET + } else { + self.internal_small_index(code_point) // helper fn + } + } + + /// Returns the position in the `data` array for the given code point, + /// where this code point is below the fast limit associated for the + /// `trie type`. We will refer to that limit as "`fastMax`" here. + /// + /// A lookup of the value in the code point trie for a code point in the + /// code point space range [0, `fastMax`) will be a 2-step lookup: 1 + /// lookup in the `index` array and one lookup in the `data` array. By + /// design, for trie type `T`, there is an element allocated in the `index` + /// array for each block of code points in [0, `fastMax`), which in + /// turn guarantees that those code points are represented and only need 1 + /// lookup. + #[inline(always)] // `always` based on normalizer benchmarking + fn fast_index(&self, code_point: u32) -> u32 { + let index_array_pos: u32 = code_point >> FAST_TYPE_SHIFT; + let index_array_val: u16 = + if let Some(index_array_val) = self.index.get(index_array_pos as usize) { + index_array_val + } else { + return self.trie_error_val_index(); + }; + let fast_index_val: u32 = index_array_val as u32 + (code_point & FAST_TYPE_DATA_MASK); + fast_index_val + } + + /// Returns the value that is associated with `code_point` in this [`CodePointTrie`]. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointtrie::planes; + /// let trie = planes::get_planes_trie(); + /// + /// assert_eq!(0, trie.get32(0x41)); // 'A' as u32 + /// assert_eq!(0, trie.get32(0x13E0)); // 'Ꮰ' as u32 + /// assert_eq!(1, trie.get32(0x10044)); // '𐁄' as u32 + /// ``` + #[inline(always)] // `always` based on normalizer benchmarking + pub fn get32(&self, code_point: u32) -> T { + // If we cannot read from the data array, then return the sentinel value + // self.error_value() for the instance type for T: TrieValue. + self.get32_ule(code_point) + .map(|t| T::from_unaligned(*t)) + .unwrap_or(self.error_value) + } + + /// Returns the value that is associated with `char` in this [`CodePointTrie`]. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointtrie::planes; + /// let trie = planes::get_planes_trie(); + /// + /// assert_eq!(0, trie.get('A')); // 'A' as u32 + /// assert_eq!(0, trie.get('Ꮰ')); // 'Ꮰ' as u32 + /// assert_eq!(1, trie.get('𐁄')); // '𐁄' as u32 + /// ``` + #[inline(always)] + pub fn get(&self, c: char) -> T { + self.get32(u32::from(c)) + } + + /// Returns a reference to the ULE of the value that is associated with `code_point` in this [`CodePointTrie`]. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointtrie::planes; + /// let trie = planes::get_planes_trie(); + /// + /// assert_eq!(Some(&0), trie.get32_ule(0x41)); // 'A' as u32 + /// assert_eq!(Some(&0), trie.get32_ule(0x13E0)); // 'Ꮰ' as u32 + /// assert_eq!(Some(&1), trie.get32_ule(0x10044)); // '𐁄' as u32 + /// ``` + #[inline(always)] // `always` based on normalizer benchmarking + pub fn get32_ule(&self, code_point: u32) -> Option<&T::ULE> { + // All code points up to the fast max limit are represented + // individually in the `index` array to hold their `data` array position, and + // thus only need 2 lookups for a [CodePointTrie::get()](`crate::codepointtrie::CodePointTrie::get`). + // Code points above the "fast max" limit require 4 lookups. + let fast_max = match self.header.trie_type { + TrieType::Fast => FAST_TYPE_FAST_INDEXING_MAX, + TrieType::Small => SMALL_TYPE_FAST_INDEXING_MAX, + }; + let data_pos: u32 = if code_point <= fast_max { + Self::fast_index(self, code_point) + } else if code_point <= CODE_POINT_MAX { + Self::small_index(self, code_point) + } else { + self.trie_error_val_index() + }; + // Returns the trie value (or trie's error value). + self.data.as_ule_slice().get(data_pos as usize) + } + + /// Converts the CodePointTrie into one that returns another type of the same size. + /// + /// Borrowed data remains borrowed, and owned data remains owned. + /// + /// If the old and new types are not the same size, use + /// [`CodePointTrie::try_alloc_map_value`]. + /// + /// # Panics + /// + /// Panics if `T` and `P` are different sizes. + /// + /// More specifically, panics if [ZeroVec::try_into_converted()] panics when converting + /// `ZeroVec<T>` into `ZeroVec<P>`, which happens if `T::ULE` and `P::ULE` differ in size. + /// + /// # Examples + /// + /// ```no_run + /// use icu_collections::codepointtrie::planes; + /// use icu_collections::codepointtrie::CodePointTrie; + /// + /// let planes_trie_u8: CodePointTrie<u8> = planes::get_planes_trie(); + /// let planes_trie_i8: CodePointTrie<i8> = + /// planes_trie_u8.try_into_converted().expect("infallible"); + /// + /// assert_eq!(planes_trie_i8.get32(0x30000), 3); + /// ``` + pub fn try_into_converted<P>(self) -> Result<CodePointTrie<'trie, P>, ZeroVecError> + where + P: TrieValue, + { + let converted_data = self.data.try_into_converted()?; + let error_ule = self.error_value.to_unaligned(); + let slice = &[error_ule]; + let error_vec = ZeroVec::<T>::new_borrowed(slice); + let error_converted = error_vec.try_into_converted::<P>()?; + #[allow(clippy::expect_used)] // we know this cannot fail + Ok(CodePointTrie { + header: self.header, + index: self.index, + data: converted_data, + error_value: error_converted + .get(0) + .expect("vector known to have one element"), + }) + } + + /// Maps the CodePointTrie into one that returns a different type. + /// + /// This function returns owned data. + /// + /// If the old and new types are the same size, use the more efficient + /// [`CodePointTrie::try_into_converted`]. + /// + /// # Examples + /// + /// ``` + /// use core::convert::Infallible; + /// use icu_collections::codepointtrie::planes; + /// use icu_collections::codepointtrie::CodePointTrie; + /// + /// let planes_trie_u8: CodePointTrie<u8> = planes::get_planes_trie(); + /// let planes_trie_u16: CodePointTrie<u16> = planes_trie_u8 + /// .try_alloc_map_value(TryFrom::try_from) + /// .expect("infallible"); + /// + /// assert_eq!(planes_trie_u16.get32(0x30000), 3); + /// ``` + pub fn try_alloc_map_value<P, E>( + &self, + mut f: impl FnMut(T) -> Result<P, E>, + ) -> Result<CodePointTrie<'trie, P>, E> + where + P: TrieValue, + { + let error_converted = f(self.error_value)?; + let converted_data = self.data.iter().map(f).collect::<Result<ZeroVec<P>, E>>()?; + Ok(CodePointTrie { + header: self.header, + index: self.index.clone(), + data: converted_data, + error_value: error_converted, + }) + } + + /// Returns a [`CodePointMapRange`] struct which represents a range of code + /// points associated with the same trie value. The returned range will be + /// the longest stretch of consecutive code points starting at `start` that + /// share this value. + /// + /// This method is designed to use the internal details of + /// the structure of [`CodePointTrie`] to be optimally efficient. This will + /// outperform a naive approach that just uses [`CodePointTrie::get()`]. + /// + /// This method provides lower-level functionality that can be used in the + /// implementation of other methods that are more convenient to the user. + /// To obtain an optimal partition of the code point space for + /// this trie resulting in the fewest number of ranges, see + /// [`CodePointTrie::iter_ranges()`]. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointtrie::planes; + /// + /// let trie = planes::get_planes_trie(); + /// + /// const CODE_POINT_MAX: u32 = 0x10ffff; + /// let start = 0x1_0000; + /// let exp_end = 0x1_ffff; + /// + /// let start_val = trie.get32(start); + /// assert_eq!(trie.get32(exp_end), start_val); + /// assert_ne!(trie.get32(exp_end + 1), start_val); + /// + /// use core::ops::RangeInclusive; + /// use icu_collections::codepointtrie::CodePointMapRange; + /// + /// let cpm_range: CodePointMapRange<u8> = trie.get_range(start).unwrap(); + /// + /// assert_eq!(cpm_range.range.start(), &start); + /// assert_eq!(cpm_range.range.end(), &exp_end); + /// assert_eq!(cpm_range.value, start_val); + /// + /// // `start` can be any code point, whether or not it lies on the boundary + /// // of a maximally large range that still contains `start` + /// + /// let submaximal_1_start = start + 0x1234; + /// let submaximal_1 = trie.get_range(submaximal_1_start).unwrap(); + /// assert_eq!(submaximal_1.range.start(), &0x1_1234); + /// assert_eq!(submaximal_1.range.end(), &0x1_ffff); + /// assert_eq!(submaximal_1.value, start_val); + /// + /// let submaximal_2_start = start + 0xffff; + /// let submaximal_2 = trie.get_range(submaximal_2_start).unwrap(); + /// assert_eq!(submaximal_2.range.start(), &0x1_ffff); + /// assert_eq!(submaximal_2.range.end(), &0x1_ffff); + /// assert_eq!(submaximal_2.value, start_val); + /// ``` + pub fn get_range(&self, start: u32) -> Option<CodePointMapRange<T>> { + // Exit early if the start code point is out of range, or if it is + // in the last range of code points in high_start..=CODE_POINT_MAX + // (start- and end-inclusive) that all share the same trie value. + if CODE_POINT_MAX < start { + return None; + } + if start >= self.header.high_start { + let di: usize = self.data.len() - (HIGH_VALUE_NEG_DATA_OFFSET as usize); + let value: T = self.data.get(di)?; + return Some(CodePointMapRange { + range: RangeInclusive::new(start, CODE_POINT_MAX), + value, + }); + } + + let null_value: T = T::try_from_u32(self.header.null_value).ok()?; + + let mut prev_i3_block: u32 = u32::MAX; // using u32::MAX (instead of -1 as an i32 in ICU) + let mut prev_block: u32 = u32::MAX; // using u32::MAX (instead of -1 as an i32 in ICU) + let mut c: u32 = start; + let mut trie_value: T = self.error_value(); + let mut value: T = self.error_value(); + let mut have_value: bool = false; + + loop { + let i3_block: u32; + let mut i3: u32; + let i3_block_length: u32; + let data_block_length: u32; + + // Initialize values before beginning the iteration in the subsequent + // `loop` block. In particular, use the "i3*" local variables + // (representing the `index` array position's offset + increment + // for a 3rd-level trie lookup) to help initialize the data block + // variable `block` in the loop for the `data` array. + // + // When a lookup code point is <= the trie's *_FAST_INDEXING_MAX that + // corresponds to its `trie_type`, the lookup only takes 2 steps + // (once into the `index`, once into the `data` array); otherwise, + // takes 4 steps (3 iterative lookups into the `index`, once more + // into the `data` array). So for convenience's sake, when we have the + // 2-stage lookup, reuse the "i3*" variable names for the first lookup. + if c <= 0xffff + && (self.header.trie_type == TrieType::Fast || c <= SMALL_TYPE_FAST_INDEXING_MAX) + { + i3_block = 0; + i3 = c >> FAST_TYPE_SHIFT; + i3_block_length = if self.header.trie_type == TrieType::Fast { + BMP_INDEX_LENGTH + } else { + SMALL_INDEX_LENGTH + }; + data_block_length = FAST_TYPE_DATA_BLOCK_LENGTH; + } else { + // Use the multi-stage index. + let mut i1: u32 = c >> SHIFT_1; + if self.header.trie_type == TrieType::Fast { + debug_assert!(0xffff < c && c < self.header.high_start); + i1 = i1 + BMP_INDEX_LENGTH - OMITTED_BMP_INDEX_1_LENGTH; + } else { + debug_assert!( + c < self.header.high_start && self.header.high_start > SMALL_LIMIT + ); + i1 += SMALL_INDEX_LENGTH; + } + let i2: u16 = self.index.get(i1 as usize)?; + let i3_block_idx: u32 = (i2 as u32) + ((c >> SHIFT_2) & INDEX_2_MASK); + i3_block = if let Some(i3b) = self.index.get(i3_block_idx as usize) { + i3b as u32 + } else { + return None; + }; + if i3_block == prev_i3_block && (c - start) >= CP_PER_INDEX_2_ENTRY { + // The index-3 block is the same as the previous one, and filled with value. + debug_assert!((c & (CP_PER_INDEX_2_ENTRY - 1)) == 0); + c += CP_PER_INDEX_2_ENTRY; + + if c >= self.header.high_start { + break; + } else { + continue; + } + } + prev_i3_block = i3_block; + if i3_block == self.header.index3_null_offset as u32 { + // This is the index-3 null block. + // All of the `data` array blocks pointed to by the values + // in this block of the `index` 3rd-stage subarray will + // contain this trie's null_value. So if we are in the middle + // of a range, end it and return early, otherwise start a new + // range of null values. + if have_value { + if null_value != value { + return Some(CodePointMapRange { + range: RangeInclusive::new(start, c - 1), + value, + }); + } + } else { + trie_value = T::try_from_u32(self.header.null_value).ok()?; + value = null_value; + have_value = true; + } + prev_block = self.header.data_null_offset; + c = (c + CP_PER_INDEX_2_ENTRY) & !(CP_PER_INDEX_2_ENTRY - 1); + + if c >= self.header.high_start { + break; + } else { + continue; + } + } + i3 = (c >> SHIFT_3) & INDEX_3_MASK; + i3_block_length = INDEX_3_BLOCK_LENGTH; + data_block_length = SMALL_DATA_BLOCK_LENGTH; + } + + // Enumerate data blocks for one index-3 block. + loop { + let mut block: u32; + if (i3_block & 0x8000) == 0 { + block = if let Some(b) = self.index.get((i3_block + i3) as usize) { + b as u32 + } else { + return None; + }; + } else { + // 18-bit indexes stored in groups of 9 entries per 8 indexes. + let mut group: u32 = (i3_block & 0x7fff) + (i3 & !7) + (i3 >> 3); + let gi: u32 = i3 & 7; + let gi_val: u32 = if let Some(giv) = self.index.get(group as usize) { + giv.into() + } else { + return None; + }; + block = (gi_val << (2 + (2 * gi))) & 0x30000; + group += 1; + let ggi_val: u32 = if let Some(ggiv) = self.index.get((group + gi) as usize) { + ggiv as u32 + } else { + return None; + }; + block |= ggi_val; + } + + // If our previous and current return values of the 3rd-stage `index` + // lookup yield the same `data` block offset, and if we already know that + // the entire `data` block / subarray starting at that offset stores + // `value` and nothing else, then we can extend our range by the length + // of a data block and continue. + // Otherwise, we have to iterate over the values stored in the + // new data block to see if they differ from `value`. + if block == prev_block && (c - start) >= data_block_length { + // The block is the same as the previous one, and filled with value. + debug_assert!((c & (data_block_length - 1)) == 0); + c += data_block_length; + } else { + let data_mask: u32 = data_block_length - 1; + prev_block = block; + if block == self.header.data_null_offset { + // This is the data null block. + // If we are in the middle of a range, end it and + // return early, otherwise start a new range of null + // values. + if have_value { + if null_value != value { + return Some(CodePointMapRange { + range: RangeInclusive::new(start, c - 1), + value, + }); + } + } else { + trie_value = T::try_from_u32(self.header.null_value).ok()?; + value = null_value; + have_value = true; + } + c = (c + data_block_length) & !data_mask; + } else { + let mut di: u32 = block + (c & data_mask); + let mut trie_value_2: T = self.data.get(di as usize)?; + if have_value { + if trie_value_2 != trie_value { + if maybe_filter_value( + trie_value_2, + T::try_from_u32(self.header.null_value).ok()?, + null_value, + ) != value + { + return Some(CodePointMapRange { + range: RangeInclusive::new(start, c - 1), + value, + }); + } + // `trie_value` stores the previous value that was retrieved + // from the trie. + // `value` stores the value associated for the range (return + // value) that we are currently building, which is computed + // as a transformation by applying maybe_filter_value() + // to the trie value. + // The current trie value `trie_value_2` within this data block + // differs here from the previous value in `trie_value`. + // But both map to `value` after applying `maybe_filter_value`. + // It is not clear whether the previous or the current trie value + // (or neither) is more likely to match potential subsequent trie + // values that would extend the range by mapping to `value`. + // On the assumption of locality -- often times consecutive + // characters map to the same trie values -- remembering the new + // one might make it faster to extend this range further + // (by increasing the chance that the next `trie_value_2 != + // trie_value` test will be false). + trie_value = trie_value_2; // may or may not help + } + } else { + trie_value = trie_value_2; + value = maybe_filter_value( + trie_value_2, + T::try_from_u32(self.header.null_value).ok()?, + null_value, + ); + have_value = true; + } + + c += 1; + while (c & data_mask) != 0 { + di += 1; + trie_value_2 = self.data.get(di as usize)?; + if trie_value_2 != trie_value { + if maybe_filter_value( + trie_value_2, + T::try_from_u32(self.header.null_value).ok()?, + null_value, + ) != value + { + return Some(CodePointMapRange { + range: RangeInclusive::new(start, c - 1), + value, + }); + } + // `trie_value` stores the previous value that was retrieved + // from the trie. + // `value` stores the value associated for the range (return + // value) that we are currently building, which is computed + // as a transformation by applying maybe_filter_value() + // to the trie value. + // The current trie value `trie_value_2` within this data block + // differs here from the previous value in `trie_value`. + // But both map to `value` after applying `maybe_filter_value`. + // It is not clear whether the previous or the current trie value + // (or neither) is more likely to match potential subsequent trie + // values that would extend the range by mapping to `value`. + // On the assumption of locality -- often times consecutive + // characters map to the same trie values -- remembering the new + // one might make it faster to extend this range further + // (by increasing the chance that the next `trie_value_2 != + // trie_value` test will be false). + trie_value = trie_value_2; // may or may not help + } + + c += 1; + } + } + } + + i3 += 1; + if i3 >= i3_block_length { + break; + } + } + + if c >= self.header.high_start { + break; + } + } + + debug_assert!(have_value); + + // Now that c >= high_start, compare `value` to `high_value` to see + // if we can merge our current range with the high_value range + // high_start..=CODE_POINT_MAX (start- and end-inclusive), otherwise + // stop at high_start - 1. + let di: u32 = self.data.len() as u32 - HIGH_VALUE_NEG_DATA_OFFSET; + let high_value: T = self.data.get(di as usize)?; + if maybe_filter_value( + high_value, + T::try_from_u32(self.header.null_value).ok()?, + null_value, + ) != value + { + c -= 1; + } else { + c = CODE_POINT_MAX; + } + Some(CodePointMapRange { + range: RangeInclusive::new(start, c), + value, + }) + } + + /// Yields an [`Iterator`] returning ranges of consecutive code points that + /// share the same value in the [`CodePointTrie`], as given by + /// [`CodePointTrie::get_range()`]. + /// + /// # Examples + /// + /// ``` + /// use core::ops::RangeInclusive; + /// use icu::collections::codepointtrie::planes; + /// use icu_collections::codepointtrie::CodePointMapRange; + /// + /// let planes_trie = planes::get_planes_trie(); + /// + /// let mut ranges = planes_trie.iter_ranges(); + /// + /// for plane in 0..=16 { + /// let exp_start = plane * 0x1_0000; + /// let exp_end = exp_start + 0xffff; + /// assert_eq!( + /// ranges.next(), + /// Some(CodePointMapRange { + /// range: RangeInclusive::new(exp_start, exp_end), + /// value: plane as u8 + /// }) + /// ); + /// } + /// + /// // Hitting the end of the iterator returns `None`, as will subsequent + /// // calls to .next(). + /// assert_eq!(ranges.next(), None); + /// assert_eq!(ranges.next(), None); + /// ``` + pub fn iter_ranges(&self) -> CodePointMapRangeIterator<T> { + let init_range = Some(CodePointMapRange { + range: RangeInclusive::new(u32::MAX, u32::MAX), + value: self.error_value(), + }); + CodePointMapRangeIterator::<T> { + cpt: self, + cpm_range: init_range, + } + } + + /// Yields an [`Iterator`] returning the ranges of the code points whose values + /// match `value` in the [`CodePointTrie`]. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointtrie::planes; + /// + /// let trie = planes::get_planes_trie(); + /// + /// let plane_val = 2; + /// let mut sip_range_iter = trie.get_ranges_for_value(plane_val as u8); + /// + /// let start = plane_val * 0x1_0000; + /// let end = start + 0xffff; + /// + /// let sip_range = sip_range_iter.next() + /// .expect("Plane 2 (SIP) should exist in planes data"); + /// assert_eq!(start..=end, sip_range); + /// + /// assert!(sip_range_iter.next().is_none()); + pub fn get_ranges_for_value(&self, value: T) -> impl Iterator<Item = RangeInclusive<u32>> + '_ { + self.iter_ranges() + .filter(move |cpm_range| cpm_range.value == value) + .map(|cpm_range| cpm_range.range) + } + + /// Yields an [`Iterator`] returning the ranges of the code points after passing + /// the value through a mapping function. + /// + /// This is preferable to calling `.get_ranges().map()` since it will coalesce + /// adjacent ranges into one. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointtrie::planes; + /// + /// let trie = planes::get_planes_trie(); + /// + /// let plane_val = 2; + /// let mut sip_range_iter = trie.iter_ranges_mapped(|value| value != plane_val as u8).filter(|range| range.value); + /// + /// let end = plane_val * 0x1_0000 - 1; + /// + /// let sip_range = sip_range_iter.next() + /// .expect("Complemented planes data should have at least one entry"); + /// assert_eq!(0..=end, sip_range.range); + pub fn iter_ranges_mapped<'a, U: Eq + 'a>( + &'a self, + mut map: impl FnMut(T) -> U + Copy + 'a, + ) -> impl Iterator<Item = CodePointMapRange<U>> + 'a { + crate::iterator_utils::RangeListIteratorCoalescer::new(self.iter_ranges().map( + move |range| CodePointMapRange { + range: range.range, + value: map(range.value), + }, + )) + } + + /// Returns a [`CodePointInversionList`] for the code points that have the given + /// [`TrieValue`] in the trie. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointtrie::planes; + /// + /// let trie = planes::get_planes_trie(); + /// + /// let plane_val = 2; + /// let sip = trie.get_set_for_value(plane_val as u8); + /// + /// let start = plane_val * 0x1_0000; + /// let end = start + 0xffff; + /// + /// assert!(!sip.contains32(start - 1)); + /// assert!(sip.contains32(start)); + /// assert!(sip.contains32(end)); + /// assert!(!sip.contains32(end + 1)); + /// ``` + pub fn get_set_for_value(&self, value: T) -> CodePointInversionList<'static> { + let value_ranges = self.get_ranges_for_value(value); + CodePointInversionList::from_iter(value_ranges) + } + + /// Returns the value used as an error value for this trie + #[inline] + pub fn error_value(&self) -> T { + self.error_value + } +} + +#[cfg(feature = "databake")] +impl<'trie, T: TrieValue + databake::Bake> databake::Bake for CodePointTrie<'trie, T> { + fn bake(&self, env: &databake::CrateEnv) -> databake::TokenStream { + let header = self.header.bake(env); + let index = self.index.bake(env); + let data = self.data.bake(env); + let error_value = self.error_value.bake(env); + databake::quote! { icu_collections::codepointtrie::CodePointTrie::from_parts(#header, #index, #data, #error_value) } + } +} + +impl<'trie, T: TrieValue + Into<u32>> CodePointTrie<'trie, T> { + /// Returns the value that is associated with `code_point` for this [`CodePointTrie`] + /// as a `u32`. + /// + /// # Examples + /// + /// ``` + /// use icu_collections::codepointtrie::planes; + /// let trie = planes::get_planes_trie(); + /// + /// let cp = '𑖎' as u32; + /// assert_eq!(cp, 0x1158E); + /// + /// let plane_num: u8 = trie.get32(cp); + /// assert_eq!(trie.get32_u32(cp), plane_num as u32); + /// ``` + // Note: This API method maintains consistency with the corresponding + // original ICU APIs. + pub fn get32_u32(&self, code_point: u32) -> u32 { + self.get32(code_point).into() + } +} + +impl<'trie, T: TrieValue> Clone for CodePointTrie<'trie, T> +where + <T as zerovec::ule::AsULE>::ULE: Clone, +{ + fn clone(&self) -> Self { + CodePointTrie { + header: self.header, + index: self.index.clone(), + data: self.data.clone(), + error_value: self.error_value, + } + } +} + +/// Represents a range of consecutive code points sharing the same value in a +/// code point map. The start and end of the interval is represented as a +/// `RangeInclusive<u32>`, and the value is represented as `T`. +#[derive(PartialEq, Eq, Debug, Clone)] +pub struct CodePointMapRange<T> { + /// Range of code points from start to end (inclusive). + pub range: RangeInclusive<u32>, + /// Trie value associated with this range. + pub value: T, +} + +/// A custom [`Iterator`] type specifically for a code point trie that returns +/// [`CodePointMapRange`]s. +pub struct CodePointMapRangeIterator<'a, T: TrieValue> { + cpt: &'a CodePointTrie<'a, T>, + // Initialize `range` to Some(CodePointMapRange{ start: u32::MAX, end: u32::MAX, value: 0}). + // When `range` is Some(...) and has a start value different from u32::MAX, then we have + // returned at least one code point range due to a call to `next()`. + // When `range` == `None`, it means that we have hit the end of iteration. It would occur + // after a call to `next()` returns a None <=> we attempted to call `get_range()` + // with a start code point that is > CODE_POINT_MAX. + cpm_range: Option<CodePointMapRange<T>>, +} + +impl<'a, T: TrieValue> Iterator for CodePointMapRangeIterator<'a, T> { + type Item = CodePointMapRange<T>; + + fn next(&mut self) -> Option<Self::Item> { + self.cpm_range = match &self.cpm_range { + Some(cpmr) => { + if *cpmr.range.start() == u32::MAX { + self.cpt.get_range(0) + } else { + self.cpt.get_range(cpmr.range.end() + 1) + } + } + None => None, + }; + // Note: Clone is cheap. We can't Copy because RangeInclusive does not impl Copy. + self.cpm_range.clone() + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::codepointtrie::planes; + use alloc::vec::Vec; + + #[test] + #[cfg(feature = "serde")] + fn test_serde_with_postcard_roundtrip() -> Result<(), postcard::Error> { + let trie = crate::codepointtrie::planes::get_planes_trie(); + let trie_serialized: Vec<u8> = postcard::to_allocvec(&trie).unwrap(); + + // Assert an expected (golden data) version of the serialized trie. + const EXP_TRIE_SERIALIZED: &[u8] = &[ + 128, 128, 64, 128, 2, 2, 0, 0, 1, 160, 18, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, + 2, 144, 2, 144, 2, 144, 2, 176, 2, 176, 2, 176, 2, 176, 2, 208, 2, 208, 2, 208, 2, 208, + 2, 240, 2, 240, 2, 240, 2, 240, 2, 16, 3, 16, 3, 16, 3, 16, 3, 48, 3, 48, 3, 48, 3, 48, + 3, 80, 3, 80, 3, 80, 3, 80, 3, 112, 3, 112, 3, 112, 3, 112, 3, 144, 3, 144, 3, 144, 3, + 144, 3, 176, 3, 176, 3, 176, 3, 176, 3, 208, 3, 208, 3, 208, 3, 208, 3, 240, 3, 240, 3, + 240, 3, 240, 3, 16, 4, 16, 4, 16, 4, 16, 4, 48, 4, 48, 4, 48, 4, 48, 4, 80, 4, 80, 4, + 80, 4, 80, 4, 112, 4, 112, 4, 112, 4, 112, 4, 0, 0, 16, 0, 32, 0, 48, 0, 64, 0, 80, 0, + 96, 0, 112, 0, 0, 0, 16, 0, 32, 0, 48, 0, 0, 0, 16, 0, 32, 0, 48, 0, 0, 0, 16, 0, 32, + 0, 48, 0, 0, 0, 16, 0, 32, 0, 48, 0, 0, 0, 16, 0, 32, 0, 48, 0, 0, 0, 16, 0, 32, 0, 48, + 0, 0, 0, 16, 0, 32, 0, 48, 0, 0, 0, 16, 0, 32, 0, 48, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, + 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, + 0, 144, 0, 144, 0, 144, 0, 144, 0, 144, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, 0, 160, + 0, 160, 0, 160, 0, 160, 0, 160, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, + 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, + 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, 0, 176, + 0, 176, 0, 176, 0, 176, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, + 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, + 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192, + 0, 192, 0, 192, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, + 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, + 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, 0, 208, + 0, 208, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, + 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, + 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, 0, 224, + 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, + 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, + 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 240, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, + 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, + 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 32, 1, 32, 1, 32, 1, + 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, + 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, + 32, 1, 32, 1, 32, 1, 32, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, + 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, + 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 64, 1, 64, + 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, + 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, + 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, + 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, + 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, + 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, + 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, + 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 128, 0, 136, 0, 136, 0, 136, 0, 136, + 0, 136, 0, 136, 0, 136, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, + 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, + 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, + 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, + 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, + 168, 0, 168, 0, 168, 0, 168, 0, 168, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, + 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, + 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, 200, 0, + 200, 0, 200, 0, 200, 0, 200, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, + 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, + 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, 232, 0, + 232, 0, 232, 0, 232, 0, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, + 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, + 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, + 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, + 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, + 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 104, 1, 104, 1, 104, 1, 104, 1, + 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, + 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, + 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, + 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, + 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, + 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, + 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, + 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, + 168, 1, 168, 1, 168, 1, 168, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, + 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, + 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, + 200, 1, 200, 1, 200, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, + 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, + 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, + 232, 1, 232, 1, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, + 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, + 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, + 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, + 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 40, 2, 72, + 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, + 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, + 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 72, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, + 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, + 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2, 104, 2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, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 0, + ]; + assert_eq!(trie_serialized, EXP_TRIE_SERIALIZED); + + let trie_deserialized = postcard::from_bytes::<CodePointTrie<u8>>(&trie_serialized)?; + + assert_eq!(&trie.index, &trie_deserialized.index); + assert_eq!(&trie.data, &trie_deserialized.data); + + assert!(!trie_deserialized.index.is_owned()); + assert!(!trie_deserialized.data.is_owned()); + + Ok(()) + } + + #[test] + fn test_get_range() { + let planes_trie = planes::get_planes_trie(); + + let first_range: Option<CodePointMapRange<u8>> = planes_trie.get_range(0x0); + assert_eq!( + first_range, + Some(CodePointMapRange { + range: RangeInclusive::new(0x0, 0xffff), + value: 0 + }) + ); + + let second_range: Option<CodePointMapRange<u8>> = planes_trie.get_range(0x1_0000); + assert_eq!( + second_range, + Some(CodePointMapRange { + range: RangeInclusive::new(0x10000, 0x1ffff), + value: 1 + }) + ); + + let penultimate_range: Option<CodePointMapRange<u8>> = planes_trie.get_range(0xf_0000); + assert_eq!( + penultimate_range, + Some(CodePointMapRange { + range: RangeInclusive::new(0xf_0000, 0xf_ffff), + value: 15 + }) + ); + + let last_range: Option<CodePointMapRange<u8>> = planes_trie.get_range(0x10_0000); + assert_eq!( + last_range, + Some(CodePointMapRange { + range: RangeInclusive::new(0x10_0000, 0x10_ffff), + value: 16 + }) + ); + } + + #[test] + fn databake() { + databake::test_bake!( + CodePointTrie<'static, u32>, + const: crate::codepointtrie::CodePointTrie::from_parts( + crate::codepointtrie::CodePointTrieHeader { + high_start: 1u32, + shifted12_high_start: 2u16, + index3_null_offset: 3u16, + data_null_offset: 4u32, + null_value: 5u32, + trie_type: crate::codepointtrie::TrieType::Small, + }, + zerovec::ZeroVec::new(), + zerovec::ZeroVec::new(), + 0u32, + ), + icu_collections, + [zerovec], + ); + } +} diff --git a/third_party/rust/icu_collections/src/codepointtrie/error.rs b/third_party/rust/icu_collections/src/codepointtrie/error.rs new file mode 100644 index 0000000000..c6e6a09653 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/error.rs @@ -0,0 +1,26 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! Custom error type(s) for the parent module. + +#[cfg(doc)] +use crate::codepointtrie::CodePointTrie; +use displaydoc::Display; + +/// A custom error type for [`CodePointTrie`]. +/// +/// Re-exported as [Error][super::Error]. +#[derive(Copy, Clone, Display, Debug, PartialEq)] +#[non_exhaustive] +pub enum Error { + /// Could not construct CodePointTrie from deserialized values + #[displaydoc("Could not construct CodePointTrie from deserialized values: {reason}")] + FromDeserialized { + /// Reason for inability to deserialize values. + reason: &'static str, + }, + /// CodePointTrie must be constructed from data vector with at least one element + #[displaydoc("CodePointTrie must be constructed from data vector with at least one element")] + EmptyDataVector, +} diff --git a/third_party/rust/icu_collections/src/codepointtrie/impl_const.rs b/third_party/rust/icu_collections/src/codepointtrie/impl_const.rs new file mode 100644 index 0000000000..61e4f2746d --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/impl_const.rs @@ -0,0 +1,76 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +pub const FAST_TYPE_SHIFT: i32 = 6; + +/// Number of entries in a data block for code points below the fast limit. 64=0x40 +pub const FAST_TYPE_DATA_BLOCK_LENGTH: u32 = 1 << FAST_TYPE_SHIFT; + +/// Mask for getting the lower bits for the in-fast-data-block offset. +pub const FAST_TYPE_DATA_MASK: u32 = FAST_TYPE_DATA_BLOCK_LENGTH - 1; + +/// Fast indexing limit for "fast"-type trie +pub const FAST_TYPE_FAST_INDEXING_MAX: u32 = 0xffff; + +/// Fast indexing limit for "small"-type trie +pub const SMALL_TYPE_FAST_INDEXING_MAX: u32 = 0xfff; + +/// Offset from dataLength (to be subtracted) for fetching the +/// value returned for out-of-range code points and ill-formed UTF-8/16. +pub const ERROR_VALUE_NEG_DATA_OFFSET: u32 = 1; + +/// Offset from dataLength (to be subtracted) for fetching the +/// value returned for code points highStart..U+10FFFF. +pub const HIGH_VALUE_NEG_DATA_OFFSET: u32 = 2; + +/// The length of the BMP index table. 1024=0x400 +pub const BMP_INDEX_LENGTH: u32 = 0x10000 >> FAST_TYPE_SHIFT; + +pub const SMALL_LIMIT: u32 = 0x1000; + +pub const SMALL_INDEX_LENGTH: u32 = SMALL_LIMIT >> FAST_TYPE_SHIFT; + +/// Shift size for getting the index-3 table offset. +pub const SHIFT_3: u32 = 4; + +/// Shift size for getting the index-2 table offset. +pub const SHIFT_2: u32 = 5 + SHIFT_3; + +/// Shift size for getting the index-1 table offset. +pub const SHIFT_1: u32 = 5 + SHIFT_2; + +/// Difference between two shift sizes, +/// for getting an index-2 offset from an index-3 offset. 5=9-4 +pub const SHIFT_2_3: u32 = SHIFT_2 - SHIFT_3; + +/// Difference between two shift sizes, +/// for getting an index-1 offset from an index-2 offset. 5=14-9 +pub const SHIFT_1_2: u32 = SHIFT_1 - SHIFT_2; + +/// Number of index-1 entries for the BMP. (4) +/// This part of the index-1 table is omitted from the serialized form. +pub const OMITTED_BMP_INDEX_1_LENGTH: u32 = 0x10000 >> SHIFT_1; + +/// Number of entries in an index-2 block. 32=0x20 +pub const INDEX_2_BLOCK_LENGTH: u32 = 1 << SHIFT_1_2; + +/// Mask for getting the lower bits for the in-index-2-block offset. +pub const INDEX_2_MASK: u32 = INDEX_2_BLOCK_LENGTH - 1; + +/// Number of code points per index-2 table entry. 512=0x200 +pub const CP_PER_INDEX_2_ENTRY: u32 = 1 << SHIFT_2; + +/// Number of entries in an index-3 block. 32=0x20 +pub const INDEX_3_BLOCK_LENGTH: u32 = 1 << SHIFT_2_3; + +/// Mask for getting the lower bits for the in-index-3-block offset. +pub const INDEX_3_MASK: u32 = INDEX_3_BLOCK_LENGTH - 1; + +/// Number of entries in a small data block. 16=0x10 +pub const SMALL_DATA_BLOCK_LENGTH: u32 = 1 << SHIFT_3; + +/// Mask for getting the lower bits for the in-small-data-block offset. +pub const SMALL_DATA_MASK: u32 = SMALL_DATA_BLOCK_LENGTH - 1; + +pub const CODE_POINT_MAX: u32 = 0x10ffff; diff --git a/third_party/rust/icu_collections/src/codepointtrie/mod.rs b/third_party/rust/icu_collections/src/codepointtrie/mod.rs new file mode 100644 index 0000000000..ca9f40c8a1 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/mod.rs @@ -0,0 +1,54 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! This module provides a data structure for an time-efficient lookup of values +//! associated to code points. +//! +//! It is an implementation of the existing [ICU4C UCPTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/ucptrie_8h.html) +//! / [ICU4J CodePointTrie](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4j/) API. +//! +//! # Architecture +//! +//! ICU4X [`CodePointTrie`] is designed to provide a read-only view of CodePointTrie data that is exported +//! from ICU4C. Detailed information about the design of the data structure can be found in the documentation +//! for the [`CodePointTrie`] struct. +//! +//! # Examples +//! +//! ## Querying a `CodePointTrie` +//! +//! ``` +//! use icu_collections::codepointtrie::planes; +//! let trie = planes::get_planes_trie(); +//! +//! assert_eq!(0, trie.get32(0x41)); // 'A' as u32 +//! assert_eq!(0, trie.get32(0x13E0)); // 'Ꮰ' as u32 +//! assert_eq!(1, trie.get32(0x10044)); // '𐁄' as u32 +//! ``` +//! +//! [`ICU4X`]: ../icu/index.html + +extern crate alloc; + +mod cptrie; +mod error; +mod impl_const; +pub mod planes; + +#[cfg(feature = "serde")] +pub mod toml; + +#[cfg(feature = "serde")] +mod serde; + +pub use cptrie::CodePointMapRange; +pub use cptrie::CodePointMapRangeIterator; +pub use cptrie::CodePointTrie; +pub use cptrie::CodePointTrieHeader; +pub use cptrie::TrieType; +pub use cptrie::TrieValue; +pub use error::Error as CodePointTrieError; + +#[doc(no_inline)] +pub use CodePointTrieError as Error; diff --git a/third_party/rust/icu_collections/src/codepointtrie/planes.rs b/third_party/rust/icu_collections/src/codepointtrie/planes.rs new file mode 100644 index 0000000000..5aefbfe4b9 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/planes.rs @@ -0,0 +1,294 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! Sample data for [`CodePointTrie`] that returns the code point's plane number. + +use crate::codepointtrie::cptrie::*; +use zerovec::ZeroVec; + +const INDEX_ARRAY_AS_BYTES: &[u8] = &[ + 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0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0x1, 0x30, 0x1, 0x30, 0x1, 0x30, 0x1, 0x30, 0x1, 0x30, 0x1, 0x30, + 0x1, 0x30, 0x1, 0x30, 0x1, 0x30, 0x1, 0x30, 0x1, 0x30, 0x1, 0x30, 0x1, 0x40, 0x1, 0x40, 0x1, + 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, + 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, + 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, + 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x40, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, + 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, + 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, + 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, 0x1, 0x50, + 0x1, 0x50, 0x1, 0x50, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, + 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, + 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, 0x60, 0x1, + 0x60, 0x1, 0x60, 0x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1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, + 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x28, 0x1, 0x48, 0x1, 0x48, 0x1, + 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, + 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, + 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, + 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x48, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, + 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, + 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, + 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, 0x1, 0x68, + 0x1, 0x68, 0x1, 0x68, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, + 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, + 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, 0x88, 0x1, +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 0x48, 0x2, 0x48, 0x2, 0x48, 0x2, 0x48, 0x2, 0x48, 0x2, 0x48, + 0x2, 0x48, 0x2, 0x48, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, + 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, + 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, + 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, 0x2, 0x68, + 0x2, +]; + +/// Return a [`CodePointTrie`] that returns the Unicode plane number, an +/// integer from 0-16 inclusive, for each code point. This `CodePointTrie` +/// does not actually represent any Unicode property, but it is provided in +/// case it is useful to users of `CodePointTrie` for testing or other +/// purposes. See <https://www.unicode.org/glossary/#plane>. +pub fn get_planes_trie() -> CodePointTrie<'static, u8> { + let index_array_as_bytes: &[u8] = INDEX_ARRAY_AS_BYTES; + let data_8_array: &[u8] = &[ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,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used)] // valid bytes + let data: ZeroVec<u8> = ZeroVec::parse_byte_slice(data_8_array).unwrap(); + let high_start = 0x100000; + let shifted12_high_start = 0x100; + let index3_null_offset = 0x2; + let data_null_offset = 0x0; + let null_value = 0x0; + let trie_type = TrieType::Small; + + let trie_header = CodePointTrieHeader { + high_start, + shifted12_high_start, + index3_null_offset, + data_null_offset, + null_value, + trie_type, + }; + + #[allow(clippy::unwrap_used)] // valid data + CodePointTrie::try_new(trie_header, index, data).unwrap() +} + +#[cfg(test)] +mod tests { + use zerovec::ZeroVec; + + const INDEX_ARRAY: &[u16] = &[ + 0, 0x40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x288, 0x290, 0x290, 0x290, 0x2b0, 0x2b0, 0x2b0, 0x2b0, 0x2d0, 0x2d0, 0x2d0, + 0x2d0, 0x2f0, 0x2f0, 0x2f0, 0x2f0, 0x310, 0x310, 0x310, 0x310, 0x330, 0x330, 0x330, 0x330, + 0x350, 0x350, 0x350, 0x350, 0x370, 0x370, 0x370, 0x370, 0x390, 0x390, 0x390, 0x390, 0x3b0, + 0x3b0, 0x3b0, 0x3b0, 0x3d0, 0x3d0, 0x3d0, 0x3d0, 0x3f0, 0x3f0, 0x3f0, 0x3f0, 0x410, 0x410, + 0x410, 0x410, 0x430, 0x430, 0x430, 0x430, 0x450, 0x450, 0x450, 0x450, 0x470, 0x470, 0x470, + 0x470, 0, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0, 0x10, 0x20, 0x30, 0, 0x10, 0x20, + 0x30, 0, 0x10, 0x20, 0x30, 0, 0x10, 0x20, 0x30, 0, 0x10, 0x20, 0x30, 0, 0x10, 0x20, 0x30, +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xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd0, + 0xd0, 0xd0, 0xd0, 0xd0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, + 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, + 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, + 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, + 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, + 0x110, 0x110, 0x110, 0x110, 0x110, 0x110, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, + 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, + 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x120, 0x130, + 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, + 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, 0x130, + 0x130, 0x130, 0x130, 0x130, 0x130, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, + 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, + 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x140, 0x150, 0x150, + 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, + 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, 0x150, + 0x150, 0x150, 0x150, 0x150, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, + 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, + 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x160, 0x80, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, + 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, + 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, + 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, + 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, + 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0x108, 0x108, + 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, + 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, 0x108, + 0x108, 0x108, 0x108, 0x108, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, + 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, + 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x128, 0x148, 0x148, 0x148, + 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, + 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, 0x148, + 0x148, 0x148, 0x148, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, + 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, + 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x168, 0x188, 0x188, 0x188, 0x188, + 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, + 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, 0x188, + 0x188, 0x188, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, + 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, + 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1a8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, + 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, + 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, 0x1c8, + 0x1c8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, + 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, + 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x1e8, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, + 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, + 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, 0x208, + 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, + 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, + 0x228, 0x228, 0x228, 0x228, 0x228, 0x228, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, + 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, + 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x248, 0x268, + 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, + 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, 0x268, + 0x268, 0x268, 0x268, 0x268, 0x268, + ]; + + #[test] + fn test_index_byte_array_literal() { + let index_array_as_bytes: &[u8] = super::INDEX_ARRAY_AS_BYTES; + let index_zv_bytes: ZeroVec<u16> = + ZeroVec::parse_byte_slice(index_array_as_bytes).expect("infallible"); + let index_zv_aligned: ZeroVec<u16> = ZeroVec::from_slice_or_alloc(INDEX_ARRAY); + assert_eq!(index_zv_bytes, index_zv_aligned); + } +} diff --git a/third_party/rust/icu_collections/src/codepointtrie/serde.rs b/third_party/rust/icu_collections/src/codepointtrie/serde.rs new file mode 100644 index 0000000000..fbd025acef --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/serde.rs @@ -0,0 +1,52 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use crate::codepointtrie::{CodePointTrie, CodePointTrieHeader, TrieValue}; +use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; +use zerofrom::ZeroFrom; +use zerovec::ZeroVec; + +#[derive(Serialize, Deserialize)] +pub struct CodePointTrieSerde<'trie, T: TrieValue> { + header: CodePointTrieHeader, + #[serde(borrow)] + index: ZeroVec<'trie, u16>, + #[serde(borrow)] + data: ZeroVec<'trie, T>, +} + +impl<'trie, T: TrieValue + Serialize> Serialize for CodePointTrie<'trie, T> { + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: Serializer, + { + let ser = CodePointTrieSerde { + header: self.header, + index: ZeroFrom::zero_from(&self.index), + data: ZeroFrom::zero_from(&self.data), + }; + ser.serialize(serializer) + } +} + +impl<'de, 'trie, T: TrieValue + Deserialize<'de>> Deserialize<'de> for CodePointTrie<'trie, T> +where + 'de: 'trie, +{ + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: Deserializer<'de>, + { + let de = CodePointTrieSerde::deserialize(deserializer)?; + let error_value = de.data.last().ok_or_else(|| { + D::Error::custom("CodePointTrie vector must have at least one element") + })?; + Ok(CodePointTrie { + header: de.header, + index: de.index, + data: de.data, + error_value, + }) + } +} diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/planes_test.rs b/third_party/rust/icu_collections/src/codepointtrie/tests/planes_test.rs new file mode 100644 index 0000000000..6ede59735b --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/planes_test.rs @@ -0,0 +1,83 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +mod test_util; + +use icu_collections::codepointtrie::error::Error; +use icu_collections::codepointtrie::planes::get_planes_trie; +use icu_collections::codepointtrie::*; +use test_util::UnicodeEnumeratedProperty; + +use core::convert::TryFrom; +use std::fs::File; +use std::io::Read; +use std::path::Path; +use zerovec::ZeroVec; + +#[test] +fn planes_trie_deserialize_check_test() { + // Get expected planes trie from crate::planes::get_planes_trie() + + let exp_planes_trie = get_planes_trie(); + + // Compute actual planes trie from planes.toml + + let path = Path::new("tests/testdata/planes.toml"); + let display = path.display(); + + let mut file = match File::open(&path) { + Err(why) => panic!("couldn't open {}: {}", display, why), + Ok(file) => file, + }; + + let mut toml_str = String::new(); + + if let Err(why) = file.read_to_string(&mut toml_str) { + panic!("couldn't read {}: {}", display, why) + } + + let planes_enum_prop: UnicodeEnumeratedProperty = ::toml::from_str(&toml_str).unwrap(); + + let code_point_trie_struct = planes_enum_prop.code_point_trie.trie_struct; + + let trie_type_enum = match TrieType::try_from(code_point_trie_struct.trie_type_enum_val) { + Ok(enum_val) => enum_val, + _ => { + panic!( + "Could not parse trie_type serialized enum value in test data file: {}", + code_point_trie_struct.name + ); + } + }; + + let trie_header = CodePointTrieHeader { + high_start: code_point_trie_struct.high_start, + shifted12_high_start: code_point_trie_struct.shifted12_high_start, + index3_null_offset: code_point_trie_struct.index3_null_offset, + data_null_offset: code_point_trie_struct.data_null_offset, + null_value: code_point_trie_struct.null_value, + trie_type: trie_type_enum, + }; + + let data = ZeroVec::from_slice_or_alloc(code_point_trie_struct.data_8.as_ref().unwrap()); + let index = ZeroVec::from_slice_or_alloc(&code_point_trie_struct.index); + let trie_result: Result<CodePointTrie<u8>, Error> = + CodePointTrie::try_new(trie_header, index, data); + let act_planes_trie = trie_result.unwrap(); + + // Get check ranges (inversion map-style sequence of range+value) and + // apply the trie validation test fn on expected and actual tries + + let serialized_ranges: Vec<(u32, u32, u32)> = planes_enum_prop.code_point_map.data.ranges; + let mut check_ranges: Vec<u32> = vec![]; + for range_tuple in serialized_ranges { + let range_end = range_tuple.1 + 1; + let value = range_tuple.2; + check_ranges.push(range_end); + check_ranges.push(value); + } + + test_util::check_trie(&act_planes_trie, &check_ranges); + test_util::check_trie(&exp_planes_trie, &check_ranges); +} diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/test_util.rs b/third_party/rust/icu_collections/src/codepointtrie/tests/test_util.rs new file mode 100644 index 0000000000..c096179cdc --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/test_util.rs @@ -0,0 +1,292 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use icu_collections::codepointtrie::error::Error; +use icu_collections::codepointtrie::*; + +use core::convert::TryFrom; +#[cfg(feature = "serde")] +use serde::{Deserialize, Serialize}; +use std::fs::File; +use std::io::Read; +use std::path::Path; +use zerovec::ZeroVec; + +/// The width of the elements in the data array of a [`CodePointTrie`]. +/// See [`UCPTrieValueWidth`](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/ucptrie_8h.html) in ICU4C. +#[derive(Clone, Copy, PartialEq)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub enum ValueWidthEnum { + Bits16 = 0, + Bits32 = 1, + Bits8 = 2, +} + +/// Test .get() on CodePointTrie by iterating through each range in +/// check_ranges and assert that the associated +/// value matches the trie value for each code point in the range. +pub fn check_trie<T: TrieValue + Into<u32>>(trie: &CodePointTrie<T>, check_ranges: &[u32]) { + assert_eq!( + 0, + check_ranges.len() % 2, + "check_ranges must have an even number of 32-bit values in (limit,value) pairs" + ); + + let mut i: u32 = 0; + let check_range_tuples = check_ranges.chunks(2); + // Iterate over each check range + for range_tuple in check_range_tuples { + let range_limit = range_tuple[0]; + let range_value = range_tuple[1]; + // Check all values in this range, one-by-one + while i < range_limit { + assert_eq!(range_value, trie.get32(i), "trie_get({})", i,); + i += 1; + } + } +} + +/// Test .get_range() / .iter_ranges() on CodePointTrie by calling +/// .iter_ranges() on the trie (which returns an iterator that produces values +/// by calls to .get_range) and see if it matches the values in check_ranges. +pub fn test_check_ranges_get_ranges<T: TrieValue + Into<u32>>( + trie: &CodePointTrie<T>, + check_ranges: &[u32], +) { + assert_eq!( + 0, + check_ranges.len() % 2, + "check_ranges must have an even number of 32-bit values in (limit,value) pairs" + ); + + let mut trie_ranges = trie.iter_ranges(); + + let mut range_start: u32 = 0; + let check_range_tuples = check_ranges.chunks(2); + // Iterate over each check range + for range_tuple in check_range_tuples { + let range_limit = range_tuple[0]; + let range_value = range_tuple[1]; + + // The check ranges array seems to start with a trivial range whose + // limit is zero. range_start is initialized to 0, so we can skip. + if range_limit == 0 { + continue; + } + + let cpm_range = trie_ranges.next(); + assert!(cpm_range.is_some(), "CodePointTrie iter_ranges() produces fewer ranges than the check_ranges field in testdata has"); + let cpm_range = cpm_range.unwrap(); + let cpmr_start = cpm_range.range.start(); + let cpmr_end = cpm_range.range.end(); + let cpmr_value: u32 = cpm_range.value.into(); + + assert_eq!(range_start, *cpmr_start); + assert_eq!(range_limit, *cpmr_end + 1); + assert_eq!(range_value, cpmr_value); + + range_start = range_limit; + } + + assert!(trie_ranges.next() == None, "CodePointTrie iter_ranges() produces more ranges than the check_ranges field in testdata has"); +} + +/// Run above tests that verify the validity of CodePointTrie methods +pub fn run_trie_tests<T: TrieValue + Into<u32>>(trie: &CodePointTrie<T>, check_ranges: &[u32]) { + check_trie(trie, check_ranges); + test_check_ranges_get_ranges(trie, check_ranges); +} + +// The following structs might be useful later for de-/serialization of the +// main `CodePointTrie` struct in the corresponding data provider. + +#[cfg_attr(any(feature = "serde", test), derive(serde::Deserialize))] +pub struct UnicodeEnumeratedProperty { + pub code_point_map: EnumPropCodePointMap, + pub code_point_trie: EnumPropSerializedCPT, +} + +#[cfg_attr(any(feature = "serde", test), derive(serde::Deserialize))] +pub struct EnumPropCodePointMap { + pub data: EnumPropCodePointMapData, +} + +#[cfg_attr(any(feature = "serde", test), derive(serde::Deserialize))] +pub struct EnumPropCodePointMapData { + pub long_name: String, + pub name: String, + pub ranges: Vec<(u32, u32, u32)>, +} + +#[allow(clippy::upper_case_acronyms)] +#[cfg_attr(any(feature = "serde", test), derive(serde::Deserialize))] +pub struct EnumPropSerializedCPT { + #[cfg_attr(any(feature = "serde", test), serde(rename = "struct"))] + pub trie_struct: EnumPropSerializedCPTStruct, +} + +// These structs support the test data dumped as TOML files from ICU. +// Because the properties CodePointMap data will also be dumped from ICU +// using similar functions, some of these structs may be useful to refactor +// into main code at a later point. + +#[allow(clippy::upper_case_acronyms)] +#[cfg_attr(any(feature = "serde", test), derive(serde::Deserialize))] +pub struct EnumPropSerializedCPTStruct { + #[cfg_attr(any(feature = "serde", test), serde(skip))] + pub long_name: String, + pub name: String, + pub index: Vec<u16>, + pub data_8: Option<Vec<u8>>, + pub data_16: Option<Vec<u16>>, + pub data_32: Option<Vec<u32>>, + #[cfg_attr(any(feature = "serde", test), serde(skip))] + pub index_length: u32, + #[cfg_attr(any(feature = "serde", test), serde(skip))] + pub data_length: u32, + #[cfg_attr(any(feature = "serde", test), serde(rename = "highStart"))] + pub high_start: u32, + #[cfg_attr(any(feature = "serde", test), serde(rename = "shifted12HighStart"))] + pub shifted12_high_start: u16, + #[cfg_attr(any(feature = "serde", test), serde(rename = "type"))] + pub trie_type_enum_val: u8, + #[cfg_attr(any(feature = "serde", test), serde(rename = "valueWidth"))] + pub value_width_enum_val: u8, + #[cfg_attr(any(feature = "serde", test), serde(rename = "index3NullOffset"))] + pub index3_null_offset: u16, + #[cfg_attr(any(feature = "serde", test), serde(rename = "dataNullOffset"))] + pub data_null_offset: u32, + #[cfg_attr(any(feature = "serde", test), serde(rename = "nullValue"))] + pub null_value: u32, +} + +// The following structs are specific to the TOML format files for dumped ICU +// test data. + +#[allow(dead_code)] +#[derive(serde::Deserialize)] +pub struct TestFile { + code_point_trie: TestCodePointTrie, +} + +#[allow(dead_code)] +#[derive(serde::Deserialize)] +pub struct TestCodePointTrie { + // The trie_struct field for test data files is dumped from the same source + // (ICU4C) using the same function (usrc_writeUCPTrie) as property data + // for the provider, so we can reuse the same struct here. + #[serde(rename(deserialize = "struct"))] + trie_struct: EnumPropSerializedCPTStruct, + #[serde(rename(deserialize = "testdata"))] + test_data: TestData, +} + +#[allow(dead_code)] +#[derive(serde::Deserialize)] +pub struct TestData { + #[serde(rename(deserialize = "checkRanges"))] + check_ranges: Vec<u32>, +} + +// Given a .toml file dumped from ICU4C test data for UCPTrie, run the test +// data file deserialization into the test file struct, convert and construct +// the `CodePointTrie`, and test the constructed struct against the test file's +// "check ranges" (inversion map ranges) using `check_trie` to verify the +// validity of the `CodePointTrie`'s behavior for all code points. +#[allow(dead_code)] +pub fn run_deserialize_test_from_test_data(test_file_path: &str) { + let path = Path::new(test_file_path); + let display = path.display(); + + let mut file = match File::open(&path) { + Err(err) => panic!("couldn't open {}: {}", display, err), + Ok(file) => file, + }; + + let mut toml_str = String::new(); + + if let Err(err) = file.read_to_string(&mut toml_str) { + panic!("couldn't read {}: {}", display, err) + } + + let test_file: TestFile = ::toml::from_str(&toml_str).unwrap(); + let test_struct = test_file.code_point_trie.trie_struct; + + println!( + "Running CodePointTrie reader logic test on test data file: {}", + test_struct.name + ); + + let trie_type_enum = match TrieType::try_from(test_struct.trie_type_enum_val) { + Ok(enum_val) => enum_val, + _ => { + panic!( + "Could not parse trie_type serialized enum value in test data file: {}", + test_struct.name + ); + } + }; + + let trie_header = CodePointTrieHeader { + high_start: test_struct.high_start, + shifted12_high_start: test_struct.shifted12_high_start, + index3_null_offset: test_struct.index3_null_offset, + data_null_offset: test_struct.data_null_offset, + null_value: test_struct.null_value, + trie_type: trie_type_enum, + }; + + let index = ZeroVec::from_slice_or_alloc(&test_struct.index); + + match (test_struct.data_8, test_struct.data_16, test_struct.data_32) { + (Some(data_8), _, _) => { + let data = ZeroVec::from_slice_or_alloc(&data_8); + let trie_result: Result<CodePointTrie<u8>, Error> = + CodePointTrie::try_new(trie_header, index, data); + assert!(trie_result.is_ok(), "Could not construct trie"); + assert_eq!( + test_struct.value_width_enum_val, + ValueWidthEnum::Bits8 as u8 + ); + run_trie_tests( + &trie_result.unwrap(), + &test_file.code_point_trie.test_data.check_ranges, + ); + } + + (_, Some(data_16), _) => { + let data = ZeroVec::from_slice_or_alloc(&data_16); + let trie_result: Result<CodePointTrie<u16>, Error> = + CodePointTrie::try_new(trie_header, index, data); + assert!(trie_result.is_ok(), "Could not construct trie"); + assert_eq!( + test_struct.value_width_enum_val, + ValueWidthEnum::Bits16 as u8 + ); + run_trie_tests( + &trie_result.unwrap(), + &test_file.code_point_trie.test_data.check_ranges, + ); + } + + (_, _, Some(data_32)) => { + let data = ZeroVec::from_slice_or_alloc(&data_32); + let trie_result: Result<CodePointTrie<u32>, Error> = + CodePointTrie::try_new(trie_header, index, data); + assert!(trie_result.is_ok(), "Could not construct trie"); + assert_eq!( + test_struct.value_width_enum_val, + ValueWidthEnum::Bits32 as u8 + ); + run_trie_tests( + &trie_result.unwrap(), + &test_file.code_point_trie.test_data.check_ranges, + ); + } + + (_, _, _) => { + panic!("Could not match test trie data to a known value width or trie type"); + } + }; +} diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.16.toml new file mode 100644 index 0000000000..7febd4c3b4 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.16.toml @@ -0,0 +1,113 @@ +# This file is part of ICU4X. For terms of use, please see the file +# called LICENSE at the top level of the ICU4X source tree +# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: free-blocks.16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "free-blocks.16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0x80,0xc0,0xc0, + 0xc0,0xc0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0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,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 1,0xad +] +indexLength = 1024 +dataLength = 258 +highStart = 0xa00 +shifted12HighStart = 0x1 +type = 0 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x1 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,1,0x740,1,0x780,2,0x880,3,0x110000,1 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.32.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.32.toml new file mode 100644 index 0000000000..002b6f260d --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.32.toml @@ -0,0 +1,113 @@ +# This file is part of ICU4X. For terms of use, please see the file +# called LICENSE at the top level of the ICU4X source tree +# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: free-blocks.32 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "free-blocks.32" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0x80,0xc0,0xc0, + 0xc0,0xc0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 1,0xad +] +indexLength = 1024 +dataLength = 258 +highStart = 0xa00 +shifted12HighStart = 0x1 +type = 0 +valueWidth = 1 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x1 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,1,0x740,1,0x780,2,0x880,3,0x110000,1 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.8.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.8.toml new file mode 100644 index 0000000000..c8c469cedc --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.8.toml @@ -0,0 +1,113 @@ +# This file is part of ICU4X. For terms of use, please see the file +# called LICENSE at the top level of the ICU4X source tree +# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: free-blocks.8 +# +# machine-generated by: ucptr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0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +] +data_8 = [ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 1,1,1,0xad +] +indexLength = 1024 +dataLength = 260 +highStart = 0xa00 +shifted12HighStart = 0x1 +type = 0 +valueWidth = 2 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x1 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,1,0x740,1,0x780,2,0x880,3,0x110000,1 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.small16.toml new file mode 100644 index 0000000000..8a88bcb031 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/free-blocks.small16.toml @@ -0,0 +1,53 @@ +# This file is part of ICU4X. For terms of use, please see the file +# called LICENSE at the top level of the ICU4X source tree +# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: free-blocks.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "free-blocks.small16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0x80,0xc0,0xc0, + 0xc0,0xc0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +] +data_16 = [ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 1,0xad +] +indexLength = 64 +dataLength = 258 +highStart = 0xa00 +shifted12HighStart = 0x1 +type = 1 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x1 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,1,0x740,1,0x780,2,0x880,3,0x110000,1 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.16.toml new file mode 100644 index 0000000000..4977ec0d85 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.16.toml @@ -0,0 +1,117 @@ +# This file is part of ICU4X. For terms of use, please see the file +# called LICENSE at the top level of the ICU4X source tree +# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: grow-data.16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "grow-data.16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0x60,0x80,0xa0,0xc0, + 0xc0,0xc0,0xe0,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100 +] +data_16 = [ + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0xad +] +indexLength = 1024 +dataLength = 322 +highStart = 0xa00 +shifted12HighStart = 0x1 +type = 0 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x100 +nullValue = 0x5 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,1,0x720,2,0x7a0,3,0x8a0,4,0x110000,5 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.32.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.32.toml new file mode 100644 index 0000000000..01ea3c3adf --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.32.toml @@ -0,0 +1,113 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: grow-data.32 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "grow-data.32" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0x60,0x80,0xa0,0xc0, + 0xc0,0xc0,0xe0,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100 +] +data_32 = [ + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 0xad +] +indexLength = 1024 +dataLength = 321 +highStart = 0xa00 +shifted12HighStart = 0x1 +type = 0 +valueWidth = 1 +index3NullOffset = 0x7fff +dataNullOffset = 0x100 +nullValue = 0x5 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,1,0x720,2,0x7a0,3,0x8a0,4,0x110000,5 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.8.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.8.toml new file mode 100644 index 0000000000..ef2c0956a6 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.8.toml @@ -0,0 +1,113 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: grow-data.8 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "grow-data.8" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0x60,0x80,0xa0,0xc0, + 0xc0,0xc0,0xe0,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100 +] +data_8 = [ + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,0xad +] +indexLength = 1024 +dataLength = 324 +highStart = 0xa00 +shifted12HighStart = 0x1 +type = 0 +valueWidth = 2 +index3NullOffset = 0x7fff +dataNullOffset = 0x100 +nullValue = 0x5 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,1,0x720,2,0x7a0,3,0x8a0,4,0x110000,5 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.small16.toml new file mode 100644 index 0000000000..1e761f166c --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/grow-data.small16.toml @@ -0,0 +1,53 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: grow-data.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "grow-data.small16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0x60,0x80,0xa0,0xc0, + 0xc0,0xc0,0xe0,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100 +] +data_16 = [ + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0xad +] +indexLength = 64 +dataLength = 322 +highStart = 0xa00 +shifted12HighStart = 0x1 +type = 1 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x100 +nullValue = 0x5 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,1,0x720,2,0x7a0,3,0x8a0,4,0x110000,5 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/planes.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/planes.toml new file mode 100644 index 0000000000..d5f5e7d816 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/planes.toml @@ -0,0 +1,140 @@ +# This file is part of ICU4X. For terms of use, please see the file +# called LICENSE at the top level of the ICU4X source tree +# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +[code_point_map.data] +long_name = "planes" +name = "planes" +ranges = [ + [0x0, 0xffff, 0], + [0x10000, 0x1ffff, 1], + [0x20000, 0x2ffff, 2], + [0x30000, 0x3ffff, 3], + [0x40000, 0x4ffff, 4], + [0x50000, 0x5ffff, 5], + [0x60000, 0x6ffff, 6], + [0x70000, 0x7ffff, 7], + [0x80000, 0x8ffff, 8], + [0x90000, 0x9ffff, 9], + [0xa0000, 0xaffff, 10], + [0xb0000, 0xbffff, 11], + [0xc0000, 0xcffff, 12], + [0xd0000, 0xdffff, 13], + [0xe0000, 0xeffff, 14], + [0xf0000, 0xfffff, 15], + [0x100000, 0x10ffff, 16], +] + +[code_point_trie.struct] +long_name = "planes" +name = "planes" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x288,0x290,0x290,0x290,0x2b0,0x2b0,0x2b0,0x2b0,0x2d0,0x2d0,0x2d0,0x2d0,0x2f0,0x2f0,0x2f0,0x2f0, + 0x310,0x310,0x310,0x310,0x330,0x330,0x330,0x330,0x350,0x350,0x350,0x350,0x370,0x370,0x370,0x370, + 0x390,0x390,0x390,0x390,0x3b0,0x3b0,0x3b0,0x3b0,0x3d0,0x3d0,0x3d0,0x3d0,0x3f0,0x3f0,0x3f0,0x3f0, + 0x410,0x410,0x410,0x410,0x430,0x430,0x430,0x430,0x450,0x450,0x450,0x450,0x470,0x470,0x470,0x470, + 0,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0,0x10,0x20,0x30,0,0x10,0x20,0x30, + 0,0x10,0x20,0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x30, + 0,0x10,0x20,0x30,0,0x10,0x20,0x30,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0, + 0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0, + 0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0, + 0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0, + 0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0, + 0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0, + 0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, + 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, + 0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100, + 0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x100,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110, + 0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110, + 0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120, + 0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120, + 0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130, + 0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130, + 0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x130,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140, + 0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140, + 0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x140,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150, + 0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150, + 0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x150,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160, + 0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160, + 0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x160,0x80,0x88,0x88,0x88,0x88,0x88,0x88,0x88, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8, + 0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8, + 0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8, + 0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8, + 0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8, + 0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8,0xe8, + 0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108, + 0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108, + 0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128, + 0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128,0x128, + 0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148, + 0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148,0x148, + 0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168, + 0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0x168, + 0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188, + 0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188,0x188, + 0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8, + 0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8,0x1a8, + 0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, + 0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, + 0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8, + 0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8,0x1e8, + 0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208, + 0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208,0x208, + 0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228, + 0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228, + 0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248, + 0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248,0x248, + 0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268, + 0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268,0x268 +] +data_8 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc, + 0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, + 0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe, + 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, + 0x10,0x10,0x10,0 +] +indexLength = 1168 +dataLength = 372 +highStart = 0x100000 +shifted12HighStart = 0x100 +type = 1 +valueWidth = 2 +index3NullOffset = 0x2 +dataNullOffset = 0x0 +nullValue = 0x0 diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.16.toml new file mode 100644 index 0000000000..b9ec8ed16e --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.16.toml @@ -0,0 +1,101 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set-empty.16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set-empty.16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,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0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +] +data_16 = [ + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,0xad +] +indexLength = 1024 +dataLength = 130 +highStart = 0x0 +shifted12HighStart = 0x0 +type = 0 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x3 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,3,0x110000,3 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.32.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.32.toml new file mode 100644 index 0000000000..cc3e167264 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.32.toml @@ -0,0 +1,101 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set-empty.32 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set-empty.32" +index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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +] +data_32 = [ + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 0xad +] +indexLength = 1024 +dataLength = 129 +highStart = 0x0 +shifted12HighStart = 0x0 +type = 0 +valueWidth = 1 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x3 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,3,0x110000,3 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.8.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.8.toml new file mode 100644 index 0000000000..5ce7bba5b5 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.8.toml @@ -0,0 +1,101 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set-empty.8 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set-empty.8" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0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,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,0xad +] +indexLength = 1024 +dataLength = 132 +highStart = 0x0 +shifted12HighStart = 0x0 +type = 0 +valueWidth = 2 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x3 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,3,0x110000,3 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.small16.toml new file mode 100644 index 0000000000..f61d9fe18a --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-empty.small16.toml @@ -0,0 +1,41 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set-empty.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set-empty.small16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +] +data_16 = [ + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,0xad +] +indexLength = 64 +dataLength = 130 +highStart = 0x0 +shifted12HighStart = 0x0 +type = 1 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x3 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,3,0x110000,3 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.16.toml new file mode 100644 index 0000000000..6eac4b7bdc --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.16.toml @@ -0,0 +1,101 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set-single-value.16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set-single-value.16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0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= 0 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x5 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,3,0x110000,5 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.32.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.32.toml new file mode 100644 index 0000000000..9db848236d --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.32.toml @@ -0,0 +1,101 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set-single-value.32 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set-single-value.32" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0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,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +] +data_32 = [ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 0xad +] +indexLength = 1024 +dataLength = 129 +highStart = 0x0 +shifted12HighStart = 0x0 +type = 0 +valueWidth = 1 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x5 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,3,0x110000,5 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.8.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.8.toml new file mode 100644 index 0000000000..c92b7a8e1e --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.8.toml @@ -0,0 +1,101 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set-single-value.8 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set-single-value.8" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0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,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +] +data_8 = [ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,0xad +] +indexLength = 1024 +dataLength = 132 +highStart = 0x0 +shifted12HighStart = 0x0 +type = 0 +valueWidth = 2 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x5 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,3,0x110000,5 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.small16.toml new file mode 100644 index 0000000000..568362f556 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set-single-value.small16.toml @@ -0,0 +1,41 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set-single-value.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set-single-value.small16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +] +data_16 = [ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,0xad +] +indexLength = 64 +dataLength = 130 +highStart = 0x0 +shifted12HighStart = 0x0 +type = 1 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x0 +nullValue = 0x5 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,3,0x110000,5 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.16.toml new file mode 100644 index 0000000000..e064217ae6 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.16.toml @@ -0,0 +1,138 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set1.16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set1.16" +index = [ + 0,0x40,0x40,0x59,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x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d9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xfb,0x121,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x14d,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17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0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0,0,0,0,0,0, + 0,0,0,0,0,0,0xf,0x10,0x10,0x11,0x12,0x12,0x12,0x12,0x12,0x12, + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0,0xad +] +indexLength = 1248 +dataLength = 492 +highStart = 0xf0200 +shifted12HighStart = 0xf1 +type = 0 +valueWidth = 0 +index3NullOffset = 0x4 +dataNullOffset = 0x0 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,0,0x40,0,0xe7,0x34,0x3400,0,0x9fa6,0x61,0xda9e,0x31,0xdada,0,0xeeee,0xff, + 0x11111,1,0x44444,0x61,0xf0003,0,0xf0004,0xf,0xf0006,0x10,0xf0007,0x11,0xf0040,0x12,0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.32.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.32.toml new file mode 100644 index 0000000000..9b7299b37f --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.32.toml @@ -0,0 +1,138 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set1.32 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set1.32" +index = [ + 0,0x40,0x40,0x59,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99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0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xfb,0x121,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b, + 0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x14d,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0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,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0x475 +] +data_32 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0,0,0,0,0,0, + 0,0,0,0,0,0,0xf,0x10,0x10,0x11,0x12,0x12,0x12,0x12,0x12,0x12, + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0,0xad +] +indexLength = 1248 +dataLength = 492 +highStart = 0xf0200 +shifted12HighStart = 0xf1 +type = 0 +valueWidth = 1 +index3NullOffset = 0x4 +dataNullOffset = 0x0 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,0,0x40,0,0xe7,0x34,0x3400,0,0x9fa6,0x61,0xda9e,0x31,0xdada,0,0xeeee,0xff, + 0x11111,1,0x44444,0x61,0xf0003,0,0xf0004,0xf,0xf0006,0x10,0xf0007,0x11,0xf0040,0x12,0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.8.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.8.toml new file mode 100644 index 0000000000..4d06bf9d3b --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.8.toml @@ -0,0 +1,138 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set1.8 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set1.8" +index = [ + 0,0x40,0x40,0x59,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0xb3,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9, + 0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0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0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x495,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x4bc,0x4bf,0x4bf, + 0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf, + 0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf, + 0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4bf,0x4df,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b, + 0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x17b,0x1ba,0x99,0x99,0x99,0x99,0x99, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x1c6,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0x1d3,0x1da,0x1da,0x1da,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0x3bc,0x3bc,0x3bc,0x3bc,0x3bc,0x3bc,0x3bc,0x3bc,0x439,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0x455,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0x475 +] +data_8 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0,0,0,0,0,0, + 0,0,0,0,0,0,0xf,0x10,0x10,0x11,0x12,0x12,0x12,0x12,0x12,0x12, + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0,0xad +] +indexLength = 1248 +dataLength = 492 +highStart = 0xf0200 +shifted12HighStart = 0xf1 +type = 0 +valueWidth = 2 +index3NullOffset = 0x4 +dataNullOffset = 0x0 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,0,0x40,0,0xe7,0x34,0x3400,0,0x9fa6,0x61,0xda9e,0x31,0xdada,0,0xeeee,0xff, + 0x11111,1,0x44444,0x61,0xf0003,0,0xf0004,0xf,0xf0006,0x10,0xf0007,0x11,0xf0040,0x12,0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.small16.toml new file mode 100644 index 0000000000..1a72417759 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set1.small16.toml @@ -0,0 +1,81 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set1.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set1.small16" +index = [ + 0,0x40,0x40,0x59,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x17f,0x199,0x1aa,0x1bd,0x1d5,0x199,0x199,0x199,0x199,0x199,0x199,0x199,0x199,0x199,0x199,0x199, + 0x199,0x1f3,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6, + 0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6, + 0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x1f6,0x216,0,0x10,0x20, + 0x30,0x40,0x50,0x60,0x70,0x40,0x50,0x60,0x70,0x59,0x69,0x79,0x89,0,0x10,0x20, + 0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x30,0,0x10,0x20, + 0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x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,0xad,0xad,0xad,0xad, + 0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xb3,0xce,0xce,0xce,0xce,0xce,0xce, + 0xce,0xce,0xce,0xce,0xce,0xce,0xce,0xce,0xce,0xce,0xe5,0xf3,0xf3,0xf3,0xf3,0xf3, + 0xf3,0xf3,0xf3,0xf3,0x105,0x114,0x114,0x114,0x114,0x114,0x114,0x114,0x114,0x123,0xad,0xad, + 0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad, + 0xad,0xad,0xad,0xad,0xad,0x13f,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,0x15f +] +data_16 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0,0,0,0,0,0,0, + 0,0,0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x61,0x61,0,0,0,0,0,0,0,0,0,0,0,0,0xf,0x10, + 0x10,0x11,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x12,0x12,0xad,0,0xad +] +indexLength = 535 +dataLength = 277 +highStart = 0xf0200 +shifted12HighStart = 0xf1 +type = 1 +valueWidth = 0 +index3NullOffset = 0x4 +dataNullOffset = 0x0 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,0,0x40,0,0xe7,0x34,0x3400,0,0x9fa6,0x61,0xda9e,0x31,0xdada,0,0xeeee,0xff, + 0x11111,1,0x44444,0x61,0xf0003,0,0xf0004,0xf,0xf0006,0x10,0xf0007,0x11,0xf0040,0x12,0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.16.toml new file mode 100644 index 0000000000..79bed6eae2 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.16.toml @@ -0,0 +1,128 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set2-overlap.16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set2-overlap.16" +index = [ + 0,0x40,0x72,0x95,0xb3,0xb3,0xb3,0xb3,0xf2,0xf2,0xf2,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0x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,0xb3,0xb3,0xb3,0xb3, + 0x132,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135, + 0x13e,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x14d,0x135,0x135,0x135,0x135,0x135, + 0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135, + 0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x155,0x161,0x161,0x161,0x161, + 0x161,0x161,0x161,0x161,0x161,0x161,0x161,0x161,0x167,0x172,0xb3,0xb3,0xb3,0xb3,0xb,0xb, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0x408,0x421, + 0x42b,0x43e +] +data_16 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,0,0,0,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7a,0x7a,0x7a,0x7a,0x7a,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7a,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,2,0,0,0,0,0,0,0,0,0,0,0,7,7,7, + 7,7,0,0xad +] +indexLength = 1154 +dataLength = 388 +highStart = 0x30000 +shifted12HighStart = 0x30 +type = 0 +valueWidth = 0 +index3NullOffset = 0xb +dataNullOffset = 0xb3 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,0,0x21,0,0x72,0x5555,0xdd,3,0xde,4,0x201,0,0x240,6,0x241,0, + 0x280,6,0x281,0,0x2c0,6,0x2f883,0,0x2f987,0x7a,0x2fa98,5,0x2fedc,0x7a,0x2ffaa,1, + 0x2ffab,2,0x2ffbb,0,0x2ffc0,7,0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.32.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.32.toml new file mode 100644 index 0000000000..7582d9608e --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.32.toml @@ -0,0 +1,128 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set2-overlap.32 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set2-overlap.32" +index = [ + 0,0x40,0x72,0x95,0xb3,0xb3,0xb3,0xb3,0xf2,0xf2,0xf2,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0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b3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0x45e,0x45e,0x45e,0x45e,0x45e,0x45e,0x45e,0x462,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0x132,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135, + 0x13e,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x14d,0x135,0x135,0x135,0x135,0x135, + 0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135, + 0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x155,0x161,0x161,0x161,0x161, + 0x161,0x161,0x161,0x161,0x161,0x161,0x161,0x161,0x167,0x172,0xb3,0xb3,0xb3,0xb3,0xb,0xb, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0x408,0x421, + 0x42b,0x43e +] +data_32 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,0,0,0,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7a,0x7a,0x7a,0x7a,0x7a,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7a,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,2,0,0,0,0,0,0,0,0,0,0,0,7,7,7, + 7,7,0,0xad +] +indexLength = 1154 +dataLength = 388 +highStart = 0x30000 +shifted12HighStart = 0x30 +type = 0 +valueWidth = 1 +index3NullOffset = 0xb +dataNullOffset = 0xb3 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,0,0x21,0,0x72,0x5555,0xdd,3,0xde,4,0x201,0,0x240,6,0x241,0, + 0x280,6,0x281,0,0x2c0,6,0x2f883,0,0x2f987,0x7a,0x2fa98,5,0x2fedc,0x7a,0x2ffaa,1, + 0x2ffab,2,0x2ffbb,0,0x2ffc0,7,0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.small16.toml new file mode 100644 index 0000000000..08741aca22 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set2-overlap.small16.toml @@ -0,0 +1,73 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set2-overlap.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set2-overlap.small16" +index = [ + 0,0x40,0x72,0x95,0xb3,0xb3,0xb3,0xb3,0xf2,0xf2,0xf2,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0xee,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xfa,0,0x10,0x20,0x30, + 0x40,0x50,0x60,0x70,0x72,0x82,0x92,0xa2,0x95,0xa5,0xb5,0xc5,0xb3,0xc3,0xd3,0xe3, + 0xb3,0xc3,0xd3,0xe3,0xb3,0xc3,0xd3,0xe3,0xb3,0xc3,0xd3,0xe3,0xf2,0x102,0x112,0x122, + 0xf2,0x102,0x112,0x122,0xf2,0x102,0x112,0x122,0xb3,0xc3,0xd3,0xe3,0xb3,0xc3,0xd3,0xe3, + 0xb3,0xc3,0xd3,0xe3,0xb3,0xc3,0xd3,0xe3,0xb3,0xc3,0xd3,0xe3,0xb3,0xc3,0xd3,0xe3, + 0xb3,0xc3,0xd3,0xe3,0xb3,0xc3,0xd3,0xe3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3, + 0x132,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135, + 0x13e,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x145,0x14d,0x135,0x135,0x135,0x135,0x135, + 0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135, + 0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x135,0x155,0x161,0x161,0x161,0x161, + 0x161,0x161,0x161,0x161,0x161,0x161,0x161,0x161,0x167,0x172,0xb3,0xb3,0xb3,0xb3,0x4c,0x6c, + 0x78,0x78,0x78,0x78,0x78,0x78,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xb,0xb,0xb,0xb,0xb,0xb,0x98,0xb1,0xbb,0xce +] +data_16 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555, + 0x5555,0x5555,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,0,0,0,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7a,0x7a,0x7a,0x7a,0x7a,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7a,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,2,0,0,0,0,0,0,0,0,0,0,0,7,7,7, + 7,7,0,0xad +] +indexLength = 282 +dataLength = 388 +highStart = 0x30000 +shifted12HighStart = 0x30 +type = 1 +valueWidth = 0 +index3NullOffset = 0xb +dataNullOffset = 0xb3 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,0,0x21,0,0x72,0x5555,0xdd,3,0xde,4,0x201,0,0x240,6,0x241,0, + 0x280,6,0x281,0,0x2c0,6,0x2f883,0,0x2f987,0x7a,0x2fa98,5,0x2fedc,0x7a,0x2ffaa,1, + 0x2ffab,2,0x2ffbb,0,0x2ffc0,7,0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.16.toml new file mode 100644 index 0000000000..c94365e84c --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.16.toml @@ -0,0 +1,128 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set3-initial-9.16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set3-initial-9.16" +index = [ + 0,0x40,0x5c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xf7,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x177, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x1a6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,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 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,9,9,9,9,9,9,9,9,9, + 9,9,9,9,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,0xad +] +indexLength = 1024 +dataLength = 552 +highStart = 0xce00 +shifted12HighStart = 0xd +type = 0 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0x80 +nullValue = 0x9 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,9,0x31,9,0xa4,1,0x3400,9,0x6789,2,0x9000,9,0xa000,4,0xabcd,9, + 0xbcde,3,0xcccc,9,0x110000,6 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.32.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.32.toml new file mode 100644 index 0000000000..1a0c9732c8 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.32.toml @@ -0,0 +1,128 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set3-initial-9.32 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set3-initial-9.32" +index = [ + 0,0x40,0x5c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0x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+ 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x177, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x1a6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x1da,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6, + 0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6, + 0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6, + 0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6, + 0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6, + 0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0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,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,9,9,9,9,9,9,9,9,9, + 9,9,9,9,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,0xad +] +indexLength = 1024 +dataLength = 551 +highStart = 0xce00 +shifted12HighStart = 0xd +type = 0 +valueWidth = 1 +index3NullOffset = 0x7fff +dataNullOffset = 0x80 +nullValue = 0x9 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,9,0x31,9,0xa4,1,0x3400,9,0x6789,2,0x9000,9,0xa000,4,0xabcd,9, + 0xbcde,3,0xcccc,9,0x110000,6 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.8.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.8.toml new file mode 100644 index 0000000000..5008268b71 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.8.toml @@ -0,0 +1,128 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set3-initial-9.8 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set3-initial-9.8" +index = [ + 0,0x40,0x5c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x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xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xf7,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137,0x137, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x177, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184,0x184, + 0x184,0x184,0x184,0x1a6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x1da,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6, + 0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e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3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,0xad +] +indexLength = 1024 +dataLength = 552 +highStart = 0xce00 +shifted12HighStart = 0xd +type = 0 +valueWidth = 2 +index3NullOffset = 0x7fff +dataNullOffset = 0x80 +nullValue = 0x9 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,9,0x31,9,0xa4,1,0x3400,9,0x6789,2,0x9000,9,0xa000,4,0xabcd,9, + 0xbcde,3,0xcccc,9,0x110000,6 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.small16.toml new file mode 100644 index 0000000000..aee1538455 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/set3-initial-9.small16.toml @@ -0,0 +1,72 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: set3-initial-9.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "set3-initial-9.small16" +index = [ + 0,0x40,0x5c,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x11c,0x136,0x14e,0x16d,0,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x5c,0x6c,0x7c,0x8c, + 0x80,0x90,0xa0,0xb0,0x80,0x90,0xa0,0xb0,0x80,0x90,0xa0,0xb0,0x80,0x90,0xa0,0xb0, + 0x80,0x90,0xa0,0xb0,0x80,0x90,0xa0,0xb0,0x80,0x90,0xa0,0xb0,0x80,0x90,0xa0,0xb0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, + 0xc7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7, + 0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7, + 0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0xe7,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4, + 0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4,0xf4, + 0xf4,0xf4,0xf4,0xf4,0xf4,0xf6,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x104,0x110,0x110,0x110,0x110,0x110,0x110,0x110, + 0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x110,0x44,0x50,0x50,0x50, + 0x50,0x50,0x50,0x50,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70, + 0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x78,3,3,3,3,3,3, + 3,3,3,3,3,3,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,3,3, + 3,3,3,0xb8,0xd5,0xd5,0xd5,0xd5,0xd5,0xd5,0xd5,0xd5,0xe8,3,3,3, + 3,3,3,0xfc +] +data_16 = [ + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 9,9,9,9,9,9,9,4,4,4,4,4,4,4,4,4, + 4,4,4,4,4,4,4,9,9,9,9,9,9,9,9,9, + 9,9,9,9,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,9,9,9,9,9,9,9,9,9,9,9,9, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,0xad +] +indexLength = 372 +dataLength = 290 +highStart = 0xce00 +shifted12HighStart = 0xd +type = 1 +valueWidth = 0 +index3NullOffset = 0x3 +dataNullOffset = 0x80 +nullValue = 0x9 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0,9,0x31,9,0xa4,1,0x3400,9,0x6789,2,0x9000,9,0xa000,4,0xabcd,9, + 0xbcde,3,0xcccc,9,0x110000,6 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.16.toml new file mode 100644 index 0000000000..c8156e69b0 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.16.toml @@ -0,0 +1,321 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: short-all-same.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "short-all-same.small16" +index = [ + 0,0x40,0x80,0xc0,0x100,0x140,0x180,0x1c0,0x200,0x240,0x280,0x2c0,0x300,0x340,0x380,0x3c0, + 0x400,0x440,0x480,0x4c0,0x500,0x540,0x580,0x5c0,0x600,0x640,0x680,0x6c0,0x700,0x740,0x780,0x7c0, + 0x800,0x840,0x880,0x8c0,0x900,0x940,0x980,0x9c0,0xa00,0xa40,0xa80,0xac0,0xb00,0xb40,0xb80,0xbc0, + 0xc00,0xc40,0xc80,0xcc0,0xd00,0xd40,0xd80,0xdc0,0xe00,0xe40,0xe80,0xec0,0xf00,0xf40,0xf80,0xfc0 +] +data_16 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc, + 0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, + 0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe, + 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, + 0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, + 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, + 0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d, + 0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, + 0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f, + 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, + 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, + 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, + 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, + 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, + 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25, + 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26, + 0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27, + 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, + 0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29, + 0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, + 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b, + 0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c, + 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, + 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e, + 0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f, + 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32, + 0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, + 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, + 0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37, + 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38, + 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, + 0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a, + 0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b, + 0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c, + 0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d, + 0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e, + 0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, + 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, + 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, + 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, + 0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43, + 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, + 0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45, + 0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46, + 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, + 0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48, + 0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49, + 0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, + 0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b, + 0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c, + 0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, + 0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, + 0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f, + 0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50, + 0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51, + 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, + 0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53, + 0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56, + 0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57, + 0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58, + 0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59, + 0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a, + 0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b, + 0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c, + 0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d, + 0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e, + 0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, + 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62, + 0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, + 0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64, + 0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65, + 0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66, + 0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67, + 0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68, + 0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69, + 0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a, + 0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b, + 0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c, + 0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d, + 0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, + 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f, + 0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70, + 0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71, + 0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72, + 0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73, + 0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74, + 0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75, + 0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76, + 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77, + 0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78, + 0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79, + 0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b, + 0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c, + 0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d, + 0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e, + 0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, + 0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82, + 0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83, + 0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, + 0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85, + 0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86, + 0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87, + 0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88, + 0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89, + 0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a, + 0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b, + 0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c, + 0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d, + 0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e, + 0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91, + 0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92, + 0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93, + 0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94, + 0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95, + 0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96, + 0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97, + 0x98,0x98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xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0,0xad +] +indexLength = 64 +dataLength = 4098 +highStart = 0x1000 +shifted12HighStart = 0x1 +type = 1 +valueWidth = 0 +index3NullOffset = 0x7fff +dataNullOffset = 0xfffff +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0x10,0,0x20,1,0x30,2,0x40,3,0x50,4,0x60,5,0x70,6,0x80,7, + 0x90,8,0xa0,9,0xb0,0xa,0xc0,0xb,0xd0,0xc,0xe0,0xd,0xf0,0xe,0x100,0xf, + 0x110,0x10,0x120,0x11,0x130,0x12,0x140,0x13,0x150,0x14,0x160,0x15,0x170,0x16,0x180,0x17, + 0x190,0x18,0x1a0,0x19,0x1b0,0x1a,0x1c0,0x1b,0x1d0,0x1c,0x1e0,0x1d,0x1f0,0x1e,0x200,0x1f, + 0x210,0x20,0x220,0x21,0x230,0x22,0x240,0x23,0x250,0x24,0x260,0x25,0x270,0x26,0x280,0x27, + 0x290,0x28,0x2a0,0x29,0x2b0,0x2a,0x2c0,0x2b,0x2d0,0x2c,0x2e0,0x2d,0x2f0,0x2e,0x300,0x2f, + 0x310,0x30,0x320,0x31,0x330,0x32,0x340,0x33,0x350,0x34,0x360,0x35,0x370,0x36,0x380,0x37, + 0x390,0x38,0x3a0,0x39,0x3b0,0x3a,0x3c0,0x3b,0x3d0,0x3c,0x3e0,0x3d,0x3f0,0x3e,0x400,0x3f, + 0x410,0x40,0x420,0x41,0x430,0x42,0x440,0x43,0x450,0x44,0x460,0x45,0x470,0x46,0x480,0x47, + 0x490,0x48,0x4a0,0x49,0x4b0,0x4a,0x4c0,0x4b,0x4d0,0x4c,0x4e0,0x4d,0x4f0,0x4e,0x500,0x4f, + 0x510,0x50,0x520,0x51,0x530,0x52,0x540,0x53,0x550,0x54,0x560,0x55,0x570,0x56,0x580,0x57, + 0x590,0x58,0x5a0,0x59,0x5b0,0x5a,0x5c0,0x5b,0x5d0,0x5c,0x5e0,0x5d,0x5f0,0x5e,0x600,0x5f, + 0x610,0x60,0x620,0x61,0x630,0x62,0x640,0x63,0x650,0x64,0x660,0x65,0x670,0x66,0x680,0x67, + 0x690,0x68,0x6a0,0x69,0x6b0,0x6a,0x6c0,0x6b,0x6d0,0x6c,0x6e0,0x6d,0x6f0,0x6e,0x700,0x6f, + 0x710,0x70,0x720,0x71,0x730,0x72,0x740,0x73,0x750,0x74,0x760,0x75,0x770,0x76,0x780,0x77, + 0x790,0x78,0x7a0,0x79,0x7b0,0x7a,0x7c0,0x7b,0x7d0,0x7c,0x7e0,0x7d,0x7f0,0x7e,0x800,0x7f, + 0x810,0x80,0x820,0x81,0x830,0x82,0x840,0x83,0x850,0x84,0x860,0x85,0x870,0x86,0x880,0x87, + 0x890,0x88,0x8a0,0x89,0x8b0,0x8a,0x8c0,0x8b,0x8d0,0x8c,0x8e0,0x8d,0x8f0,0x8e,0x900,0x8f, + 0x910,0x90,0x920,0x91,0x930,0x92,0x940,0x93,0x950,0x94,0x960,0x95,0x970,0x96,0x980,0x97, + 0x990,0x98,0x9a0,0x99,0x9b0,0x9a,0x9c0,0x9b,0x9d0,0x9c,0x9e0,0x9d,0x9f0,0x9e,0xa00,0x9f, + 0xa10,0xa0,0xa20,0xa1,0xa30,0xa2,0xa40,0xa3,0xa50,0xa4,0xa60,0xa5,0xa70,0xa6,0xa80,0xa7, + 0xa90,0xa8,0xaa0,0xa9,0xab0,0xaa,0xac0,0xab,0xad0,0xac,0xae0,0xad,0xaf0,0xae,0xb00,0xaf, + 0xb10,0xb0,0xb20,0xb1,0xb30,0xb2,0xb40,0xb3,0xb50,0xb4,0xb60,0xb5,0xb70,0xb6,0xb80,0xb7, + 0xb90,0xb8,0xba0,0xb9,0xbb0,0xba,0xbc0,0xbb,0xbd0,0xbc,0xbe0,0xbd,0xbf0,0xbe,0xc00,0xbf, + 0xc10,0xc0,0xc20,0xc1,0xc30,0xc2,0xc40,0xc3,0xc50,0xc4,0xc60,0xc5,0xc70,0xc6,0xc80,0xc7, + 0xc90,0xc8,0xca0,0xc9,0xcb0,0xca,0xcc0,0xcb,0xcd0,0xcc,0xce0,0xcd,0xcf0,0xce,0xd00,0xcf, + 0xd10,0xd0,0xd20,0xd1,0xd30,0xd2,0xd40,0xd3,0xd50,0xd4,0xd60,0xd5,0xd70,0xd6,0xd80,0xd7, + 0xd90,0xd8,0xda0,0xd9,0xdb0,0xda,0xdc0,0xdb,0xdd0,0xdc,0xde0,0xdd,0xdf0,0xde,0xe00,0xdf, + 0xe10,0xe0,0xe20,0xe1,0xe30,0xe2,0xe40,0xe3,0xe50,0xe4,0xe60,0xe5,0xe70,0xe6,0xe80,0xe7, + 0xe90,0xe8,0xea0,0xe9,0xeb0,0xea,0xec0,0xeb,0xed0,0xec,0xee0,0xed,0xef0,0xee,0xf00,0xef, + 0xf10,0xf0,0xf20,0xf1,0xf30,0xf2,0xf40,0xf3,0xf50,0xf4,0xf60,0xf5,0xf70,0xf6,0xf80,0xf7, + 0xf90,0xf8,0xfa0,0xf9,0xfb0,0xfa,0xfc0,0xfb,0xfd0,0xfc,0xfe0,0xfd,0xff0,0xfe,0x1000,0xff, + 0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.8.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.8.toml new file mode 100644 index 0000000000..e1b2648847 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.8.toml @@ -0,0 +1,385 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: short-all-same.8 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "short-all-same.8" +index = [ + 0,0x40,0x80,0xc0,0x100,0x140,0x180,0x1c0,0x200,0x240,0x280,0x2c0,0x300,0x340,0x380,0x3c0, + 0x400,0x440,0x480,0x4c0,0x500,0x540,0x580,0x5c0,0x600,0x640,0x680,0x6c0,0x700,0x740,0x780,0x7c0, + 0x800,0x840,0x880,0x8c0,0x900,0x940,0x980,0x9c0,0xa00,0xa40,0xa80,0xac0,0xb00,0xb40,0xb80,0xbc0, + 0xc00,0xc40,0xc80,0xcc0,0xd00,0xd40,0xd80,0xdc0,0xe00,0xe40,0xe80,0xec0,0xf00,0xf40,0xf80,0xfc0, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, + 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000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,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, + 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, + 0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d, + 0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, + 0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f, + 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, + 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, + 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, + 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, + 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, + 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25, + 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26, + 0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27, + 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, + 0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29, + 0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, + 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b, + 0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c, + 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, + 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e, + 0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f, + 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32, + 0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, + 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, + 0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37, + 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38, + 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, + 0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a, + 0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b, + 0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c, + 0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d, + 0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e, + 0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, + 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, + 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, + 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, + 0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43, + 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, + 0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45, + 0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46, + 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, + 0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48, + 0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49, + 0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, + 0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b, + 0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c, + 0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, + 0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, + 0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f, + 0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50, + 0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51, + 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, + 0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53, + 0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56, + 0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57, + 0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58, + 0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59, + 0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a, + 0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b, + 0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c, + 0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d, + 0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e, + 0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, + 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62, + 0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, + 0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64, + 0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65, + 0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66, + 0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67, + 0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68, + 0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69, + 0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a, + 0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b, + 0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c, + 0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d, + 0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, + 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f, + 0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70, + 0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71, + 0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72, + 0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73, + 0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74, + 0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75, + 0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76, + 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77, + 0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78, + 0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79, + 0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b, + 0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c, + 0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d, + 0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e, + 0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, + 0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82, + 0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83, + 0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, + 0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85, + 0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86, + 0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87, + 0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88, + 0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89, + 0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a, + 0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b, + 0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c, + 0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d, + 0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e, + 0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91, + 0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92, + 0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93, + 0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94, + 0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95, + 0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96, + 0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97, + 0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a, + 0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b, + 0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c, + 0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d, + 0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e, + 0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f, + 0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0, + 0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,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fb, + 0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc, + 0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd, + 0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0xad +] +indexLength = 1024 +dataLength = 4164 +highStart = 0x1000 +shifted12HighStart = 0x1 +type = 0 +valueWidth = 2 +index3NullOffset = 0x7fff +dataNullOffset = 0x1000 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0x10,0,0x20,1,0x30,2,0x40,3,0x50,4,0x60,5,0x70,6,0x80,7, + 0x90,8,0xa0,9,0xb0,0xa,0xc0,0xb,0xd0,0xc,0xe0,0xd,0xf0,0xe,0x100,0xf, + 0x110,0x10,0x120,0x11,0x130,0x12,0x140,0x13,0x150,0x14,0x160,0x15,0x170,0x16,0x180,0x17, + 0x190,0x18,0x1a0,0x19,0x1b0,0x1a,0x1c0,0x1b,0x1d0,0x1c,0x1e0,0x1d,0x1f0,0x1e,0x200,0x1f, + 0x210,0x20,0x220,0x21,0x230,0x22,0x240,0x23,0x250,0x24,0x260,0x25,0x270,0x26,0x280,0x27, + 0x290,0x28,0x2a0,0x29,0x2b0,0x2a,0x2c0,0x2b,0x2d0,0x2c,0x2e0,0x2d,0x2f0,0x2e,0x300,0x2f, + 0x310,0x30,0x320,0x31,0x330,0x32,0x340,0x33,0x350,0x34,0x360,0x35,0x370,0x36,0x380,0x37, + 0x390,0x38,0x3a0,0x39,0x3b0,0x3a,0x3c0,0x3b,0x3d0,0x3c,0x3e0,0x3d,0x3f0,0x3e,0x400,0x3f, + 0x410,0x40,0x420,0x41,0x430,0x42,0x440,0x43,0x450,0x44,0x460,0x45,0x470,0x46,0x480,0x47, + 0x490,0x48,0x4a0,0x49,0x4b0,0x4a,0x4c0,0x4b,0x4d0,0x4c,0x4e0,0x4d,0x4f0,0x4e,0x500,0x4f, + 0x510,0x50,0x520,0x51,0x530,0x52,0x540,0x53,0x550,0x54,0x560,0x55,0x570,0x56,0x580,0x57, + 0x590,0x58,0x5a0,0x59,0x5b0,0x5a,0x5c0,0x5b,0x5d0,0x5c,0x5e0,0x5d,0x5f0,0x5e,0x600,0x5f, + 0x610,0x60,0x620,0x61,0x630,0x62,0x640,0x63,0x650,0x64,0x660,0x65,0x670,0x66,0x680,0x67, + 0x690,0x68,0x6a0,0x69,0x6b0,0x6a,0x6c0,0x6b,0x6d0,0x6c,0x6e0,0x6d,0x6f0,0x6e,0x700,0x6f, + 0x710,0x70,0x720,0x71,0x730,0x72,0x740,0x73,0x750,0x74,0x760,0x75,0x770,0x76,0x780,0x77, + 0x790,0x78,0x7a0,0x79,0x7b0,0x7a,0x7c0,0x7b,0x7d0,0x7c,0x7e0,0x7d,0x7f0,0x7e,0x800,0x7f, + 0x810,0x80,0x820,0x81,0x830,0x82,0x840,0x83,0x850,0x84,0x860,0x85,0x870,0x86,0x880,0x87, + 0x890,0x88,0x8a0,0x89,0x8b0,0x8a,0x8c0,0x8b,0x8d0,0x8c,0x8e0,0x8d,0x8f0,0x8e,0x900,0x8f, + 0x910,0x90,0x920,0x91,0x930,0x92,0x940,0x93,0x950,0x94,0x960,0x95,0x970,0x96,0x980,0x97, + 0x990,0x98,0x9a0,0x99,0x9b0,0x9a,0x9c0,0x9b,0x9d0,0x9c,0x9e0,0x9d,0x9f0,0x9e,0xa00,0x9f, + 0xa10,0xa0,0xa20,0xa1,0xa30,0xa2,0xa40,0xa3,0xa50,0xa4,0xa60,0xa5,0xa70,0xa6,0xa80,0xa7, + 0xa90,0xa8,0xaa0,0xa9,0xab0,0xaa,0xac0,0xab,0xad0,0xac,0xae0,0xad,0xaf0,0xae,0xb00,0xaf, + 0xb10,0xb0,0xb20,0xb1,0xb30,0xb2,0xb40,0xb3,0xb50,0xb4,0xb60,0xb5,0xb70,0xb6,0xb80,0xb7, + 0xb90,0xb8,0xba0,0xb9,0xbb0,0xba,0xbc0,0xbb,0xbd0,0xbc,0xbe0,0xbd,0xbf0,0xbe,0xc00,0xbf, + 0xc10,0xc0,0xc20,0xc1,0xc30,0xc2,0xc40,0xc3,0xc50,0xc4,0xc60,0xc5,0xc70,0xc6,0xc80,0xc7, + 0xc90,0xc8,0xca0,0xc9,0xcb0,0xca,0xcc0,0xcb,0xcd0,0xcc,0xce0,0xcd,0xcf0,0xce,0xd00,0xcf, + 0xd10,0xd0,0xd20,0xd1,0xd30,0xd2,0xd40,0xd3,0xd50,0xd4,0xd60,0xd5,0xd70,0xd6,0xd80,0xd7, + 0xd90,0xd8,0xda0,0xd9,0xdb0,0xda,0xdc0,0xdb,0xdd0,0xdc,0xde0,0xdd,0xdf0,0xde,0xe00,0xdf, + 0xe10,0xe0,0xe20,0xe1,0xe30,0xe2,0xe40,0xe3,0xe50,0xe4,0xe60,0xe5,0xe70,0xe6,0xe80,0xe7, + 0xe90,0xe8,0xea0,0xe9,0xeb0,0xea,0xec0,0xeb,0xed0,0xec,0xee0,0xed,0xef0,0xee,0xf00,0xef, + 0xf10,0xf0,0xf20,0xf1,0xf30,0xf2,0xf40,0xf3,0xf50,0xf4,0xf60,0xf5,0xf70,0xf6,0xf80,0xf7, + 0xf90,0xf8,0xfa0,0xf9,0xfb0,0xfa,0xfc0,0xfb,0xfd0,0xfc,0xfe0,0xfd,0xff0,0xfe,0x1000,0xff, + 0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.small16.toml new file mode 100644 index 0000000000..c8156e69b0 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/short-all-same.small16.toml @@ -0,0 +1,321 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: short-all-same.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "short-all-same.small16" +index = [ + 0,0x40,0x80,0xc0,0x100,0x140,0x180,0x1c0,0x200,0x240,0x280,0x2c0,0x300,0x340,0x380,0x3c0, + 0x400,0x440,0x480,0x4c0,0x500,0x540,0x580,0x5c0,0x600,0x640,0x680,0x6c0,0x700,0x740,0x780,0x7c0, + 0x800,0x840,0x880,0x8c0,0x900,0x940,0x980,0x9c0,0xa00,0xa40,0xa80,0xac0,0xb00,0xb40,0xb80,0xbc0, + 0xc00,0xc40,0xc80,0xcc0,0xd00,0xd40,0xd80,0xdc0,0xe00,0xe40,0xe80,0xec0,0xf00,0xf40,0xf80,0xfc0 +] +data_16 = [ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, + 0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb,0xb, + 0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc, + 0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd,0xd, + 0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe,0xe, + 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13, + 0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14, + 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, + 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, + 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, + 0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d, + 0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, + 0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f, + 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, + 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, + 0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22, + 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, + 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, + 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25, + 0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26, + 0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27, + 0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28, + 0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29, + 0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, + 0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b, + 0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c, + 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, + 0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e, + 0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f, + 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, + 0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32, + 0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34, + 0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35, + 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, + 0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37, + 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38, + 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, + 0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a, + 0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b, + 0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c, + 0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d, + 0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e, + 0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, + 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, + 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, + 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, + 0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43, + 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, + 0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45, + 0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46, + 0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47, + 0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48, + 0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49, + 0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, + 0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b, + 0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c, + 0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d, + 0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, + 0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f, + 0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50, + 0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51, + 0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52,0x52, + 0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53,0x53, + 0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54,0x54, + 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55, + 0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56,0x56, + 0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57, + 0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58, + 0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59, + 0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a, + 0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b, + 0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c, + 0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d, + 0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e, + 0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f, + 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, + 0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61, + 0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62, + 0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, + 0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64, + 0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65, + 0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66, + 0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67, + 0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68, + 0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69, + 0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a,0x6a, + 0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b,0x6b, + 0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c, + 0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d,0x6d, + 0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, + 0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f,0x6f, + 0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70, + 0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71,0x71, + 0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72,0x72, + 0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73, + 0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74,0x74, + 0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75,0x75, + 0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76,0x76, + 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77, + 0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78,0x78, + 0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79,0x79, + 0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a,0x7a, + 0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b,0x7b, + 0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c, + 0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d, + 0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e, + 0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f, + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, + 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, + 0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82, + 0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83, + 0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, + 0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85, + 0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86, + 0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87, + 0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88, + 0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89, + 0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a, + 0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b, + 0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c, + 0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d, + 0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e, + 0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91, + 0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92, + 0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93, + 0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94, + 0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95, + 0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96, + 0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97, + 0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98, + 0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, + 0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x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ullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0x10,0,0x20,1,0x30,2,0x40,3,0x50,4,0x60,5,0x70,6,0x80,7, + 0x90,8,0xa0,9,0xb0,0xa,0xc0,0xb,0xd0,0xc,0xe0,0xd,0xf0,0xe,0x100,0xf, + 0x110,0x10,0x120,0x11,0x130,0x12,0x140,0x13,0x150,0x14,0x160,0x15,0x170,0x16,0x180,0x17, + 0x190,0x18,0x1a0,0x19,0x1b0,0x1a,0x1c0,0x1b,0x1d0,0x1c,0x1e0,0x1d,0x1f0,0x1e,0x200,0x1f, + 0x210,0x20,0x220,0x21,0x230,0x22,0x240,0x23,0x250,0x24,0x260,0x25,0x270,0x26,0x280,0x27, + 0x290,0x28,0x2a0,0x29,0x2b0,0x2a,0x2c0,0x2b,0x2d0,0x2c,0x2e0,0x2d,0x2f0,0x2e,0x300,0x2f, + 0x310,0x30,0x320,0x31,0x330,0x32,0x340,0x33,0x350,0x34,0x360,0x35,0x370,0x36,0x380,0x37, + 0x390,0x38,0x3a0,0x39,0x3b0,0x3a,0x3c0,0x3b,0x3d0,0x3c,0x3e0,0x3d,0x3f0,0x3e,0x400,0x3f, + 0x410,0x40,0x420,0x41,0x430,0x42,0x440,0x43,0x450,0x44,0x460,0x45,0x470,0x46,0x480,0x47, + 0x490,0x48,0x4a0,0x49,0x4b0,0x4a,0x4c0,0x4b,0x4d0,0x4c,0x4e0,0x4d,0x4f0,0x4e,0x500,0x4f, + 0x510,0x50,0x520,0x51,0x530,0x52,0x540,0x53,0x550,0x54,0x560,0x55,0x570,0x56,0x580,0x57, + 0x590,0x58,0x5a0,0x59,0x5b0,0x5a,0x5c0,0x5b,0x5d0,0x5c,0x5e0,0x5d,0x5f0,0x5e,0x600,0x5f, + 0x610,0x60,0x620,0x61,0x630,0x62,0x640,0x63,0x650,0x64,0x660,0x65,0x670,0x66,0x680,0x67, + 0x690,0x68,0x6a0,0x69,0x6b0,0x6a,0x6c0,0x6b,0x6d0,0x6c,0x6e0,0x6d,0x6f0,0x6e,0x700,0x6f, + 0x710,0x70,0x720,0x71,0x730,0x72,0x740,0x73,0x750,0x74,0x760,0x75,0x770,0x76,0x780,0x77, + 0x790,0x78,0x7a0,0x79,0x7b0,0x7a,0x7c0,0x7b,0x7d0,0x7c,0x7e0,0x7d,0x7f0,0x7e,0x800,0x7f, + 0x810,0x80,0x820,0x81,0x830,0x82,0x840,0x83,0x850,0x84,0x860,0x85,0x870,0x86,0x880,0x87, + 0x890,0x88,0x8a0,0x89,0x8b0,0x8a,0x8c0,0x8b,0x8d0,0x8c,0x8e0,0x8d,0x8f0,0x8e,0x900,0x8f, + 0x910,0x90,0x920,0x91,0x930,0x92,0x940,0x93,0x950,0x94,0x960,0x95,0x970,0x96,0x980,0x97, + 0x990,0x98,0x9a0,0x99,0x9b0,0x9a,0x9c0,0x9b,0x9d0,0x9c,0x9e0,0x9d,0x9f0,0x9e,0xa00,0x9f, + 0xa10,0xa0,0xa20,0xa1,0xa30,0xa2,0xa40,0xa3,0xa50,0xa4,0xa60,0xa5,0xa70,0xa6,0xa80,0xa7, + 0xa90,0xa8,0xaa0,0xa9,0xab0,0xaa,0xac0,0xab,0xad0,0xac,0xae0,0xad,0xaf0,0xae,0xb00,0xaf, + 0xb10,0xb0,0xb20,0xb1,0xb30,0xb2,0xb40,0xb3,0xb50,0xb4,0xb60,0xb5,0xb70,0xb6,0xb80,0xb7, + 0xb90,0xb8,0xba0,0xb9,0xbb0,0xba,0xbc0,0xbb,0xbd0,0xbc,0xbe0,0xbd,0xbf0,0xbe,0xc00,0xbf, + 0xc10,0xc0,0xc20,0xc1,0xc30,0xc2,0xc40,0xc3,0xc50,0xc4,0xc60,0xc5,0xc70,0xc6,0xc80,0xc7, + 0xc90,0xc8,0xca0,0xc9,0xcb0,0xca,0xcc0,0xcb,0xcd0,0xcc,0xce0,0xcd,0xcf0,0xce,0xd00,0xcf, + 0xd10,0xd0,0xd20,0xd1,0xd30,0xd2,0xd40,0xd3,0xd50,0xd4,0xd60,0xd5,0xd70,0xd6,0xd80,0xd7, + 0xd90,0xd8,0xda0,0xd9,0xdb0,0xda,0xdc0,0xdb,0xdd0,0xdc,0xde0,0xdd,0xdf0,0xde,0xe00,0xdf, + 0xe10,0xe0,0xe20,0xe1,0xe30,0xe2,0xe40,0xe3,0xe50,0xe4,0xe60,0xe5,0xe70,0xe6,0xe80,0xe7, + 0xe90,0xe8,0xea0,0xe9,0xeb0,0xea,0xec0,0xeb,0xed0,0xec,0xee0,0xed,0xef0,0xee,0xf00,0xef, + 0xf10,0xf0,0xf20,0xf1,0xf30,0xf2,0xf40,0xf3,0xf50,0xf4,0xf60,0xf5,0xf70,0xf6,0xf80,0xf7, + 0xf90,0xf8,0xfa0,0xf9,0xfb0,0xfa,0xfc0,0xfb,0xfd0,0xfc,0xfe0,0xfd,0xff0,0xfe,0x1000,0xff, + 0x110000,0 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.16.toml new file mode 100644 index 0000000000..56163ddaad --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.16.toml @@ -0,0 +1,116 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: small0-in-fast.16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "small0-in-fast.16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0x80,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0xd0,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0x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,0x404,0x404,0x404,0x404,0x404,0x404,0x404,0x404,0x404, + 0x404,0x404,0x404,0x404 +] +data_16 = [ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,0xad,9,0xad +] +indexLength = 1092 +dataLength = 292 +highStart = 0x20000 +shifted12HighStart = 0x20 +type = 0 +valueWidth = 0 +index3NullOffset = 0x404 +dataNullOffset = 0xd1 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0x880,1,0x890,0,0x1040,2,0x1051,0,0x10000,3,0x20000,0,0x110000,9 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.32.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.32.toml new file mode 100644 index 0000000000..9d4685ba2f --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.32.toml @@ -0,0 +1,116 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: small0-in-fast.32 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "small0-in-fast.32" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0x80,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0xd0,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,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+ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,9,0xad +] +indexLength = 1092 +dataLength = 291 +highStart = 0x20000 +shifted12HighStart = 0x20 +type = 0 +valueWidth = 1 +index3NullOffset = 0x404 +dataNullOffset = 0xd1 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0x880,1,0x890,0,0x1040,2,0x1051,0,0x10000,3,0x20000,0,0x110000,9 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.8.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.8.toml new file mode 100644 index 0000000000..8f42007065 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.8.toml @@ -0,0 +1,116 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: small0-in-fast.8 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "small0-in-fast.8" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0x80,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0xd0,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1, + 0xe1,0xe1,0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, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,9,9,0xad +] +indexLength = 1092 +dataLength = 292 +highStart = 0x20000 +shifted12HighStart = 0x20 +type = 0 +valueWidth = 2 +index3NullOffset = 0x404 +dataNullOffset = 0xd1 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0x880,1,0x890,0,0x1040,2,0x1051,0,0x10000,3,0x20000,0,0x110000,9 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.small16.toml b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.small16.toml new file mode 100644 index 0000000000..dd203a39de --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/testdata/small0-in-fast.small16.toml @@ -0,0 +1,63 @@ +# Copyright (C) 2021 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# file name: small0-in-fast.small16 +# +# machine-generated by: ucptrietest.c + +[code_point_trie.struct] +name = "small0-in-fast.small16" +index = [ + 0,0x40,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0x80,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, + 0xda,0xe3,0xe3,0xe3,0x103,0x103,0x103,0x103,0,0x10,0x20,0x30,0x40,0x50,0x60,0x70, + 0,0x10,0x20,0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x30, + 0,0x10,0x20,0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x30,0,0x10,0x20,0x30, + 0x80,0x90,0xa0,0xb0,0x90,0xa0,0xb0,0xc0,0x90,0xa0,0xb0,0xc0,0x90,0xa0,0xb0,0xc0, + 0x90,0xa0,0xb0,0xc0,0x90,0xa0,0xb0,0xc0,0x90,0xa0,0xb0,0xc0,0x90,0xa0,0xb0,0xc0, + 0x90,0xa0,0xb0,0xc0,0x90,0x90,0x90,0x90,0xd0,0xdf,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0, + 0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0, + 0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0, + 0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0x48,0x50,0x50,0x50,0x68,0x74, + 0x74,0x74,0x94,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a, + 0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a, + 0x9a,0x9a,0x9a,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba, + 0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba, + 0xba,0xba,0xba +] +data_16 = [ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 0xad,9,0xad +] +indexLength = 291 +dataLength = 243 +highStart = 0x20000 +shifted12HighStart = 0x20 +type = 1 +valueWidth = 0 +index3NullOffset = 0xba +dataNullOffset = 0xd0 +nullValue = 0x0 + +[code_point_trie.testdata] +# Array of (limit, value) pairs +checkRanges = [ + 0x880,1,0x890,0,0x1040,2,0x1051,0,0x10000,3,0x20000,0,0x110000,9 +] diff --git a/third_party/rust/icu_collections/src/codepointtrie/tests/trie_test_data_test.rs b/third_party/rust/icu_collections/src/codepointtrie/tests/trie_test_data_test.rs new file mode 100644 index 0000000000..09bfefb267 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/tests/trie_test_data_test.rs @@ -0,0 +1,43 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +mod test_util; + +#[test] +fn code_point_trie_test_data_check_test() { + test_util::run_deserialize_test_from_test_data("tests/testdata/free-blocks.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/free-blocks.32.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/free-blocks.8.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/free-blocks.small16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/grow-data.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/grow-data.32.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/grow-data.8.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/grow-data.small16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set1.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set1.32.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set1.8.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set1.small16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set2-overlap.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set2-overlap.32.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set2-overlap.small16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set3-initial-9.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set3-initial-9.32.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set3-initial-9.8.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set3-initial-9.small16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set-empty.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set-empty.32.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set-empty.8.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set-empty.small16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set-single-value.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set-single-value.32.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set-single-value.8.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/set-single-value.small16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/short-all-same.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/short-all-same.8.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/short-all-same.small16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/small0-in-fast.16.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/small0-in-fast.32.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/small0-in-fast.8.toml"); + test_util::run_deserialize_test_from_test_data("tests/testdata/small0-in-fast.small16.toml"); +} diff --git a/third_party/rust/icu_collections/src/codepointtrie/toml.rs b/third_party/rust/icu_collections/src/codepointtrie/toml.rs new file mode 100644 index 0000000000..0bf61e81d7 --- /dev/null +++ b/third_party/rust/icu_collections/src/codepointtrie/toml.rs @@ -0,0 +1,124 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! Utilities for reading CodePointTrie data from TOML files. + +use crate::codepointtrie::error::Error; +use crate::codepointtrie::CodePointTrie; +use crate::codepointtrie::CodePointTrieHeader; +use crate::codepointtrie::TrieType; +use crate::codepointtrie::TrieValue; +use alloc::string::String; +use alloc::vec::Vec; +use core::convert::TryFrom; +use zerovec::ZeroVec; + +/// A Serde-compatible struct for reading serialized CodePointTrie TOML files +/// generated by ICU4C. +/// +/// Use `TryInto` to convert [`CodePointTrieToml`] to a proper [`CodePointTrie`]. +#[allow(clippy::upper_case_acronyms)] +#[derive(serde::Deserialize)] +pub struct CodePointTrieToml { + #[serde(skip)] + _short_name: String, + #[serde(skip)] + _long_name: String, + #[serde(skip)] + _name: String, + index: Vec<u16>, + data_8: Option<Vec<u8>>, + data_16: Option<Vec<u16>>, + data_32: Option<Vec<u32>>, + #[serde(skip)] + _index_length: u32, + #[serde(skip)] + _data_length: u32, + #[serde(rename = "highStart")] + high_start: u32, + #[serde(rename = "shifted12HighStart")] + shifted12_high_start: u16, + #[serde(rename = "type")] + trie_type_enum_val: u8, + #[serde(rename = "valueWidth")] + _value_width_enum_val: u8, + #[serde(rename = "index3NullOffset")] + index3_null_offset: u16, + #[serde(rename = "dataNullOffset")] + data_null_offset: u32, + #[serde(rename = "nullValue")] + null_value: u32, +} + +/// Data slice from a CodePointTrie TOML. +/// +/// ICU4C exports data as either `u8`, `u16`, or `u32`, which may be converted +/// to other types as appropriate. +#[allow(clippy::exhaustive_enums)] // based on a stable serialized form +pub enum CodePointDataSlice<'a> { + /// A serialized CodePointTrie data array 8-bit values. + U8(&'a [u8]), + /// A serialized CodePointTrie data array 16-bit values. + U16(&'a [u16]), + /// A serialized CodePointTrie data array 32-bit values. + U32(&'a [u32]), +} + +impl CodePointTrieToml { + /// Gets the `index` slice. + pub fn index_slice(&self) -> &[u16] { + self.index.as_slice() + } + + /// Gets the `data` slice. + pub fn data_slice(&self) -> Result<CodePointDataSlice, Error> { + if let Some(data_8) = &self.data_8 { + Ok(CodePointDataSlice::U8(data_8.as_slice())) + } else if let Some(data_16) = &self.data_16 { + Ok(CodePointDataSlice::U16(data_16.as_slice())) + } else if let Some(data_32) = &self.data_32 { + Ok(CodePointDataSlice::U32(data_32.as_slice())) + } else { + Err(Error::FromDeserialized { + reason: "Did not find data array for CodePointTrie in TOML", + }) + } + } +} + +impl TryFrom<&CodePointTrieToml> for CodePointTrieHeader { + type Error = Error; + + fn try_from(cpt_data: &CodePointTrieToml) -> Result<Self, Self::Error> { + let trie_type_enum: TrieType = TrieType::try_from(cpt_data.trie_type_enum_val)?; + Ok(CodePointTrieHeader { + high_start: cpt_data.high_start, + shifted12_high_start: cpt_data.shifted12_high_start, + index3_null_offset: cpt_data.index3_null_offset, + data_null_offset: cpt_data.data_null_offset, + null_value: cpt_data.null_value, + trie_type: trie_type_enum, + }) + } +} + +impl<T: TrieValue> TryFrom<&CodePointTrieToml> for CodePointTrie<'static, T> { + type Error = Error; + + fn try_from(cpt_data: &CodePointTrieToml) -> Result<CodePointTrie<'static, T>, Self::Error> { + use CodePointDataSlice::*; + let header = CodePointTrieHeader::try_from(cpt_data)?; + let index: ZeroVec<u16> = ZeroVec::alloc_from_slice(&cpt_data.index); + let data: Result<ZeroVec<'static, T>, T::TryFromU32Error> = match cpt_data.data_slice()? { + U8(s) => s.iter().map(|i| T::try_from_u32(*i as u32)).collect(), + U16(s) => s.iter().map(|i| T::try_from_u32(*i as u32)).collect(), + U32(s) => s.iter().map(|i| T::try_from_u32(*i)).collect(), + }; + + let data = data.map_err(|_| Error::FromDeserialized { + reason: "Could not parse data array to typed array", + })?; + CodePointTrie::<T>::try_new(header, index, data) + } +} diff --git a/third_party/rust/icu_collections/src/iterator_utils.rs b/third_party/rust/icu_collections/src/iterator_utils.rs new file mode 100644 index 0000000000..937c133351 --- /dev/null +++ b/third_party/rust/icu_collections/src/iterator_utils.rs @@ -0,0 +1,206 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +use crate::codepointtrie::CodePointMapRange; + +/// This is an iterator that coalesces adjacent ranges in an iterator over code +/// point ranges +pub(crate) struct RangeListIteratorCoalescer<I, T> { + iter: I, + peek: Option<CodePointMapRange<T>>, +} + +impl<I, T: Eq> RangeListIteratorCoalescer<I, T> +where + I: Iterator<Item = CodePointMapRange<T>>, +{ + pub fn new(iter: I) -> Self { + Self { iter, peek: None } + } +} + +impl<I, T: Eq> Iterator for RangeListIteratorCoalescer<I, T> +where + I: Iterator<Item = CodePointMapRange<T>>, +{ + type Item = CodePointMapRange<T>; + + fn next(&mut self) -> Option<Self::Item> { + // Get the initial range we're working with: either a leftover + // range from last time, or the next range + let mut ret = if let Some(peek) = self.peek.take() { + peek + } else if let Some(next) = self.iter.next() { + next + } else { + // No ranges, exit early + return None; + }; + + // Keep pulling ranges + #[allow(clippy::while_let_on_iterator)] + // can't move the iterator, also we want it to be explicit that we're not draining the iterator + while let Some(next) = self.iter.next() { + if *next.range.start() == ret.range.end() + 1 && next.value == ret.value { + // Range has no gap, coalesce + ret.range = *ret.range.start()..=*next.range.end(); + } else { + // Range has a gap, return what we have so far, update + // peek + self.peek = Some(next); + return Some(ret); + } + } + + // Ran out of elements, exit + Some(ret) + } +} + +#[cfg(test)] +mod tests { + use core::fmt::Debug; + use icu::collections::codepointinvlist::CodePointInversionListBuilder; + use icu::collections::codepointtrie::TrieValue; + use icu::properties::maps::{self, CodePointMapDataBorrowed}; + use icu::properties::sets::{self, CodePointSetDataBorrowed}; + use icu::properties::{GeneralCategory, Script}; + + fn test_set(data: CodePointSetDataBorrowed<'static>, name: &str) { + let mut builder = CodePointInversionListBuilder::new(); + let mut builder_complement = CodePointInversionListBuilder::new(); + + for range in data.iter_ranges() { + builder.add_range_u32(&range) + } + + for range in data.iter_ranges_complemented() { + builder_complement.add_range_u32(&range) + } + + builder.complement(); + let set1 = builder.build(); + let set2 = builder_complement.build(); + assert_eq!(set1, set2, "Set {name} failed to complement correctly"); + } + + fn test_map<T: TrieValue + Debug>( + data: &CodePointMapDataBorrowed<'static, T>, + value: T, + name: &str, + ) { + let mut builder = CodePointInversionListBuilder::new(); + let mut builder_complement = CodePointInversionListBuilder::new(); + + for range in data.iter_ranges_for_value(value) { + builder.add_range_u32(&range) + } + + for range in data.iter_ranges_for_value_complemented(value) { + builder_complement.add_range_u32(&range) + } + + builder.complement(); + let set1 = builder.build(); + let set2 = builder_complement.build(); + assert_eq!( + set1, set2, + "Map {name} failed to complement correctly with value {value:?}" + ); + } + + #[test] + fn test_complement_sets() { + // Stress test the RangeListIteratorComplementer logic by ensuring it works for + // a whole bunch of binary properties + test_set(sets::ascii_hex_digit(), "ASCII_Hex_Digit"); + test_set(sets::alnum(), "Alnum"); + test_set(sets::alphabetic(), "Alphabetic"); + test_set(sets::bidi_control(), "Bidi_Control"); + test_set(sets::bidi_mirrored(), "Bidi_Mirrored"); + test_set(sets::blank(), "Blank"); + test_set(sets::cased(), "Cased"); + test_set(sets::case_ignorable(), "Case_Ignorable"); + test_set( + sets::full_composition_exclusion(), + "Full_Composition_Exclusion", + ); + test_set(sets::changes_when_casefolded(), "Changes_When_Casefolded"); + test_set(sets::changes_when_casemapped(), "Changes_When_Casemapped"); + test_set( + sets::changes_when_nfkc_casefolded(), + "Changes_When_NFKC_Casefolded", + ); + test_set(sets::changes_when_lowercased(), "Changes_When_Lowercased"); + test_set(sets::changes_when_titlecased(), "Changes_When_Titlecased"); + test_set(sets::changes_when_uppercased(), "Changes_When_Uppercased"); + test_set(sets::dash(), "Dash"); + test_set(sets::deprecated(), "Deprecated"); + test_set( + sets::default_ignorable_code_point(), + "Default_Ignorable_Code_Point", + ); + test_set(sets::diacritic(), "Diacritic"); + test_set(sets::emoji_modifier_base(), "Emoji_Modifier_Base"); + test_set(sets::emoji_component(), "Emoji_Component"); + test_set(sets::emoji_modifier(), "Emoji_Modifier"); + test_set(sets::emoji(), "Emoji"); + test_set(sets::emoji_presentation(), "Emoji_Presentation"); + test_set(sets::extender(), "Extender"); + test_set(sets::extended_pictographic(), "Extended_Pictographic"); + test_set(sets::graph(), "Graph"); + test_set(sets::grapheme_base(), "Grapheme_Base"); + test_set(sets::grapheme_extend(), "Grapheme_Extend"); + test_set(sets::grapheme_link(), "Grapheme_Link"); + test_set(sets::hex_digit(), "Hex_Digit"); + test_set(sets::hyphen(), "Hyphen"); + test_set(sets::id_continue(), "Id_Continue"); + test_set(sets::ideographic(), "Ideographic"); + test_set(sets::id_start(), "Id_Start"); + test_set(sets::ids_binary_operator(), "Ids_Binary_Operator"); + test_set(sets::ids_trinary_operator(), "Ids_Trinary_Operator"); + test_set(sets::join_control(), "Join_Control"); + test_set(sets::logical_order_exception(), "Logical_Order_Exception"); + test_set(sets::lowercase(), "Lowercase"); + test_set(sets::math(), "Math"); + test_set(sets::noncharacter_code_point(), "Noncharacter_Code_Point"); + test_set(sets::nfc_inert(), "NFC_Inert"); + test_set(sets::nfd_inert(), "NFD_Inert"); + test_set(sets::nfkc_inert(), "NFKC_Inert"); + test_set(sets::nfkd_inert(), "NFKD_Inert"); + test_set(sets::pattern_syntax(), "Pattern_Syntax"); + test_set(sets::pattern_white_space(), "Pattern_White_Space"); + test_set( + sets::prepended_concatenation_mark(), + "Prepended_Concatenation_Mark", + ); + test_set(sets::print(), "Print"); + test_set(sets::quotation_mark(), "Quotation_Mark"); + test_set(sets::radical(), "Radical"); + test_set(sets::regional_indicator(), "Regional_Indicator"); + test_set(sets::soft_dotted(), "Soft_Dotted"); + test_set(sets::segment_starter(), "Segment_Starter"); + test_set(sets::case_sensitive(), "Case_Sensitive"); + test_set(sets::sentence_terminal(), "Sentence_Terminal"); + test_set(sets::terminal_punctuation(), "Terminal_Punctuation"); + test_set(sets::unified_ideograph(), "Unified_Ideograph"); + test_set(sets::uppercase(), "Uppercase"); + test_set(sets::variation_selector(), "Variation_Selector"); + test_set(sets::white_space(), "White_Space"); + test_set(sets::xdigit(), "Xdigit"); + test_set(sets::xid_continue(), "XID_Continue"); + test_set(sets::xid_start(), "XID_Start"); + } + + #[test] + fn test_complement_maps() { + let gc = maps::general_category(); + let script = maps::script(); + test_map(&gc, GeneralCategory::UppercaseLetter, "gc"); + test_map(&gc, GeneralCategory::OtherPunctuation, "gc"); + test_map(&script, Script::Devanagari, "script"); + test_map(&script, Script::Latin, "script"); + test_map(&script, Script::Common, "script"); + } +} diff --git a/third_party/rust/icu_collections/src/lib.rs b/third_party/rust/icu_collections/src/lib.rs new file mode 100644 index 0000000000..730457c2d1 --- /dev/null +++ b/third_party/rust/icu_collections/src/lib.rs @@ -0,0 +1,43 @@ +// This file is part of ICU4X. For terms of use, please see the file +// called LICENSE at the top level of the ICU4X source tree +// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). + +//! Efficient collections for Unicode data. +//! +//! This module is published as its own crate ([`icu_collections`](https://docs.rs/icu_collections/latest/icu_collections/)) +//! and as part of the [`icu`](https://docs.rs/icu/latest/icu/) crate. See the latter for more details on the ICU4X project. +//! +//! ICU4X [`CodePointTrie`](crate::codepointtrie::CodePointTrie) provides a read-only view of CodePointTrie data that is exported +//! from ICU4C. Detailed information about the design of the data structure can be found in the documentation +//! for the [`CodePointTrie`](crate::codepointtrie::CodePointTrie) struct. +//! +//! ICU4X [`CodePointInversionList`](`crate::codepointinvlist::CodePointInversionList`) provides necessary functionality for highly efficient querying of sets of Unicode characters. +//! It is an implementation of the existing [ICU4C UnicodeSet API](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UnicodeSet.html). +//! +//! ICU4X [`Char16Trie`](`crate::char16trie::Char16Trie`) provides a data structure for a space-efficient and time-efficient lookup of +//! sequences of 16-bit units (commonly but not necessarily UTF-16 code units) +//! which map to integer values. +//! It is an implementation of the existing [ICU4C UCharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UCharsTrie.html) +//! / [ICU4J CharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/util/CharsTrie.html) API. + +// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations +#![cfg_attr(not(any(test, feature = "std")), no_std)] +#![cfg_attr( + not(test), + deny( + clippy::indexing_slicing, + clippy::unwrap_used, + clippy::expect_used, + clippy::panic + ) +)] +#![warn(missing_docs)] + +extern crate alloc; + +pub mod char16trie; +pub mod codepointinvlist; +pub mod codepointinvliststringlist; +pub mod codepointtrie; + +pub(crate) mod iterator_utils; |