302d96eeb1
Rewrote a negated float comparison in the compass wobble check, merged two identical branches in the pack overlay mirroring, and replaced the empty item model test stub with small unit tests so the workspace passes clippy and tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
21 lines
540 B
Rust
21 lines
540 B
Rust
use super::*;
|
|
|
|
#[test]
|
|
fn identifier_adds_default_namespace() {
|
|
assert_eq!(identifier("stone").unwrap(), "minecraft:stone");
|
|
assert_eq!(identifier("a:b").unwrap(), "a:b");
|
|
}
|
|
|
|
#[test]
|
|
fn positive_modulo_wraps_negatives() {
|
|
assert!((positive_modulo(-0.25, 1.0) - 0.75).abs() < 1e-6);
|
|
assert!((positive_modulo(1.5, 1.0) - 0.5).abs() < 1e-6);
|
|
}
|
|
|
|
#[test]
|
|
fn display_context_names_round_trip() {
|
|
for name in ["gui", "ground", "fixed", "head"] {
|
|
assert_eq!(DisplayContext::by_name(name).unwrap().name(), name);
|
|
}
|
|
}
|