#![allow(bad_style)] use hektor::*; #[test] fn Vec2_new() { assert_eq!( &format!("{:?}", Vec2::new(1.0, 2.0)), "Vec2 { x: 1.0, y: 2.0 }" ); } #[test] fn Vec3_new() { assert_eq!( &format!("{:?}", Vec3::new(1.0, 2.0, 3.0)), "Vec3 { x: 1.0, y: 2.0, z: 3.0 }" ); } #[test] fn Vec4_new() { assert_eq!( &format!("{:?}", Vec4::new(1.0, 2.0, 3.0, 4.0)), "Vec4 { x: 1.0, y: 2.0, z: 3.0, w: 4.0 }" ); } #[test] fn Mat2_new() { let x_axis = Vec2::new(1.0, 2.0); let y_axis = Vec2::new(11.0, 12.0); assert_eq!( &format!("{:?}", Mat2::new(x_axis, y_axis)), "Mat2 { x_axis: (1.0, 2.0), y_axis: (11.0, 12.0) }" ); } #[test] fn Mat3_new() { let x_axis = Vec3::new(1.0, 2.0, 3.0); let y_axis = Vec3::new(11.0, 12.0, 13.0); let z_axis = Vec3::new(21.0, 22.0, 23.0); assert_eq!( &format!("{:?}", Mat3::new(x_axis, y_axis, z_axis)), "Mat3 { x_axis: (1.0, 2.0, 3.0), y_axis: (11.0, 12.0, 13.0), z_axis: (21.0, 22.0, 23.0) }" ); } #[test] fn Mat4_new() { let x_axis = Vec4::new(1.0, 2.0, 3.0, 4.0); let y_axis = Vec4::new(11.0, 12.0, 13.0, 14.0); let z_axis = Vec4::new(21.0, 22.0, 23.0, 24.0); let w_axis = Vec4::new(31.0, 32.0, 33.0, 34.0); assert_eq!( &format!("{:?}", Mat4::new(x_axis, y_axis, z_axis, w_axis)), "Mat4 { x_axis: (1.0, 2.0, 3.0, 4.0), y_axis: (11.0, 12.0, 13.0, 14.0), z_axis: (21.0, 22.0, 23.0, 24.0), w_axis: (31.0, 32.0, 33.0, 34.0) }" ); } #[test] fn Quat_new() { assert_eq!( &format!("{:?}", Quat::new(1.0, 2.0, 3.0, 4.0)), "Quat { a: 1.0, b: 2.0, c: 3.0, d: 4.0 }" ); }