diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-06-03 19:10:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 17:10:01 +0000 |
commit | f8985c5521cdf72a9137a7fa847043e5a789dfe0 (patch) | |
tree | 519ab8999e6d6c32fed65f0812ce6b36dbcb8359 /components/gfx/tests | |
parent | 48ab8d8847eadd0c94f43307860e880d4802a075 (diff) | |
download | servo-f8985c5521cdf72a9137a7fa847043e5a789dfe0.tar.gz servo-f8985c5521cdf72a9137a7fa847043e5a789dfe0.zip |
base: Remove `ucd` dependency (#32424)
Remove the `ucd` dependency which has not been updated in 8 years. In
addition, replace it with a generated UnicodeBlock enum which reflects
the modern Unicode standard. This is generated via a Python script which
is included in the repository. The generation is not part of the build
process, because the Unicode database is hosted on the web and it does
not change the frequently.
This is done instead of bringing in the more up-to-date `unicode_blocks`
dependency. `unicode_blocks` defines each block as constant, which means
that they cannot be used in match statements -- which we do in Servo.
Co-authored-by: Lauryn Menard <lauryn.menard@gmail.com>
Diffstat (limited to 'components/gfx/tests')
-rw-r--r-- | components/gfx/tests/text_util.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/components/gfx/tests/text_util.rs b/components/gfx/tests/text_util.rs deleted file mode 100644 index e5fef94f646..00000000000 --- a/components/gfx/tests/text_util.rs +++ /dev/null @@ -1,24 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -use gfx::text::util::is_cjk; - -#[test] -fn test_is_cjk() { - // Test characters from different CJK blocks - assert_eq!(is_cjk('〇'), true); - assert_eq!(is_cjk('㐀'), true); - assert_eq!(is_cjk('あ'), true); - assert_eq!(is_cjk('ア'), true); - assert_eq!(is_cjk('㆒'), true); - assert_eq!(is_cjk('ㆣ'), true); - assert_eq!(is_cjk('龥'), true); - assert_eq!(is_cjk('𰾑'), true); - assert_eq!(is_cjk('𰻝'), true); - - // Test characters from outside CJK blocks - assert_eq!(is_cjk('a'), false); - assert_eq!(is_cjk('🙂'), false); - assert_eq!(is_cjk('©'), false); -} |