Skip to content

Commit d7755f2

Browse files
Remove old normalization test
The new test subsumes it
1 parent eec13fa commit d7755f2

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ std = { version = "1.0", package = "rustc-std-workspace-std", optional = true }
3131
core = { version = "1.0", package = "rustc-std-workspace-core", optional = true }
3232
compiler_builtins = { version = "0.1", optional = true }
3333

34-
[dev-dependencies]
35-
unicode-normalization = "0.1.23"
36-
3734
[features]
3835
default = []
3936
rustc-dep-of-std = ['std', 'core', 'compiler_builtins']

tests/tests.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -137,27 +137,10 @@ fn test_marks() {
137137
assert_eq!(UnicodeWidthChar::width('\u{09BE}'), Some(0));
138138
}
139139

140-
#[test]
141-
fn test_canonical_equivalence() {
142-
for c in '\0'..='\u{10FFFF}' {
143-
let mut nfd = String::new();
144-
unicode_normalization::char::decompose_canonical(c, |d| nfd.push(d));
145-
assert_eq!(
146-
c.width().unwrap_or(0),
147-
nfd.width(),
148-
"U+{:04X} '{c}' → U+{:04X?} \"{nfd}\"",
149-
u32::from(c),
150-
nfd.chars().map(u32::from).collect::<Vec<_>>()
151-
);
152-
// this doesn't hold
153-
//assert_eq!(c.width_cjk().unwrap_or(0), nfd.width_cjk(), "{c}, {nfd}");
154-
}
155-
}
156-
157140
/// Requires `NormalizationTest.txt` to be present in the `scripts/` directory.
158141
/// Run the `unicode.py` script to download it.
159142
#[test]
160-
fn test_canonical_equivalence_2() {
143+
fn test_canonical_equivalence() {
161144
let norm_file = BufReader::new(
162145
File::open("scripts/NormalizationTest.txt")
163146
.expect("run `unicode.py` first to download `NormalizationTest.txt`"),

0 commit comments

Comments
 (0)