Skip to content

Commit

Permalink
Revert look_at test changes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
elrnv committed Nov 23, 2020
1 parent 121c77b commit f2284a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,9 @@ pub mod matrix3 {
]));

#[allow(deprecated)]
assert_ulps_eq!(m, Matrix3::look_to_lh(dir, up));
{
assert_ulps_eq!(m, Matrix3::look_at(dir, up));
}
}

#[test]
Expand Down Expand Up @@ -1164,7 +1166,9 @@ pub mod matrix4 {

let m = Matrix4::look_to_rh(eye, dir, up);
#[allow(deprecated)]
assert_ulps_eq!(m, Matrix4::look_to_rh(eye, dir, up));
{
assert_ulps_eq!(m, Matrix4::look_at_dir(eye, dir, up));
}

let expected = Matrix4::from([
[-0.9486833, -0.16903086, -0.26726127, 0.0],
Expand Down

0 comments on commit f2284a5

Please sign in to comment.