Lists many PRs add to: no written lengths, one file per theme (#7747) (#7898)

* Lists many PRs add to: no written lengths, one file per theme (#7747)

* xtask lists: the fixed-table allowlist in order, each with its own reason

* Lists: the wide-character blocks and the drawing scale presets as slices too (#7747)

* Lists: the drawing units test reads UNITS as a slice (#7747)
This commit is contained in:
raykholo
2026-10-28 21:33:34 +00:00
committed by GitHub
parent 4ad18407dc
commit 8e6a107f6e
58 changed files with 491 additions and 127 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ use solidcraft_render::{
use crate::{Result, Session, params::bad};
const KINDS: [&str; 12] = [
const KINDS: &[&str] = &[
"materials",
"lighting",
"environments",
@@ -45,7 +45,7 @@ fn catalog(kind: &str, command: &str) -> Result<&'static [Value]> {
}
let cached = CATALOGS.get_or_init(|| {
let mut catalogs = BTreeMap::new();
for kind in KINDS {
for &kind in KINDS {
let source = super::library_data::catalog(kind).ok_or_else(|| format!("missing built-in catalog {kind}"))?;
let value: Value = serde_json::from_str(source).map_err(|e| format!("invalid built-in catalog {kind}: {e}"))?;
if !value.get("items").is_some_and(Value::is_array) {
@@ -14,11 +14,14 @@ fn subject() -> Session {
#[test]
fn native_studios_resolve_without_mutation_and_apply_one_complete_undo() {
let entries = super::entries();
assert_eq!(entries.as_array().unwrap().len(), 25);
let hdrs: std::collections::BTreeSet<_> = entries.as_array().unwrap().iter().map(|item| item["hdr"].as_str().unwrap()).collect();
assert_eq!(hdrs.len(), 24, "every authored HDR has a complete curated composition");
for index in 1..=25 {
let id = format!("NATIVE-STUDIO-{index:03}");
let entries = entries.as_array().unwrap();
assert!(!entries.is_empty());
let mut ids = std::collections::BTreeSet::new();
let hdrs: std::collections::BTreeSet<_> = entries.iter().map(|item| item["hdr"].as_str().unwrap()).collect();
assert!(hdrs.len() >= 24, "every authored HDR has a complete curated composition");
for entry in entries {
let id = entry["id"].as_str().unwrap();
assert!(!id.is_empty() && ids.insert(id));
let mut s = subject();
let before = s.doc.to_json();
let undo = s.undo.len();