Skip to content

Commit 1a007f2

Browse files
committed
Revert look_at test changes
Previously look_at functions were erroneously renamed to look_to_{lh|rh} as a response to deprecation warnings. Instead what should've happened is that `allow(deprecated)` annotations are fixed to suppress tests that verify that deprecated functions are working. This commit reintroduced the tests for deprecated functions and suppresses the deprecation warnings.
1 parent 18eec70 commit 1a007f2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/matrix.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,9 @@ pub mod matrix3 {
740740
]));
741741

742742
#[allow(deprecated)]
743-
assert_ulps_eq!(m, Matrix3::look_to_lh(dir, up));
743+
{
744+
assert_ulps_eq!(m, Matrix3::look_at(dir, up));
745+
}
744746
}
745747

746748
#[test]
@@ -1164,7 +1166,9 @@ pub mod matrix4 {
11641166

11651167
let m = Matrix4::look_to_rh(eye, dir, up);
11661168
#[allow(deprecated)]
1167-
assert_ulps_eq!(m, Matrix4::look_to_rh(eye, dir, up));
1169+
{
1170+
assert_ulps_eq!(m, Matrix4::look_at_dir(eye, dir, up));
1171+
}
11681172

11691173
let expected = Matrix4::from([
11701174
[-0.9486833, -0.16903086, -0.26726127, 0.0],

0 commit comments

Comments
 (0)