chore: audit all components (#2)

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-11-08 06:27:12 +00:00
parent 0ad5c3fe90
commit 11b29dc91a
51 changed files with 2096 additions and 958 deletions
-8
View File
@@ -392,12 +392,4 @@ mod tests {
);
std::fs::remove_dir_all(&base).expect("cleanup");
}
#[test]
fn every_role_states_freedesktop_candidates() {
for role in crate::IconRole::all() {
assert!(!role.freedesktop_names().is_empty());
assert!(!role.slug().is_empty());
}
}
}
-17
View File
@@ -367,21 +367,4 @@ mod tests {
);
}
}
#[test]
fn freedesktop_asset_keys_round_trip() {
let role = IconRole::ChevronDown;
let key = format!("icons/freedesktop/{}-16.svg", role.slug());
let stem = key
.strip_prefix("icons/freedesktop/")
.unwrap()
.strip_suffix(".svg")
.unwrap();
let (slug, parsed_size) = stem.rsplit_once('-').unwrap();
let resolved = IconRole::all()
.iter()
.find(|candidate| candidate.slug() == slug);
assert_eq!(resolved, Some(&role));
assert_eq!(parsed_size, "16");
}
}
-5
View File
@@ -49,9 +49,4 @@ mod tests {
);
}
}
#[test]
fn the_close_role_uses_the_chrome_close_glyph() {
assert_eq!(glyph(IconRole::Close), Some('\u{E8BB}'));
}
}