Skip to content

Commit d2b9a5b

Browse files
committed
test(core/mat4): expand randomized MulAssign property to 64 iterations and add composite-LHS checks
1 parent b2abd25 commit d2b9a5b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crates/rmg-core/tests/mat4_mul_tests.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fn mat4_mul_assign_matches_operator_randomized() {
150150
}
151151
};
152152

153-
for _ in 0..16 {
153+
for _ in 0..64 {
154154
let lhs = rand_transform(&mut rng);
155155
let rhs = rand_transform(&mut rng);
156156

@@ -167,5 +167,13 @@ fn mat4_mul_assign_matches_operator_randomized() {
167167
let expected_borrowed = (lhs2 * rhs2).to_array();
168168
b *= &rhs2;
169169
approx_eq16(b.to_array(), expected_borrowed);
170+
171+
// Composite LHS path: compose two random transforms to probe deeper paths
172+
let lhs_c = rand_transform(&mut rng) * rand_transform(&mut rng);
173+
let rhs_c = rand_transform(&mut rng);
174+
let mut c = lhs_c;
175+
let expected_c = (lhs_c * rhs_c).to_array();
176+
c *= rhs_c;
177+
approx_eq16(c.to_array(), expected_c);
170178
}
171179
}

0 commit comments

Comments
 (0)