Tests: move the Impact Bursts checks into the brush names and counts test

The assertions sat after the last test function, outside any function, so the engine tests did not compile.
This commit is contained in:
dotCooCoo committed 2026-12-05 16:43:44 -08:00
1 parent 61f024cbbe
commit 5d92e04350
1 file changed
+6 -7
+6 -7
View File
@@ -172,6 +172,12 @@ fn the_builtin_libraries_list_their_brush_names_and_counts() {
[("Chalk Grain", "art"), ("Graphite Pencil", "art"), ("Wax Crayon", "art"), ("Charcoal Dust", "art")]
);
assert_eq!((entry("dry-media")["name"].as_str(), entry("dry-media")["count"].as_u64()), (Some("Dry Media"), Some(4)));
let impact = run(&mut s, "brush.library", json!({"library": "impact-bursts"}));
assert_eq!(
impact["brushes"].as_array().unwrap().iter().map(|b| b["name"].as_str().unwrap()).collect::<Vec<_>>(),
["Star Burst", "Ring Shock", "Slash Arc", "Spark Fan", "Debris Spray", "Crack Line"]
);
assert_eq!((libs[14]["name"].as_str(), libs[14]["count"].as_u64()), (Some("Impact Bursts"), Some(6)));
let arrows = run(&mut s, "brush.library", json!({"library": "Arrows"}));
assert_eq!(
arrows["brushes"].as_array().unwrap().iter().map(|b| (b["name"].as_str().unwrap(), b["type"].as_str().unwrap())).collect::<Vec<_>>(),
@@ -1321,10 +1327,3 @@ fn a_library_file_that_repeats_a_brush_name_loads_with_the_later_one_numbered()
let size = |b: Brush| if let BrushKind::Calligraphic(c) = b.kind { c.size } else { 0.0 };
assert_eq!(size(brush(&s, "Nib 2")), 2.0);
}
let impact = run(&mut s, "brush.library", json!({"library": "impact-bursts"}));
assert_eq!(
impact["brushes"].as_array().unwrap().iter().map(|b| b["name"].as_str().unwrap()).collect::<Vec<_>>(),
["Star Burst", "Ring Shock", "Slash Arc", "Spark Fan", "Debris Spray", "Crack Line"]
);
assert_eq!((libs[14]["name"].as_str(), libs[14]["count"].as_u64()), (Some("Impact Bursts"), Some(6)));