Repository: bitshifter/glam-rs
Pull request #227 (2021-08-16 11:45:48)

Add support for running tests on wasm32


Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 30902d6..0b7307a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,7 +27,7 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-latest, macos-latest, windows-latest]
-        toolchain: [1.45.0, stable, beta, nightly]
+        toolchain: [1.51.0, stable, beta, nightly]
     runs-on: ${{ matrix.os }}
     steps:
       - uses: actions/checkout@v2
@@ -36,7 +36,7 @@ jobs:
       - run: ./build_and_test_features.sh
         shell: bash
 
-  build-wasm:
+  test-wasm:
     strategy:
       matrix:
         toolchain: [stable, nightly]
@@ -45,14 +45,8 @@ jobs:
     steps:
       - uses: actions/checkout@v2
 
-      - uses: actions-rs/toolchain@v1
-        with:
-          toolchain: ${{ matrix.toolchain }}
-          target: wasm32-unknown-unknown
-          override: true
+      - name: Install
+        run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
 
-      - name: Check wasm
-        uses: actions-rs/cargo@v1
-        with:
-          command: check
-          args: --target wasm32-unknown-unknown
+      - run: wasm-pack test --headless --chrome
+      - run: wasm-pack test --headless --firefox
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 58e1d20..2f2a934 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog], and this project adheres to
 
 ### Added
 
+* Added optional support for the `rkyv` serialization crate.
 * Added `Rem` and `RemAssign` implementations for all vector types.
 * Added quaternion `xyz()` method for returning the vector part of the
   quaternion.
diff --git a/Cargo.toml b/Cargo.toml
index 6adc823..9caba61 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -48,6 +48,7 @@ criterion = { version = "0.3", features = ["html_reports"] }
 # rand_xoshiro is required for tests if rand is enabled
 rand_xoshiro = "0.6"
 serde_json = "1.0"
+wasm-bindgen-test = "0.3.0"
 
 [lib]
 bench = false
diff --git a/README.md b/README.md
index 9e77e32..3f0dc4b 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
 
 [![Build Status]][github-ci] [![Coverage Status]][coveralls.io]
 [![Latest Version]][crates.io] [![docs]][docs.rs]
-[![Minimum Supported Rust Version]][Rust 1.45]
+[![Minimum Supported Rust Version]][Rust 1.51]
 
 A simple and fast 3D math library for games and graphics.
 
@@ -107,7 +107,7 @@ glam = { version = "0.17.0", default-features = false }
 
 ### Minimum Supported Rust Version (MSRV)
 
-The minimum supported version of Rust for `glam` is `1.45.0`.
+The minimum supported version of Rust for `glam` is `1.51.0`.
 
 ## Conventions
 
@@ -219,5 +219,5 @@ See [ATTRIBUTION.md] for details.
 [crates.io]: https://crates.io/crates/glam/
 [docs]: https://docs.rs/glam/badge.svg
 [docs.rs]: https://docs.rs/glam/
-[Minimum Supported Rust Version]: https://img.shields.io/badge/Rust-1.45.0-blue?color=fc8d62&logo=rust
-[Rust 1.45]: https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html
+[Minimum Supported Rust Version]: https://img.shields.io/badge/Rust-1.51.0-blue?color=fc8d62&logo=rust
+[Rust 1.51]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1510-2021-03-25
diff --git a/build_all_msrv.sh b/build_all_msrv.sh
index f510d4e..b84abf2 100755
--- a/build_all_msrv.sh
+++ b/build_all_msrv.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-CARGO='rustup run 1.36.0 cargo'
+CARGO='rustup run 1.51.0 cargo'
 $CARGO test --features "bytemuck mint rand serde debug-glam-assert transform-types" && \
 $CARGO test --features "scalar-math bytemuck mint rand serde debug-glam-assert transform-types" && \
 $CARGO test --no-default-features --features "libm scalar-math bytemuck mint rand serde debug-glam-assert transform-types" && \
diff --git a/clippy.toml b/clippy.toml
index 1cf14c6..829dd1c 100644
--- a/clippy.toml
+++ b/clippy.toml
@@ -1,1 +1,1 @@
-msrv = "1.45"
+msrv = "1.51"
diff --git a/src/lib.rs b/src/lib.rs
index 8680f0a..f1ff66f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -229,7 +229,7 @@ and benchmarks.
 
 ## Minimum Supported Rust Version (MSRV)
 
-The minimum supported Rust version is `1.45.0`.
+The minimum supported Rust version is `1.51.0`.
 
 */
 #![doc(html_root_url = "https://docs.rs/glam/0.17.3")]
diff --git a/src/quat.rs b/src/quat.rs
index 2f8408d..e4d390d 100644
--- a/src/quat.rs
+++ b/src/quat.rs
@@ -85,9 +85,7 @@ macro_rules! impl_quat_methods {
         /// Panics if `slice` length is less than 4.
         #[inline(always)]
         pub fn from_slice(slice: &[$t]) -> Self {
-            #[allow(clippy::let_and_return)]
-            let q = Vector4::from_slice_unaligned(slice);
-            Self(q)
+            Self(Vector4::from_slice_unaligned(slice))
         }
 
         /// Writes the quaternion to an unaligned slice.
diff --git a/swizzlegen/src/main.rs b/swizzlegen/src/main.rs
index 5d1d341..919d929 100644
--- a/swizzlegen/src/main.rs
+++ b/swizzlegen/src/main.rs
@@ -624,6 +624,7 @@ fn write_test_vec4(
     write!(
         out,
         r#"
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_{}_swizzles() {{
     let v = {}(1_{}, 2_{}, 3_{}, 4_{});
@@ -652,6 +653,7 @@ fn write_test_vec3(
     write!(
         out,
         r#"
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_{}_swizzles() {{
     let v = {}(1_{}, 2_{}, 3_{});
@@ -680,6 +682,7 @@ fn write_test_vec2(
     write!(
         out,
         r#"
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_{}_swizzles() {{
     let v = {}(1_{}, 2_{});


Test patch:
diff --git a/tests/affine2.rs b/tests/affine2.rs
index a2dfaac..cd833d3 100644
--- a/tests/affine2.rs
+++ b/tests/affine2.rs
@@ -8,32 +8,28 @@ macro_rules! impl_affine2_tests {
         use core::$t::NAN;
         use core::$t::NEG_INFINITY;
 
-        #[test]
-        fn test_affine2_identity() {
+        glam_test!(test_affine2_identity, {
             assert_eq!($affine2::IDENTITY, $affine2::IDENTITY * $affine2::IDENTITY);
             assert_eq!($affine2::IDENTITY, $affine2::default());
-        }
+        });
 
-        #[test]
-        fn test_affine2_zero() {
+        glam_test!(test_affine2_zero, {
             assert_eq!(
                 $affine2::ZERO.transform_point2($vec2::new(1., 2.)),
                 $vec2::ZERO
             );
-        }
+        });
 
-        #[test]
-        fn test_affine2_translation() {
+        glam_test!(test_affine2_translation, {
             let translate = $affine2::from_translation($vec2::new(1.0, 2.0));
             assert_eq!(translate.translation, $vec2::new(1.0, 2.0).into());
             assert_eq!(
                 translate.transform_point2($vec2::new(2.0, 3.0)),
                 $vec2::new(3.0, 5.0),
             );
-        }
+        });
 
-        #[test]
-        fn test_affine2_mul() {
+        glam_test!(test_affine2_mul, {
             let m = $affine2::from_angle(deg(90.0));
             let result3 = m.transform_vector2($vec2::Y);
             assert_approx_eq!($vec2::new(-1.0, 0.0), result3);
@@ -48,19 +44,17 @@ macro_rules! impl_affine2_tests {
 
             let result3 = m.transform_point2($vec2::Y);
             assert_approx_eq!($vec2::new(-0.5, 2.0), result3, 1.0e-6);
-        }
+        });
 
-        #[test]
-        fn test_from_scale() {
+        glam_test!(test_from_scale, {
             let m = $affine2::from_scale($vec2::new(2.0, 4.0));
             assert_approx_eq!(
                 m.transform_point2($vec2::new(1.0, 1.0)),
                 $vec2::new(2.0, 4.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_affine2_inverse() {
+        glam_test!(test_affine2_inverse, {
             let inv = $affine2::IDENTITY.inverse();
             assert_approx_eq!($affine2::IDENTITY, inv);
 
@@ -94,10 +88,9 @@ macro_rules! impl_affine2_tests {
             assert_approx_eq!($affine2::IDENTITY, m_inv * m, 1.0e-5);
 
             should_glam_assert!({ $affine2::ZERO.inverse() });
-        }
+        });
 
-        #[test]
-        fn test_affine2_ops() {
+        glam_test!(test_affine2_ops, {
             let m0 = $affine2::from_cols_array_2d(&MATRIX2D);
             let m0x2 = $affine2::from_cols_array_2d(&[[2.0, 4.0], [6.0, 8.0], [10.0, 12.0]]);
             assert_eq!(m0x2, m0 * 2.0);
@@ -106,16 +99,14 @@ macro_rules! impl_affine2_tests {
             assert_eq!($affine2::ZERO, m0 - m0);
             assert_approx_eq!(m0, m0 * $affine2::IDENTITY);
             assert_approx_eq!(m0, $affine2::IDENTITY * m0);
-        }
+        });
 
-        #[test]
-        fn test_affine2_fmt() {
+        glam_test!(test_affine2_fmt, {
             let a = $affine2::from_cols_array_2d(&MATRIX2D);
             assert_eq!(format!("{}", a), "[[1, 2], [3, 4], [5, 6]]");
-        }
+        });
 
-        #[test]
-        fn test_affine2_to_from_slice() {
+        glam_test!(test_affine2_to_from_slice, {
             const MATRIX1D: [$t; 6] = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0];
             let m = $affine2::from_cols_slice(&MATRIX1D);
             assert_eq!($affine2::from_cols_array(&MATRIX1D), m);
@@ -131,25 +122,23 @@ macro_rules! impl_affine2_tests {
 
             should_panic!({ $affine2::from_cols_slice(&[0.0; 5]) });
             should_panic!({ $affine2::IDENTITY.write_cols_to_slice(&mut [0.0; 5]) });
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let ident = $affine2::IDENTITY;
             assert_eq!(
                 vec![ident, ident].iter().product::<$affine2>(),
                 ident * ident
             );
-        }
+        });
 
-        #[test]
-        fn test_affine2_is_finite() {
+        glam_test!(test_affine2_is_finite, {
             assert!($affine2::from_scale($vec2::new(1.0, 1.0)).is_finite());
             assert!($affine2::from_scale($vec2::new(0.0, 1.0)).is_finite());
             assert!(!$affine2::from_scale($vec2::new(1.0, NAN)).is_finite());
             assert!(!$affine2::from_scale($vec2::new(1.0, NEG_INFINITY)).is_finite());
-        }
+        });
     };
 }
 
@@ -171,8 +160,7 @@ mod affine2 {
         }
     }
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         if cfg!(not(feature = "scalar-math")) {
             assert_eq!(32, mem::size_of::<Affine2>());
@@ -181,7 +169,7 @@ mod affine2 {
             assert_eq!(24, mem::size_of::<Affine2>());
             assert_eq!(4, mem::align_of::<Affine2>());
         }
-    }
+    });
 
     impl_affine2_tests!(f32, Affine2, Vec2);
 }
@@ -204,12 +192,11 @@ mod daffine2 {
         }
     }
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(48, mem::size_of::<DAffine2>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DAffine2>());
-    }
+    });
 
     impl_affine2_tests!(f64, DAffine2, DVec2);
 }
diff --git a/tests/affine3.rs b/tests/affine3.rs
index 558e18f..66b7728 100644
--- a/tests/affine3.rs
+++ b/tests/affine3.rs
@@ -13,32 +13,28 @@ macro_rules! impl_affine3_tests {
         use core::$t::NAN;
         use core::$t::NEG_INFINITY;
 
-        #[test]
-        fn test_affine3_identity() {
+        glam_test!(test_affine3_identity, {
             assert_eq!($affine3::IDENTITY, $affine3::IDENTITY * $affine3::IDENTITY);
             assert_eq!($affine3::IDENTITY, $affine3::default());
-        }
+        });
 
-        #[test]
-        fn test_affine3_zero() {
+        glam_test!(test_affine3_zero, {
             assert_eq!(
                 $affine3::ZERO.transform_point3($vec3::new(1., 2., 3.)),
                 $vec3::ZERO
             );
-        }
+        });
 
-        #[test]
-        fn test_affine3_translation() {
+        glam_test!(test_affine3_translation, {
             let translate = $affine3::from_translation($vec3::new(1.0, 2.0, 3.0));
             assert_eq!(translate.translation, $vec3::new(1.0, 2.0, 3.0).into());
             assert_eq!(
                 translate.transform_point3($vec3::new(2.0, 3.0, 4.0)),
                 $vec3::new(3.0, 5.0, 7.0),
             );
-        }
+        });
 
-        #[test]
-        fn test_from_rotation() {
+        glam_test!(test_from_rotation, {
             let eps = 2.0 * core::f32::EPSILON;
             let rot_x1 = $affine3::from_rotation_x(deg(180.0));
             let rot_x2 = $affine3::from_axis_angle($vec3::X, deg(180.0));
@@ -52,10 +48,9 @@ macro_rules! impl_affine3_tests {
 
             should_glam_assert!({ $affine3::from_axis_angle($vec3::ZERO, 0.0) });
             should_glam_assert!({ $affine3::from_quat($quat::IDENTITY * 2.0) });
-        }
+        });
 
-        #[test]
-        fn test_affine3_mul() {
+        glam_test!(test_affine3_mul, {
             let m = $affine3::from_axis_angle($vec3::Z, deg(90.0));
             let result3 = m.transform_vector3($vec3::Y);
             assert_approx_eq!($vec3::new(-1.0, 0.0, 0.0), result3);
@@ -70,19 +65,17 @@ macro_rules! impl_affine3_tests {
 
             let result3 = m.transform_point3($vec3::Y);
             assert_approx_eq!($vec3::new(1.0, 2.0, 4.5), result3, 1.0e-6);
-        }
+        });
 
-        #[test]
-        fn test_from_scale() {
+        glam_test!(test_from_scale, {
             let m = $affine3::from_scale($vec3::new(2.0, 4.0, 8.0));
             assert_approx_eq!(
                 m.transform_point3($vec3::new(1.0, 1.0, 1.0)),
                 $vec3::new(2.0, 4.0, 8.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_affine3_inverse() {
+        glam_test!(test_affine3_inverse, {
             let inv = $affine3::IDENTITY.inverse();
             assert_approx_eq!($affine3::IDENTITY, inv);
 
@@ -116,10 +109,9 @@ macro_rules! impl_affine3_tests {
             assert_approx_eq!($affine3::IDENTITY, m_inv * m, 1.0e-5);
 
             should_glam_assert!({ $affine3::ZERO.inverse() });
-        }
+        });
 
-        #[test]
-        fn test_affine3_decompose() {
+        glam_test!(test_affine3_decompose, {
             // identity
             let (out_scale, out_rotation, out_translation) =
                 $affine3::IDENTITY.to_scale_rotation_translation();
@@ -193,10 +185,9 @@ macro_rules! impl_affine3_tests {
                 $affine3::from_scale_rotation_translation(out_scale, out_rotation, out_translation),
                 1e-6
             );
-        }
+        });
 
-        #[test]
-        fn test_affine3_look_at() {
+        glam_test!(test_affine3_look_at, {
             let eye = $vec3::new(0.0, 0.0, -5.0);
             let center = $vec3::new(0.0, 0.0, 0.0);
             let up = $vec3::new(1.0, 0.0, 0.0);
@@ -208,10 +199,9 @@ macro_rules! impl_affine3_tests {
 
             should_glam_assert!({ $affine3::look_at_lh($vec3::ONE, $vec3::ZERO, $vec3::ZERO) });
             should_glam_assert!({ $affine3::look_at_rh($vec3::ONE, $vec3::ZERO, $vec3::ZERO) });
-        }
+        });
 
-        #[test]
-        fn test_affine3_ops() {
+        glam_test!(test_affine3_ops, {
             let m0 = $affine3::from_cols_array_2d(&MATRIX2D);
             let m0x2 = $affine3::from_cols_array_2d(&[
                 [2.0, 4.0, 6.0],
@@ -225,19 +215,17 @@ macro_rules! impl_affine3_tests {
             assert_eq!($affine3::ZERO, m0 - m0);
             assert_approx_eq!(m0, m0 * $affine3::IDENTITY);
             assert_approx_eq!(m0, $affine3::IDENTITY * m0);
-        }
+        });
 
-        #[test]
-        fn test_affine3_fmt() {
+        glam_test!(test_affine3_fmt, {
             let a = $affine3::from_cols_array_2d(&MATRIX2D);
             assert_eq!(
                 format!("{}", a),
                 "[[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]"
             );
-        }
+        });
 
-        #[test]
-        fn test_affine3_to_from_slice() {
+        glam_test!(test_affine3_to_from_slice, {
             const MATRIX1D: [$t; 12] = [
                 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0,
             ];
@@ -260,25 +248,23 @@ macro_rules! impl_affine3_tests {
 
             should_panic!({ $affine3::from_cols_slice(&[0.0; 11]) });
             should_panic!({ $affine3::IDENTITY.write_cols_to_slice(&mut [0.0; 11]) });
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let ident = $affine3::IDENTITY;
             assert_eq!(
                 vec![ident, ident].iter().product::<$affine3>(),
                 ident * ident
             );
-        }
+        });
 
-        #[test]
-        fn test_affine3_is_finite() {
+        glam_test!(test_affine3_is_finite, {
             assert!($affine3::from_scale($vec3::new(1.0, 1.0, 1.0)).is_finite());
             assert!($affine3::from_scale($vec3::new(0.0, 1.0, 1.0)).is_finite());
             assert!(!$affine3::from_scale($vec3::new(1.0, NAN, 1.0)).is_finite());
             assert!(!$affine3::from_scale($vec3::new(1.0, 1.0, NEG_INFINITY)).is_finite());
-        }
+        });
     };
 }
 
@@ -300,15 +286,13 @@ mod affine3a {
         }
     }
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(64, mem::size_of::<Affine3A>());
         assert_eq!(16, mem::align_of::<Affine3A>());
-    }
+    });
 
-    #[test]
-    fn test_affine3_mul_vec3a() {
+    glam_test!(test_affine3_mul_vec3a, {
         let m = Affine3A::from_axis_angle(Vec3::Z, deg(90.0));
         let result3 = m.transform_vector3a(Vec3A::Y);
         assert_approx_eq!(Vec3A::new(-1.0, 0.0, 0.0), result3);
@@ -323,7 +307,7 @@ mod affine3a {
 
         let result3 = m.transform_point3a(Vec3A::Y);
         assert_approx_eq!(Vec3A::new(1.0, 2.0, 4.5), result3, 1.0e-6);
-    }
+    });
 
     impl_affine3_tests!(f32, Affine3A, Quat, Vec3);
 }
@@ -346,12 +330,11 @@ mod daffine3 {
         }
     }
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(96, mem::size_of::<DAffine3>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DAffine3>());
-    }
+    });
 
     impl_affine3_tests!(f64, DAffine3, DQuat, DVec3);
 }
diff --git a/tests/euler.rs b/tests/euler.rs
index 94e76e6..f6cab9e 100644
--- a/tests/euler.rs
+++ b/tests/euler.rs
@@ -1,8 +1,8 @@
-use glam::{DQuat, Quat};
-
 #[macro_use]
 mod support;
 
+use glam::{DQuat, Quat};
+
 /// Helper to calculate the inner angle in the range [0, 2*PI)
 trait AngleDiff {
     type Output;
@@ -85,8 +85,7 @@ impl_eq_approx!(f64, DQuat, std::f64::consts::PI);
 #[macro_export]
 macro_rules! impl_3axis_test {
     ($name:ident, $t:ty, $quat:ident, $euler:path, $U:path, $V:path, $W:path, $vec:ident) => {
-        #[test]
-        fn $name() {
+        glam_test!($name, {
             let euler = $euler;
             assert!($U != $W); // First and last axis must be different for three axis
             for u in (-176..=176).step_by(44) {
@@ -119,15 +118,14 @@ macro_rules! impl_3axis_test {
                     }
                 }
             }
-        }
+        });
     };
 }
 
 #[macro_export]
 macro_rules! impl_2axis_test {
     ($name:ident, $t:ty, $quat:ident, $euler:path, $U:path, $V:path, $W:path, $vec:ident) => {
-        #[test]
-        fn $name() {
+        glam_test!($name, {
             #[allow(deprecated)]
             let euler = $euler;
             assert!($U == $W); // First and last axis must be different for three axis
@@ -162,7 +160,7 @@ macro_rules! impl_2axis_test {
                     }
                 }
             }
-        }
+        });
     };
 }
 
diff --git a/tests/mat2.rs b/tests/mat2.rs
index aa4f6a9..569c7ec 100644
--- a/tests/mat2.rs
+++ b/tests/mat2.rs
@@ -7,33 +7,29 @@ macro_rules! impl_mat2_tests {
 
         const MATRIX: [[$t; 2]; 2] = [[1.0, 2.0], [3.0, 4.0]];
 
-        #[test]
-        fn test_const() {
+        glam_test!(test_const, {
             const M0: $mat2 = $const_new!([0.0; 4]);
             const M1: $mat2 = $const_new!([1.0, 2.0, 3.0, 4.0]);
             const M2: $mat2 = $const_new!([1.0, 2.0], [3.0, 4.0]);
             assert_eq!($mat2::ZERO, M0);
             assert_eq!($mat2::from_cols_array(&[1.0, 2.0, 3.0, 4.0]), M1);
             assert_eq!($mat2::from_cols_array(&[1.0, 2.0, 3.0, 4.0]), M2);
-        }
+        });
 
-        #[test]
-        fn test_mat2_identity() {
+        glam_test!(test_mat2_identity, {
             assert_eq!($mat2::IDENTITY, $mat2::from_cols_array(&[1., 0., 0., 1.]));
             let identity = $mat2::IDENTITY;
             assert_eq!(IDENTITY, identity.to_cols_array_2d());
             assert_eq!($mat2::from_cols_array_2d(&IDENTITY), identity);
             assert_eq!(identity, identity * identity);
             assert_eq!(identity, $mat2::default());
-        }
+        });
 
-        #[test]
-        fn test_mat2_zero() {
+        glam_test!(test_mat2_zero, {
             assert_eq!($mat2::ZERO, $mat2::from_cols_array(&[0., 0., 0., 0.]));
-        }
+        });
 
-        #[test]
-        fn test_mat2_accessors() {
+        glam_test!(test_mat2_accessors, {
             let mut m = $mat2::ZERO;
             m.x_axis = $vec2::new(1.0, 2.0);
             m.y_axis = $vec2::new(3.0, 4.0);
@@ -58,10 +54,9 @@ macro_rules! impl_mat2_tests {
                 m.col_mut(2);
             });
             should_panic!({ $mat2::ZERO.row(2) });
-        }
+        });
 
-        #[test]
-        fn test_mat2_from_axes() {
+        glam_test!(test_mat2_from_axes, {
             let a = $mat2::from_cols_array_2d(&[[1.0, 2.0], [3.0, 4.0]]);
             assert_eq!(MATRIX, a.to_cols_array_2d());
             let b = $mat2::from_cols($newvec2(1.0, 2.0), $newvec2(3.0, 4.0));
@@ -71,26 +66,23 @@ macro_rules! impl_mat2_tests {
             let d = b.to_cols_array();
             let f = $mat2::from_cols_array(&d);
             assert_eq!(b, f);
-        }
+        });
 
-        #[test]
-        fn test_mat2_mul() {
+        glam_test!(test_mat2_mul, {
             let mat_a = $mat2::from_angle(deg(90.0));
             let res_a = mat_a * $vec2::Y;
             assert_approx_eq!($newvec2(-1.0, 0.0), res_a);
             let res_b = mat_a * $vec2::X;
             assert_approx_eq!($newvec2(0.0, 1.0), res_b);
-        }
+        });
 
-        #[test]
-        fn test_from_scale_angle() {
+        glam_test!(test_from_scale_angle, {
             let rot = $mat2::from_scale_angle($vec2::new(4.0, 2.0), deg(180.0));
             assert_approx_eq!($vec2::X * -4.0, rot * $vec2::X, 1.0e-6);
             assert_approx_eq!($vec2::Y * -2.0, rot * $vec2::Y, 1.0e-6);
-        }
+        });
 
-        #[test]
-        fn test_from_diagonal() {
+        glam_test!(test_from_diagonal, {
             let m = $mat2::from_diagonal($vec2::new(2 as $t, 4 as $t));
             assert_eq!(
                 $mat2::from_cols_array_2d(&[[2 as $t, 0 as $t], [0 as $t, 4 as $t]]),
@@ -99,26 +91,23 @@ macro_rules! impl_mat2_tests {
             assert_approx_eq!(m * $vec2::new(1.0, 1.0), $vec2::new(2.0, 4.0));
             assert_approx_eq!($vec2::X * 2.0, m.x_axis);
             assert_approx_eq!($vec2::Y * 4.0, m.y_axis);
-        }
+        });
 
-        #[test]
-        fn test_from_mat3() {
+        glam_test!(test_from_mat3, {
             let m3 =
                 $mat3::from_cols_array_2d(&[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0]]);
             let m2 = $mat2::from_mat3(m3);
             assert_eq!($mat2::from_cols_array_2d(&[[1.0, 2.0], [4.0, 5.0]]), m2);
-        }
+        });
 
-        #[test]
-        fn test_mat2_transpose() {
+        glam_test!(test_mat2_transpose, {
             let m = $newmat2($newvec2(1.0, 2.0), $newvec2(3.0, 4.0));
             let mt = m.transpose();
             assert_eq!($newvec2(1.0, 3.0), mt.x_axis);
             assert_eq!($newvec2(2.0, 4.0), mt.y_axis);
-        }
+        });
 
-        #[test]
-        fn test_mat2_det() {
+        glam_test!(test_mat2_det, {
             assert_eq!(0.0, $mat2::ZERO.determinant());
             assert_eq!(1.0, $mat2::IDENTITY.determinant());
             assert_eq!(1.0, $mat2::from_angle(deg(90.0)).determinant());
@@ -132,10 +121,9 @@ macro_rules! impl_mat2_tests {
                 1.0 * 4.0 - 2.0 * 3.0,
                 $mat2::from_cols_array(&[1.0, 2.0, 3.0, 4.0]).determinant()
             );
-        }
+        });
 
-        #[test]
-        fn test_mat2_inverse() {
+        glam_test!(test_mat2_inverse, {
             let inv = $mat2::IDENTITY.inverse();
             assert_approx_eq!($mat2::IDENTITY, inv);
 
@@ -156,10 +144,9 @@ macro_rules! impl_mat2_tests {
             assert_approx_eq!(m_inv, rot_inv * scale_inv);
 
             should_glam_assert!({ $mat2::ZERO.inverse() });
-        }
+        });
 
-        #[test]
-        fn test_mat2_ops() {
+        glam_test!(test_mat2_ops, {
             let m0 = $mat2::from_cols_array_2d(&MATRIX);
             let m0x2 = $mat2::from_cols_array_2d(&[[2.0, 4.0], [6.0, 8.0]]);
             assert_eq!(m0x2, m0 * 2.0);
@@ -184,16 +171,14 @@ macro_rules! impl_mat2_tests {
             let mut m1 = $mat2::IDENTITY;
             m1 *= m0;
             assert_approx_eq!(m0, m1);
-        }
+        });
 
-        #[test]
-        fn test_mat2_fmt() {
+        glam_test!(test_mat2_fmt, {
             let a = $mat2::from_cols_array_2d(&MATRIX);
             assert_eq!(format!("{}", a), "[[1, 2], [3, 4]]");
-        }
+        });
 
-        #[test]
-        fn test_mat2_to_from_slice() {
+        glam_test!(test_mat2_to_from_slice, {
             const MATRIX1D: [$t; 4] = [1.0, 2.0, 3.0, 4.0];
             let m = $mat2::from_cols_slice(&MATRIX1D);
             assert_eq!($mat2::from_cols_array(&MATRIX1D), m);
@@ -203,24 +188,21 @@ macro_rules! impl_mat2_tests {
 
             should_panic!({ $mat2::from_cols_slice(&[0.0; 3]) });
             should_panic!({ $mat2::IDENTITY.write_cols_to_slice(&mut [0.0; 3]) });
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_sum() {
+        glam_test!(test_sum, {
             let id = $mat2::IDENTITY;
             assert_eq!(vec![id, id].iter().sum::<$mat2>(), id + id);
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let two = $mat2::IDENTITY + $mat2::IDENTITY;
             assert_eq!(vec![two, two].iter().product::<$mat2>(), two * two);
-        }
+        });
 
-        #[test]
-        fn test_mat2_is_finite() {
+        glam_test!(test_mat2_is_finite, {
             use std::$t::INFINITY;
             use std::$t::NAN;
             use std::$t::NEG_INFINITY;
@@ -228,7 +210,7 @@ macro_rules! impl_mat2_tests {
             assert!(!($mat2::IDENTITY * INFINITY).is_finite());
             assert!(!($mat2::IDENTITY * NEG_INFINITY).is_finite());
             assert!(!($mat2::IDENTITY * NAN).is_finite());
-        }
+        });
     };
 }
 
@@ -236,8 +218,7 @@ mod mat2 {
     use super::support::deg;
     use glam::{const_mat2, mat2, swizzles::*, vec2, Mat2, Mat3, Vec2};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(16, mem::size_of::<Mat2>());
         if cfg!(feature = "scalar-math") {
@@ -245,10 +226,9 @@ mod mat2 {
         } else {
             assert_eq!(16, mem::align_of::<Mat2>());
         }
-    }
+    });
 
-    #[test]
-    fn test_as() {
+    glam_test!(test_as, {
         use glam::DMat2;
         assert_eq!(
             DMat2::from_cols_array(&[1.0, 2.0, 3.0, 4.0]),
@@ -258,7 +238,7 @@ mod mat2 {
             Mat2::from_cols_array(&[1.0, 2.0, 3.0, 4.0]),
             DMat2::from_cols_array(&[1.0, 2.0, 3.0, 4.0]).as_mat2()
         );
-    }
+    });
 
     impl_mat2_tests!(f32, const_mat2, mat2, Mat2, Mat3, vec2, Vec2);
 }
@@ -267,12 +247,11 @@ mod dmat2 {
     use super::support::deg;
     use glam::{const_dmat2, dmat2, dvec2, swizzles::*, DMat2, DMat3, DVec2};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(32, mem::size_of::<DMat2>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DMat2>());
-    }
+    });
 
     impl_mat2_tests!(f64, const_dmat2, dmat2, DMat2, DMat3, dvec2, DVec2);
 }
diff --git a/tests/mat3.rs b/tests/mat3.rs
index 6b71846..0168171 100644
--- a/tests/mat3.rs
+++ b/tests/mat3.rs
@@ -11,8 +11,7 @@ macro_rules! impl_mat3_tests {
 
         const MATRIX: [[$t; 3]; 3] = [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0]];
 
-        #[test]
-        fn test_const() {
+        glam_test!(test_const, {
             const M0: $mat3 = $const_new!([0.0; 9]);
             const M1: $mat3 = $const_new!([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]);
             const M2: $mat3 = $const_new!([1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0]);
@@ -25,10 +24,9 @@ macro_rules! impl_mat3_tests {
                 $mat3::from_cols_array(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]),
                 M2
             );
-        }
+        });
 
-        #[test]
-        fn test_mat3_identity() {
+        glam_test!(test_mat3_identity, {
             assert_eq!(
                 $mat3::IDENTITY,
                 $mat3::from_cols_array(&[
@@ -42,18 +40,16 @@ macro_rules! impl_mat3_tests {
             assert_eq!($mat3::from_cols_array_2d(&IDENTITY), identity);
             assert_eq!(identity, identity * identity);
             assert_eq!(identity, $mat3::default());
-        }
+        });
 
-        #[test]
-        fn test_mat3_zero() {
+        glam_test!(test_mat3_zero, {
             assert_eq!(
                 $mat3::ZERO,
                 $mat3::from_cols_array(&[0., 0., 0., 0., 0., 0., 0., 0., 0.])
             );
-        }
+        });
 
-        #[test]
-        fn test_mat3_accessors() {
+        glam_test!(test_mat3_accessors, {
             let mut m = $mat3::ZERO;
             m.x_axis = $newvec3(1.0, 2.0, 3.0);
             m.y_axis = $newvec3(4.0, 5.0, 6.0);
@@ -84,10 +80,9 @@ macro_rules! impl_mat3_tests {
                 m.col_mut(3);
             });
             should_panic!({ $mat3::ZERO.row(3) });
-        }
+        });
 
-        #[test]
-        fn test_mat3_from_axes() {
+        glam_test!(test_mat3_from_axes, {
             let a = $mat3::from_cols_array_2d(&[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0]]);
             assert_eq!(MATRIX, a.to_cols_array_2d());
             let b = $mat3::from_cols(
@@ -105,10 +100,9 @@ macro_rules! impl_mat3_tests {
             let d = b.to_cols_array();
             let f = $mat3::from_cols_array(&d);
             assert_eq!(b, f);
-        }
+        });
 
-        #[test]
-        fn test_from_rotation() {
+        glam_test!(test_from_rotation, {
             let rot_x1 = $mat3::from_rotation_x(deg(180.0));
             let rot_x2 = $mat3::from_axis_angle($vec3::X, deg(180.0));
             assert_approx_eq!(rot_x1, rot_x2);
@@ -129,20 +123,18 @@ macro_rules! impl_mat3_tests {
 
             should_glam_assert!({ $mat3::from_axis_angle($vec3::ZERO, 0.0) });
             should_glam_assert!({ $mat3::from_quat($quat::from_xyzw(0.0, 0.0, 0.0, 0.0)) });
-        }
+        });
 
-        #[test]
-        fn test_mat3_mul() {
+        glam_test!(test_mat3_mul, {
             let mat_a = $mat3::from_axis_angle($vec3::Z, deg(90.0));
             assert_approx_eq!($newvec3(-1.0, 0.0, 0.0), mat_a * $newvec3(0.0, 1.0, 0.0));
             assert_approx_eq!(
                 $vec3::new(-1.0, 0.0, 0.0),
                 mat_a.mul_vec3($vec3::new(0.0, 1.0, 0.0))
             );
-        }
+        });
 
-        #[test]
-        fn test_mat3_transform2d() {
+        glam_test!(test_mat3_transform2d, {
             let m = $mat3::from_translation($vec2::new(2.0, 4.0));
             assert_eq!($vec2::ZERO, m.transform_vector2($vec2::ZERO));
             assert_eq!($vec2::new(2.0, 4.0), m.transform_point2($vec2::ZERO));
@@ -172,10 +164,9 @@ macro_rules! impl_mat3_tests {
             let result2 = m.transform_point2($vec2::Y);
             assert_approx_eq!($vec2::new(-0.5, 2.0), result2, 1.0e-6);
             assert_approx_eq!(result2, (m * $vec2::Y.extend(1.0)).truncate());
-        }
+        });
 
-        #[test]
-        fn test_from_ypr() {
+        glam_test!(test_from_ypr, {
             use glam::EulerRot;
             let zero = deg(0.0);
             let yaw = deg(30.0);
@@ -200,28 +191,26 @@ macro_rules! impl_mat3_tests {
             let yxz0 = y0 * x0 * z0;
             let yxz1 = $mat3::from_euler(EulerRot::YXZ, yaw, pitch, roll);
             assert_approx_eq!(yxz0, yxz1, 1e-6);
-        }
+        });
 
-        #[test]
-        fn test_from_diagonal() {
+        glam_test!(test_from_diagonal, {
             let m = $mat3::from_diagonal($vec3::new(2.0, 4.0, 8.0));
             assert_approx_eq!(m * $vec3::new(1.0, 1.0, 1.0), $vec3::new(2.0, 4.0, 8.0));
             assert_approx_eq!($newvec3(2.0, 0.0, 0.0), m.x_axis);
             assert_approx_eq!($newvec3(0.0, 4.0, 0.0), m.y_axis);
             assert_approx_eq!($newvec3(0.0, 0.0, 8.0), m.z_axis);
-        }
+        });
 
-        #[test]
-        fn test_from_mat2() {
+        glam_test!(test_from_mat2, {
             let m2 = $mat2::from_cols_array_2d(&[[1.0, 2.0], [3.0, 4.0]]);
             let m3 = $mat3::from_mat2(m2);
             assert_eq!(
                 $mat3::from_cols_array_2d(&[[1.0, 2.0, 0.0], [3.0, 4.0, 0.0], [0.0, 0.0, 1.0]]),
                 m3
             );
-        }
-        #[test]
-        fn test_from_mat4() {
+        });
+
+        glam_test!(test_from_mat4, {
             let m4 = $mat4::from_cols_array_2d(&[
                 [1.0, 2.0, 3.0, 4.0],
                 [5.0, 6.0, 7.0, 8.0],
@@ -233,10 +222,9 @@ macro_rules! impl_mat3_tests {
                 $mat3::from_cols_array_2d(&[[1.0, 2.0, 3.0], [5.0, 6.0, 7.0], [9.0, 10.0, 11.0]]),
                 m3
             );
-        }
+        });
 
-        #[test]
-        fn test_mat3_transpose() {
+        glam_test!(test_mat3_transpose, {
             let m = $newmat3(
                 $newvec3(1.0, 2.0, 3.0),
                 $newvec3(4.0, 5.0, 6.0),
@@ -246,10 +234,9 @@ macro_rules! impl_mat3_tests {
             assert_eq!($newvec3(1.0, 4.0, 7.0), mt.x_axis);
             assert_eq!($newvec3(2.0, 5.0, 8.0), mt.y_axis);
             assert_eq!($newvec3(3.0, 6.0, 9.0), mt.z_axis);
-        }
+        });
 
-        #[test]
-        fn test_mat3_det() {
+        glam_test!(test_mat3_det, {
             assert_eq!(0.0, $mat3::ZERO.determinant());
             assert_eq!(1.0, $mat3::IDENTITY.determinant());
             assert_eq!(1.0, $mat3::from_rotation_x(deg(90.0)).determinant());
@@ -259,10 +246,9 @@ macro_rules! impl_mat3_tests {
                 2.0 * 2.0 * 2.0,
                 $mat3::from_diagonal($vec3::new(2.0, 2.0, 2.0)).determinant()
             );
-        }
+        });
 
-        #[test]
-        fn test_mat3_inverse() {
+        glam_test!(test_mat3_inverse, {
             // assert_eq!(None, $mat3::ZERO.inverse());
             let inv = $mat3::IDENTITY.inverse();
             // assert_ne!(None, inv);
@@ -291,10 +277,9 @@ macro_rules! impl_mat3_tests {
             assert_approx_eq!(m_inv, rotz_inv * scale_inv);
 
             should_glam_assert!({ $mat3::ZERO.inverse() });
-        }
+        });
 
-        #[test]
-        fn test_mat3_ops() {
+        glam_test!(test_mat3_ops, {
             let m0 = $mat3::from_cols_array_2d(&MATRIX);
             let m0x2 = $mat3::from_cols_array_2d(&[
                 [2.0, 4.0, 6.0],
@@ -323,16 +308,14 @@ macro_rules! impl_mat3_tests {
             let mut m1 = $mat3::IDENTITY;
             m1 *= m0;
             assert_approx_eq!(m0, m1);
-        }
+        });
 
-        #[test]
-        fn test_mat3_fmt() {
+        glam_test!(test_mat3_fmt, {
             let a = $mat3::from_cols_array_2d(&MATRIX);
             assert_eq!(format!("{}", a), "[[1, 2, 3], [4, 5, 6], [7, 8, 9]]");
-        }
+        });
 
-        #[test]
-        fn test_mat3_to_from_slice() {
+        glam_test!(test_mat3_to_from_slice, {
             const MATRIX1D: [$t; 9] = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0];
             let m = $mat3::from_cols_slice(&MATRIX1D);
             assert_eq!($mat3::from_cols_array(&MATRIX1D), m);
@@ -342,29 +325,26 @@ macro_rules! impl_mat3_tests {
 
             should_panic!({ $mat3::from_cols_slice(&[0.0; 8]) });
             should_panic!({ $mat3::IDENTITY.write_cols_to_slice(&mut [0.0; 8]) });
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_sum() {
+        glam_test!(test_sum, {
             let id = $mat3::IDENTITY;
             assert_eq!(vec![id, id].iter().sum::<$mat3>(), id + id);
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let two = $mat3::IDENTITY + $mat3::IDENTITY;
             assert_eq!(vec![two, two].iter().product::<$mat3>(), two * two);
-        }
+        });
 
-        #[test]
-        fn test_mat3_is_finite() {
+        glam_test!(test_mat3_is_finite, {
             assert!($mat3::IDENTITY.is_finite());
             assert!(!($mat3::IDENTITY * INFINITY).is_finite());
             assert!(!($mat3::IDENTITY * NEG_INFINITY).is_finite());
             assert!(!($mat3::IDENTITY * NAN).is_finite());
-        }
+        });
     };
 }
 
@@ -374,22 +354,19 @@ mod mat3 {
         const_mat3, mat3, swizzles::*, vec3, vec3a, Mat2, Mat3, Mat4, Quat, Vec2, Vec3, Vec3A,
     };
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(36, mem::size_of::<Mat3>());
         assert_eq!(4, mem::align_of::<Mat3>());
-    }
+    });
 
-    #[test]
-    fn test_mul_vec3a() {
+    glam_test!(test_mul_vec3a, {
         let mat_a = Mat3::from_axis_angle(Vec3::Z, deg(90.0));
         assert_approx_eq!(vec3a(-1.0, 0.0, 0.0), mat_a * Vec3A::Y);
         assert_approx_eq!(vec3a(-1.0, 0.0, 0.0), mat_a.mul_vec3a(Vec3A::Y));
-    }
+    });
 
-    #[test]
-    fn test_as() {
+    glam_test!(test_as, {
         use glam::DMat3;
         assert_eq!(
             DMat3::from_cols_array(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]),
@@ -399,7 +376,7 @@ mod mat3 {
             Mat3::from_cols_array(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]),
             DMat3::from_cols_array(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]).as_mat3()
         );
-    }
+    });
 
     impl_mat3_tests!(f32, const_mat3, mat3, Mat3, Mat2, Mat4, Quat, vec3, Vec3, Vec2);
 }
@@ -410,28 +387,25 @@ mod mat3a {
         const_mat3a, mat3a, swizzles::*, vec3a, Mat2, Mat3A, Mat4, Quat, Vec2, Vec3, Vec3A,
     };
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(48, mem::size_of::<Mat3A>());
         assert_eq!(16, mem::align_of::<Mat3A>());
-    }
+    });
 
-    #[test]
-    fn test_mul_vec3a() {
+    glam_test!(test_mul_vec3a, {
         let mat_a = Mat3A::from_axis_angle(Vec3::Z, deg(90.0));
         assert_approx_eq!(vec3a(-1.0, 0.0, 0.0), mat_a * Vec3A::Y);
         assert_approx_eq!(vec3a(-1.0, 0.0, 0.0), mat_a.mul_vec3a(Vec3A::Y));
-    }
+    });
 
-    #[test]
-    fn test_as() {
+    glam_test!(test_as, {
         use glam::DMat3;
         assert_eq!(
             DMat3::from_cols_array(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]),
             Mat3A::from_cols_array(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]).as_dmat3()
         );
-    }
+    });
 
     impl_mat3_tests!(
         f32,
@@ -451,12 +425,11 @@ mod dmat3 {
     use super::support::deg;
     use glam::{const_dmat3, dmat3, dvec3, swizzles::*, DMat2, DMat3, DMat4, DQuat, DVec2, DVec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(72, mem::size_of::<DMat3>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DMat3>());
-    }
+    });
 
     impl_mat3_tests!(
         f64,
diff --git a/tests/mat4.rs b/tests/mat4.rs
index 8b060cd..1b28057 100644
--- a/tests/mat4.rs
+++ b/tests/mat4.rs
@@ -20,8 +20,7 @@ macro_rules! impl_mat4_tests {
             [13.0, 14.0, 15.0, 16.0],
         ];
 
-        #[test]
-        fn test_const() {
+        glam_test!(test_const, {
             const M0: $mat4 = $const_new!([0.0; 16]);
             const M1: $mat4 = $const_new!([
                 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0,
@@ -52,10 +51,9 @@ macro_rules! impl_mat4_tests {
                 ]),
                 M2
             );
-        }
+        });
 
-        #[test]
-        fn test_mat4_identity() {
+        glam_test!(test_mat4_identity, {
             assert_eq!(
                 $mat4::IDENTITY,
                 $mat4::from_cols_array(&[
@@ -70,10 +68,9 @@ macro_rules! impl_mat4_tests {
             assert_eq!($mat4::from_cols_array_2d(&IDENTITY), identity);
             assert_eq!(identity, identity * identity);
             assert_eq!(identity, $mat4::default());
-        }
+        });
 
-        #[test]
-        fn test_mat4_zero() {
+        glam_test!(test_mat4_zero, {
             assert_eq!(
                 $mat4::ZERO,
                 $mat4::from_cols_array(&[
@@ -83,10 +80,9 @@ macro_rules! impl_mat4_tests {
                     0., 0., 0., 0., //
                 ])
             );
-        }
+        });
 
-        #[test]
-        fn test_mat4_accessors() {
+        glam_test!(test_mat4_accessors, {
             let mut m = $mat4::ZERO;
             m.x_axis = $vec4::new(1.0, 2.0, 3.0, 4.0);
             m.y_axis = $vec4::new(5.0, 6.0, 7.0, 8.0);
@@ -123,10 +119,9 @@ macro_rules! impl_mat4_tests {
                 m.col_mut(4);
             });
             should_panic!({ $mat4::ZERO.row(4) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_from_axes() {
+        glam_test!(test_mat4_from_axes, {
             let a = $mat4::from_cols_array_2d(&[
                 [1.0, 2.0, 3.0, 4.0],
                 [5.0, 6.0, 7.0, 8.0],
@@ -151,10 +146,9 @@ macro_rules! impl_mat4_tests {
             let d = b.to_cols_array();
             let f = $mat4::from_cols_array(&d);
             assert_eq!(b, f);
-        }
+        });
 
-        #[test]
-        fn test_mat4_translation() {
+        glam_test!(test_mat4_translation, {
             let translate = $mat4::from_translation($newvec3(1.0, 2.0, 3.0));
             assert_eq!(
                 $mat4::from_cols(
@@ -165,10 +159,9 @@ macro_rules! impl_mat4_tests {
                 ),
                 translate
             );
-        }
+        });
 
-        #[test]
-        fn test_from_rotation() {
+        glam_test!(test_from_rotation, {
             let rot_x1 = $mat4::from_rotation_x(deg(180.0));
             let rot_x2 = $mat4::from_axis_angle($vec3::X, deg(180.0));
             assert_approx_eq!(rot_x1, rot_x2);
@@ -183,10 +176,9 @@ macro_rules! impl_mat4_tests {
 
             should_glam_assert!({ $mat4::from_axis_angle($vec3::ZERO, 0.0) });
             should_glam_assert!({ $mat4::from_quat($quat::from_xyzw(0.0, 0.0, 0.0, 0.0)) });
-        }
+        });
 
-        #[test]
-        fn test_from_mat3() {
+        glam_test!(test_from_mat3, {
             let m3 =
                 $mat3::from_cols_array_2d(&[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0]]);
             let m4 = $mat4::from_mat3(m3);
@@ -199,10 +191,9 @@ macro_rules! impl_mat4_tests {
                 ]),
                 m4
             );
-        }
+        });
 
-        #[test]
-        fn test_mat4_mul() {
+        glam_test!(test_mat4_mul, {
             let m = $mat4::from_axis_angle($vec3::Z, deg(90.0));
             let result3 = m.transform_vector3($vec3::Y);
             assert_approx_eq!($newvec3(-1.0, 0.0, 0.0), result3);
@@ -237,10 +228,9 @@ macro_rules! impl_mat4_tests {
 
             should_glam_assert!({ $mat4::ZERO.transform_vector3($vec3::X) });
             should_glam_assert!({ $mat4::ZERO.transform_point3($vec3::X) });
-        }
+        });
 
-        #[test]
-        fn test_from_ypr() {
+        glam_test!(test_from_ypr, {
             use glam::EulerRot;
             let zero = deg(0.0);
             let yaw = deg(30.0);
@@ -265,10 +255,9 @@ macro_rules! impl_mat4_tests {
             let yxz0 = y0 * x0 * z0;
             let yxz1 = $mat4::from_euler(EulerRot::YXZ, yaw, pitch, roll);
             assert_approx_eq!(yxz0, yxz1, 1e-6);
-        }
+        });
 
-        #[test]
-        fn test_from_scale() {
+        glam_test!(test_from_scale, {
             let m = $mat4::from_scale($vec3::new(2.0, 4.0, 8.0));
             assert_approx_eq!($vec4::X * 2.0, m.x_axis);
             assert_approx_eq!($vec4::Y * 4.0, m.y_axis);
@@ -280,10 +269,9 @@ macro_rules! impl_mat4_tests {
             );
 
             should_glam_assert!({ $mat4::from_scale($vec3::ZERO) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_transpose() {
+        glam_test!(test_mat4_transpose, {
             let m = $newmat4(
                 $newvec4(1.0, 2.0, 3.0, 4.0),
                 $newvec4(5.0, 6.0, 7.0, 8.0),
@@ -295,10 +283,9 @@ macro_rules! impl_mat4_tests {
             assert_eq!($newvec4(2.0, 6.0, 10.0, 14.0), mt.y_axis);
             assert_eq!($newvec4(3.0, 7.0, 11.0, 15.0), mt.z_axis);
             assert_eq!($newvec4(4.0, 8.0, 12.0, 16.0), mt.w_axis);
-        }
+        });
 
-        #[test]
-        fn test_mat4_det() {
+        glam_test!(test_mat4_det, {
             assert_eq!(0.0, $mat4::ZERO.determinant());
             assert_eq!(1.0, $mat4::IDENTITY.determinant());
             assert_eq!(1.0, $mat4::from_rotation_x(deg(90.0)).determinant());
@@ -308,10 +295,9 @@ macro_rules! impl_mat4_tests {
                 2.0 * 2.0 * 2.0,
                 $mat4::from_scale($newvec3(2.0, 2.0, 2.0)).determinant()
             );
-        }
+        });
 
-        #[test]
-        fn test_mat4_inverse() {
+        glam_test!(test_mat4_inverse, {
             // assert_eq!(None, $mat4::ZERO.inverse());
             let inv = $mat4::IDENTITY.inverse();
             // assert_ne!(None, inv);
@@ -358,10 +344,9 @@ macro_rules! impl_mat4_tests {
             assert_approx_eq!($mat4::IDENTITY, m_inv * m, 1.0e-5);
 
             should_glam_assert!({ $mat4::ZERO.inverse() });
-        }
+        });
 
-        #[test]
-        fn test_mat4_decompose() {
+        glam_test!(test_mat4_decompose, {
             // identity
             let (out_scale, out_rotation, out_translation) =
                 $mat4::IDENTITY.to_scale_rotation_translation();
@@ -449,10 +434,9 @@ macro_rules! impl_mat4_tests {
             // TODO: should check scale
             // should_glam_assert!({ $mat4::from_scale_rotation_translation($vec3::ZERO, $quat::IDENTITY, $vec3::ZERO) });
             should_glam_assert!({ $mat4::ZERO.to_scale_rotation_translation() });
-        }
+        });
 
-        #[test]
-        fn test_mat4_look_at() {
+        glam_test!(test_mat4_look_at, {
             let eye = $vec3::new(0.0, 0.0, -5.0);
             let center = $vec3::new(0.0, 0.0, 0.0);
             let up = $vec3::new(1.0, 0.0, 0.0);
@@ -464,10 +448,9 @@ macro_rules! impl_mat4_tests {
 
             should_glam_assert!({ $mat4::look_at_lh($vec3::ONE, $vec3::ZERO, $vec3::ZERO) });
             should_glam_assert!({ $mat4::look_at_rh($vec3::ONE, $vec3::ZERO, $vec3::ZERO) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_perspective_gl_rh() {
+        glam_test!(test_mat4_perspective_gl_rh, {
             let projection = $mat4::perspective_rh_gl($t::to_radians(90.0), 2.0, 5.0, 15.0);
 
             let original = $vec3::new(5.0, 5.0, -15.0);
@@ -477,10 +460,9 @@ macro_rules! impl_mat4_tests {
             let original = $vec3::new(5.0, 5.0, -5.0);
             let projected = projection * original.extend(1.0);
             assert_approx_eq!($vec4::new(2.5, 5.0, -5.0, 5.0), projected);
-        }
+        });
 
-        #[test]
-        fn test_mat4_perspective_lh() {
+        glam_test!(test_mat4_perspective_lh, {
             let projection = $mat4::perspective_lh($t::to_radians(90.0), 2.0, 5.0, 15.0);
 
             let original = $vec3::new(5.0, 5.0, 15.0);
@@ -493,10 +475,9 @@ macro_rules! impl_mat4_tests {
 
             should_glam_assert!({ $mat4::perspective_lh(0.0, 1.0, 1.0, 0.0) });
             should_glam_assert!({ $mat4::perspective_lh(0.0, 1.0, 0.0, 1.0) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_perspective_infinite_lh() {
+        glam_test!(test_mat4_perspective_infinite_lh, {
             let projection = $mat4::perspective_infinite_lh($t::to_radians(90.0), 2.0, 5.0);
 
             let original = $vec3::new(5.0, 5.0, 15.0);
@@ -508,10 +489,9 @@ macro_rules! impl_mat4_tests {
             assert_approx_eq!($vec4::new(2.5, 5.0, 0.0, 5.0), projected);
 
             should_glam_assert!({ $mat4::perspective_infinite_lh(0.0, 1.0, 0.0) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_perspective_infinite_reverse_lh() {
+        glam_test!(test_mat4_perspective_infinite_reverse_lh, {
             let projection = $mat4::perspective_infinite_reverse_lh($t::to_radians(90.0), 2.0, 5.0);
 
             let original = $vec3::new(5.0, 5.0, 15.0);
@@ -523,10 +503,9 @@ macro_rules! impl_mat4_tests {
             assert_approx_eq!($vec4::new(2.5, 5.0, 5.0, 5.0), projected);
 
             should_glam_assert!({ $mat4::perspective_infinite_reverse_lh(0.0, 1.0, 0.0) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_perspective_rh() {
+        glam_test!(test_mat4_perspective_rh, {
             let projection = $mat4::perspective_rh($t::to_radians(90.0), 2.0, 5.0, 15.0);
 
             let original = $vec3::new(5.0, 5.0, 15.0);
@@ -539,10 +518,9 @@ macro_rules! impl_mat4_tests {
 
             should_glam_assert!({ $mat4::perspective_rh(0.0, 1.0, 1.0, 0.0) });
             should_glam_assert!({ $mat4::perspective_rh(0.0, 1.0, 0.0, 1.0) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_perspective_infinite_rh() {
+        glam_test!(test_mat4_perspective_infinite_rh, {
             let projection = $mat4::perspective_infinite_rh($t::to_radians(90.0), 2.0, 5.0);
 
             let original = $vec3::new(5.0, 5.0, 15.0);
@@ -554,10 +532,9 @@ macro_rules! impl_mat4_tests {
             assert_approx_eq!($vec4::new(2.5, 5.0, -10.0, -5.0), projected);
 
             should_glam_assert!({ $mat4::perspective_infinite_rh(0.0, 1.0, 0.0) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_perspective_infinite_reverse_rh() {
+        glam_test!(test_mat4_perspective_infinite_reverse_rh, {
             let projection = $mat4::perspective_infinite_reverse_rh($t::to_radians(90.0), 2.0, 5.0);
 
             let original = $vec3::new(5.0, 5.0, 15.0);
@@ -569,18 +546,16 @@ macro_rules! impl_mat4_tests {
             assert_approx_eq!($vec4::new(2.5, 5.0, 5.0, -5.0), projected);
 
             should_glam_assert!({ $mat4::perspective_infinite_reverse_rh(0.0, 1.0, 0.0) });
-        }
+        });
 
-        #[test]
-        fn test_mat4_orthographic_gl_rh() {
+        glam_test!(test_mat4_orthographic_gl_rh, {
             let projection = $mat4::orthographic_rh_gl(-10.0, 10.0, -5.0, 5.0, 0.0, -10.0);
             let original = $vec4::new(5.0, 5.0, -5.0, 1.0);
             let projected = projection.mul_vec4(original);
             assert_approx_eq!(projected, $vec4::new(0.5, 1.0, -2.0, 1.0));
-        }
+        });
 
-        #[test]
-        fn test_mat4_orthographic_rh() {
+        glam_test!(test_mat4_orthographic_rh, {
             let projection = $mat4::orthographic_rh(-10.0, 10.0, -5.0, 5.0, -10.0, 10.0);
             let original = $vec4::new(5.0, 5.0, -5.0, 1.0);
             let projected = projection.mul_vec4(original);
@@ -589,10 +564,9 @@ macro_rules! impl_mat4_tests {
             let original = $vec4::new(5.0, 5.0, 5.0, 1.0);
             let projected = projection.mul_vec4(original);
             assert_approx_eq!(projected, $vec4::new(0.5, 1.0, 0.25, 1.0));
-        }
+        });
 
-        #[test]
-        fn test_mat4_orthographic_lh() {
+        glam_test!(test_mat4_orthographic_lh, {
             let projection = $mat4::orthographic_lh(-10.0, 10.0, -5.0, 5.0, -10.0, 10.0);
             let original = $vec4::new(5.0, 5.0, -5.0, 1.0);
             let projected = projection.mul_vec4(original);
@@ -601,10 +575,9 @@ macro_rules! impl_mat4_tests {
             let original = $vec4::new(5.0, 5.0, 5.0, 1.0);
             let projected = projection.mul_vec4(original);
             assert_approx_eq!(projected, $vec4::new(0.5, 1.0, 0.75, 1.0));
-        }
+        });
 
-        #[test]
-        fn test_mat4_ops() {
+        glam_test!(test_mat4_ops, {
             let m0 = $mat4::from_cols_array_2d(&MATRIX);
             let m0x2 = $mat4::from_cols_array_2d(&[
                 [2.0, 4.0, 6.0, 8.0],
@@ -634,19 +607,17 @@ macro_rules! impl_mat4_tests {
             let mut m1 = $mat4::IDENTITY;
             m1 *= m0;
             assert_approx_eq!(m0, m1);
-        }
+        });
 
-        #[test]
-        fn test_mat4_fmt() {
+        glam_test!(test_mat4_fmt, {
             let a = $mat4::from_cols_array_2d(&MATRIX);
             assert_eq!(
                 format!("{}", a),
                 "[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]"
             );
-        }
+        });
 
-        #[test]
-        fn test_mat4_to_from_slice() {
+        glam_test!(test_mat4_to_from_slice, {
             const MATRIX1D: [$t; 16] = [
                 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0,
                 16.0,
@@ -659,29 +630,26 @@ macro_rules! impl_mat4_tests {
 
             should_panic!({ $mat4::from_cols_slice(&[0.0; 15]) });
             should_panic!({ $mat4::IDENTITY.write_cols_to_slice(&mut [0.0; 15]) });
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_sum() {
+        glam_test!(test_sum, {
             let id = $mat4::IDENTITY;
             assert_eq!(vec![id, id].iter().sum::<$mat4>(), id + id);
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let two = $mat4::IDENTITY + $mat4::IDENTITY;
             assert_eq!(vec![two, two].iter().product::<$mat4>(), two * two);
-        }
+        });
 
-        #[test]
-        fn test_mat4_is_finite() {
+        glam_test!(test_mat4_is_finite, {
             assert!($mat4::IDENTITY.is_finite());
             assert!(!($mat4::IDENTITY * INFINITY).is_finite());
             assert!(!($mat4::IDENTITY * NEG_INFINITY).is_finite());
             assert!(!($mat4::IDENTITY * NAN).is_finite());
-        }
+        });
     };
 }
 
@@ -689,8 +657,7 @@ mod mat4 {
     use super::support::deg;
     use glam::{const_mat4, mat4, swizzles::*, vec3, vec4, Mat3, Mat4, Quat, Vec3, Vec4};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(64, mem::size_of::<Mat4>());
         if cfg!(feature = "scalar-math") {
@@ -698,10 +665,9 @@ mod mat4 {
         } else {
             assert_eq!(16, mem::align_of::<Mat4>());
         }
-    }
+    });
 
-    #[test]
-    fn test_as() {
+    glam_test!(test_as, {
         use glam::DMat4;
         assert_eq!(
             DMat4::from_cols_array_2d(&[
@@ -733,7 +699,7 @@ mod mat4 {
             ])
             .as_mat4()
         );
-    }
+    });
 
     impl_mat4_tests!(f32, const_mat4, mat4, vec4, vec3, Mat4, Mat3, Quat, Vec4, Vec3);
 }
@@ -742,12 +708,11 @@ mod dmat4 {
     use super::support::deg;
     use glam::{const_dmat4, dmat4, dvec3, dvec4, swizzles::*, DMat3, DMat4, DQuat, DVec3, DVec4};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(128, mem::size_of::<DMat4>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DMat4>());
-    }
+    });
 
     impl_mat4_tests!(
         f64,
diff --git a/tests/quat.rs b/tests/quat.rs
index 3aee811..23220fc 100644
--- a/tests/quat.rs
+++ b/tests/quat.rs
@@ -7,14 +7,12 @@ macro_rules! impl_quat_tests {
         use core::$t::NAN;
         use core::$t::NEG_INFINITY;
 
-        #[test]
-        fn test_const() {
+        glam_test!(test_const, {
             const Q: $quat = $const_new!([1.0, 2.0, 3.0, 4.0]);
             assert_eq!($quat::from_xyzw(1.0, 2.0, 3.0, 4.0), Q);
-        }
+        });
 
-        #[test]
-        fn test_new() {
+        glam_test!(test_new, {
             let ytheta = deg(45.0);
             let q0 = $quat::from_rotation_y(ytheta);
 
@@ -29,10 +27,9 @@ macro_rules! impl_quat_tests {
             assert_eq!([v1.x, v1.y, v1.z, v1.w], a1);
 
             assert_eq!(q1, $quat::from_array(a1));
-        }
+        });
 
-        #[test]
-        fn test_funcs() {
+        glam_test!(test_funcs, {
             let q0 = $quat::from_euler(EulerRot::YXZ, deg(45.0), deg(180.0), deg(90.0));
             assert!(q0.is_normalized());
             assert_approx_eq!(q0.length_squared(), 1.0);
@@ -52,10 +49,9 @@ macro_rules! impl_quat_tests {
             assert_approx_eq!(q0.dot(q1), 2.0, 1.0e-6);
 
             should_glam_assert!({ ($quat::IDENTITY * 0.0).normalize() });
-        }
+        });
 
-        #[test]
-        fn test_rotation() {
+        glam_test!(test_rotation, {
             let zero = deg(0.0);
             let yaw = deg(30.0);
             let pitch = deg(60.0);
@@ -129,10 +125,9 @@ macro_rules! impl_quat_tests {
 
             should_glam_assert!({ ($quat::IDENTITY * 2.0).inverse() });
             should_glam_assert!({ $quat::from_axis_angle($vec3::ZERO, 0.0) });
-        }
+        });
 
-        #[test]
-        fn test_from_scaled_axis() {
+        glam_test!(test_from_scaled_axis, {
             assert_eq!($quat::from_scaled_axis($vec3::ZERO), $quat::IDENTITY);
             assert_eq!(
                 $quat::from_scaled_axis($vec3::Y * 1e-10),
@@ -156,10 +151,9 @@ macro_rules! impl_quat_tests {
                     assert!(($quat::from_scaled_axis(v).to_scaled_axis() - v).length() < 1e-6,);
                 }
             }
-        }
+        });
 
-        #[test]
-        fn test_mul_vec3() {
+        glam_test!(test_mul_vec3, {
             let qrz = $quat::from_rotation_z(deg(90.0));
             assert_approx_eq!($vec3::Y, qrz * $vec3::X);
             assert_approx_eq!($vec3::Y, qrz.mul_vec3($vec3::X));
@@ -223,10 +217,9 @@ macro_rules! impl_quat_tests {
             should_glam_assert!({ ($quat::IDENTITY * 0.5) * $vec3::X });
             should_glam_assert!({ ($quat::IDENTITY * 0.5).mul_quat($quat::IDENTITY) });
             should_glam_assert!({ ($quat::IDENTITY * 0.5) * $quat::IDENTITY });
-        }
+        });
 
-        #[test]
-        fn test_angle_between() {
+        glam_test!(test_angle_between, {
             const TAU: $t = 2.0 * core::$t::consts::PI;
             let eps = 10.0 * core::$t::EPSILON as f32;
             let q1 = $quat::from_euler(EulerRot::YXZ, 0.0, 0.0, 0.0);
@@ -252,10 +245,9 @@ macro_rules! impl_quat_tests {
             assert_approx_eq!(q1.angle_between(q6), TAU - TAU * 0.94, eps);
             assert_approx_eq!((q5 * q1).angle_between(q5 * q6), TAU - TAU * 0.94, eps);
             assert_approx_eq!((q1 * q5).angle_between(q6 * q5), TAU - TAU * 0.94, eps);
-        }
+        });
 
-        #[test]
-        fn test_lerp() {
+        glam_test!(test_lerp, {
             let q0 = $quat::from_rotation_y(deg(0.0));
             let q1 = $quat::from_rotation_y(deg(90.0));
             assert_approx_eq!(q0, q0.lerp(q1, 0.0));
@@ -264,10 +256,9 @@ macro_rules! impl_quat_tests {
 
             should_glam_assert!({ $quat::lerp($quat::IDENTITY * 2.0, $quat::IDENTITY, 1.0) });
             should_glam_assert!({ $quat::lerp($quat::IDENTITY, $quat::IDENTITY * 0.5, 1.0) });
-        }
+        });
 
-        #[test]
-        fn test_slerp() {
+        glam_test!(test_slerp, {
             let q0 = $quat::from_rotation_y(deg(0.0));
             let q1 = $quat::from_rotation_y(deg(90.0));
             assert_approx_eq!(q0, q0.slerp(q1, 0.0), 1.0e-3);
@@ -276,10 +267,9 @@ macro_rules! impl_quat_tests {
 
             should_glam_assert!({ $quat::lerp($quat::IDENTITY * 2.0, $quat::IDENTITY, 1.0) });
             should_glam_assert!({ $quat::lerp($quat::IDENTITY, $quat::IDENTITY * 0.5, 1.0) });
-        }
+        });
 
-        #[test]
-        fn test_slerp_constant_speed() {
+        glam_test!(test_slerp_constant_speed, {
             let step = 0.01;
             let mut s = 0.0;
             while s <= 1.0 {
@@ -292,10 +282,9 @@ macro_rules! impl_quat_tests {
                 );
                 s += step;
             }
-        }
+        });
 
-        #[test]
-        fn test_fmt() {
+        glam_test!(test_fmt, {
             let a = $quat::IDENTITY;
             assert_eq!(
                 format!("{:?}", a),
@@ -306,10 +295,9 @@ macro_rules! impl_quat_tests {
             //     "$quat(\n    1.0,\n    2.0,\n    3.0,\n    4.0\n)"
             // );
             assert_eq!(format!("{}", a), "[0, 0, 0, 1]");
-        }
+        });
 
-        #[test]
-        fn test_identity() {
+        glam_test!(test_identity, {
             let identity = $quat::IDENTITY;
             assert!(identity.is_near_identity());
             assert!(identity.is_normalized());
@@ -319,10 +307,9 @@ macro_rules! impl_quat_tests {
             assert_eq!(q, q * identity);
             assert_eq!(q, identity * q);
             assert_eq!(identity, $quat::default());
-        }
+        });
 
-        #[test]
-        fn test_slice() {
+        glam_test!(test_slice, {
             let a: [$t; 4] =
                 $quat::from_euler(EulerRot::YXZ, deg(30.0), deg(60.0), deg(90.0)).into();
             let b = $quat::from_slice(&a);
@@ -334,10 +321,9 @@ macro_rules! impl_quat_tests {
 
             should_panic!({ $quat::IDENTITY.write_to_slice(&mut [0 as $t; 3]) });
             should_panic!({ $quat::from_slice(&[0 as $t; 3]) });
-        }
+        });
 
-        #[test]
-        fn test_elements() {
+        glam_test!(test_elements, {
             let x = 1.0;
             let y = 2.0;
             let z = 3.0;
@@ -350,61 +336,53 @@ macro_rules! impl_quat_tests {
             assert!(a.w == w);
 
             assert_eq!($vec3::new(1.0, 2.0, 3.0), a.xyz());
-        }
+        });
 
-        #[test]
-        fn test_addition() {
+        glam_test!(test_addition, {
             let a = $quat::from_xyzw(1.0, 2.0, 3.0, 4.0);
             let b = $quat::from_xyzw(5.0, 6.0, 7.0, -9.0);
             assert_eq!(a + b, $quat::from_xyzw(6.0, 8.0, 10.0, -5.0));
-        }
+        });
 
-        #[test]
-        fn test_subtraction() {
+        glam_test!(test_subtraction, {
             let a = $quat::from_xyzw(6.0, 8.0, 10.0, -5.0);
             let b = $quat::from_xyzw(5.0, 6.0, 7.0, -9.0);
             assert_eq!(a - b, $quat::from_xyzw(1.0, 2.0, 3.0, 4.0));
-        }
+        });
 
-        #[test]
-        fn test_scalar_multiplication() {
+        glam_test!(test_scalar_multiplication, {
             let a = $quat::from_xyzw(1.0, 2.0, 3.0, 4.0);
             assert_eq!(a * 2.0, $quat::from_xyzw(2.0, 4.0, 6.0, 8.0));
-        }
+        });
 
-        #[test]
-        fn test_scalar_division() {
+        glam_test!(test_scalar_division, {
             let a = $quat::from_xyzw(2.0, 4.0, 6.0, 8.0);
             assert_eq!(a / 2.0, $quat::from_xyzw(1.0, 2.0, 3.0, 4.0));
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_sum() {
+        glam_test!(test_sum, {
             let two = $new(2.0, 2.0, 2.0, 2.0);
             assert_eq!(vec![two, two].iter().sum::<$quat>(), two + two);
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let two = $new(2.0, 2.0, 2.0, 2.0).normalize();
             assert_eq!(vec![two, two].iter().product::<$quat>(), two * two);
-        }
+        });
 
-        #[test]
-        fn test_is_finite() {
+        glam_test!(test_is_finite, {
             assert!($quat::from_xyzw(0.0, 0.0, 0.0, 0.0).is_finite());
             assert!($quat::from_xyzw(-1e-10, 1.0, 1e10, 42.0).is_finite());
             assert!(!$quat::from_xyzw(INFINITY, 0.0, 0.0, 0.0).is_finite());
             assert!(!$quat::from_xyzw(0.0, NAN, 0.0, 0.0).is_finite());
             assert!(!$quat::from_xyzw(0.0, 0.0, NEG_INFINITY, 0.0).is_finite());
             assert!(!$quat::from_xyzw(0.0, 0.0, 0.0, NAN).is_finite());
-        }
+        });
 
-        #[test]
         #[cfg(feature = "std")]
-        fn test_rotation_arc() {
+        glam_test!(test_rotation_arc, {
             let eps = 2.0 * core::$t::EPSILON.sqrt();
 
             for &from in &vec3_float_test_vectors!($vec3) {
@@ -453,7 +431,7 @@ macro_rules! impl_quat_tests {
             should_glam_assert!({ $quat::from_rotation_arc($vec3::X, $vec3::ZERO) });
             should_glam_assert!({ $quat::from_rotation_arc_colinear($vec3::ZERO, $vec3::X) });
             should_glam_assert!({ $quat::from_rotation_arc_colinear($vec3::X, $vec3::ZERO) });
-        }
+        });
     };
 }
 
@@ -462,8 +440,7 @@ mod quat {
     use core::ops::Neg;
     use glam::{const_quat, quat, EulerRot, Mat3, Mat4, Quat, Vec3, Vec3A, Vec4};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(16, mem::size_of::<Quat>());
         if cfg!(feature = "scalar-math") {
@@ -471,10 +448,9 @@ mod quat {
         } else {
             assert_eq!(16, mem::align_of::<Quat>());
         }
-    }
+    });
 
-    #[test]
-    fn test_mul_vec3a() {
+    glam_test!(test_mul_vec3a, {
         let qrz = Quat::from_rotation_z(deg(90.0));
         assert_approx_eq!(Vec3A::Y, qrz * Vec3A::X);
         assert_approx_eq!(Vec3A::Y, qrz.mul_vec3a(Vec3A::X));
@@ -533,10 +509,9 @@ mod quat {
         assert_approx_eq!(Vec3A::Z, mrzx.mul_vec3a(Vec3A::X));
         assert_approx_eq!(-Vec3A::X, mrzx * Vec3A::Y);
         assert_approx_eq!(-Vec3A::X, mrzx.mul_vec3a(Vec3A::Y));
-    }
+    });
 
-    #[test]
-    fn test_as() {
+    glam_test!(test_as, {
         use glam::DQuat;
         assert_approx_eq!(
             DQuat::from_euler(EulerRot::YXZ, 1.0, 2.0, 3.0),
@@ -546,7 +521,7 @@ mod quat {
             Quat::from_euler(EulerRot::YXZ, 1.0, 2.0, 3.0),
             DQuat::from_euler(EulerRot::YXZ, 1.0, 2.0, 3.0).as_f32()
         );
-    }
+    });
 
     impl_quat_tests!(f32, const_quat, quat, Mat3, Mat4, Quat, Vec3, Vec4);
 }
@@ -556,12 +531,11 @@ mod dquat {
     use core::ops::Neg;
     use glam::{const_dquat, dquat, DMat3, DMat4, DQuat, DVec3, DVec4, EulerRot};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(32, mem::size_of::<DQuat>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DQuat>());
-    }
+    });
 
     impl_quat_tests!(f64, const_dquat, dquat, DMat3, DMat4, DQuat, DVec3, DVec4);
 }
diff --git a/tests/support/macros.rs b/tests/support/macros.rs
index ea37ae4..21a0ddc 100644
--- a/tests/support/macros.rs
+++ b/tests/support/macros.rs
@@ -1,7 +1,18 @@
+#[macro_export]
+macro_rules! glam_test {
+    ($name:ident, $block:block) => {
+        #[cfg_attr(not(target_arch = "wasm32"), test)]
+        #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
+        fn $name() {
+            $block
+        }
+    };
+}
+
 #[macro_export]
 macro_rules! should_panic {
     ($block:block) => {{
-        #[cfg(feature = "std")]
+        #[cfg(all(feature = "std", not(target_arch = "wasm32")))]
         assert!(std::panic::catch_unwind(|| $block).is_err());
     }};
 }
@@ -62,8 +73,7 @@ macro_rules! impl_vec_float_normalize_tests {
             v
         }
 
-        #[test]
-        fn test_normalize() {
+        glam_test!(test_normalize, {
             assert_eq!(from_x_y(-42.0, 0.0).normalize(), from_x_y(-1.0, 0.0));
             assert_eq!(from_x_y(MAX.sqrt(), 0.0).normalize(), from_x_y(1.0, 0.0));
             // assert_eq!(from_x_y(MAX, 0.0).normalize(), from_x_y(1.0, 0.0)); // normalize fails for huge vectors and returns zero
@@ -75,11 +85,10 @@ macro_rules! impl_vec_float_normalize_tests {
             // We expect not to be able to normalize non-finite vectors:
             should_glam_assert!({ from_x_y(INFINITY, 0.0).normalize() });
             should_glam_assert!({ from_x_y(NAN, 0.0).normalize() });
-        }
+        });
 
         #[cfg(not(any(feature = "debug-glam-assert", feature = "glam-assert")))]
-        #[test]
-        fn test_normalize_no_glam_assert() {
+        glam_test!(test_normalize_no_glam_assert, {
             // We expect not to be able to normalize small numbers:
             assert!(!from_x_y(0.0, 0.0).normalize().is_finite());
             assert!(!from_x_y(MIN_POSITIVE, 0.0).normalize().is_finite());
@@ -87,10 +96,9 @@ macro_rules! impl_vec_float_normalize_tests {
             // We expect not to be able to normalize non-finite vectors:
             assert!(!from_x_y(INFINITY, 0.0).normalize().is_finite());
             assert!(!from_x_y(NAN, 0.0).normalize().is_finite());
-        }
+        });
 
-        #[test]
-        fn test_try_normalize() {
+        glam_test!(test_try_normalize, {
             assert_eq!(
                 from_x_y(-42.0, 0.0).try_normalize(),
                 Some(from_x_y(-1.0, 0.0))
@@ -111,10 +119,9 @@ macro_rules! impl_vec_float_normalize_tests {
             // We expect `try_normalize` to return None when inputs are very large:
             assert_eq!(from_x_y(MAX, 0.0).try_normalize(), None);
             assert_eq!(from_x_y(MAX, MAX).try_normalize(), None);
-        }
+        });
 
-        #[test]
-        fn test_normalize_or_zero() {
+        glam_test!(test_normalize_or_zero, {
             assert_eq!(
                 from_x_y(-42.0, 0.0).normalize_or_zero(),
                 from_x_y(-1.0, 0.0)
@@ -135,7 +142,7 @@ macro_rules! impl_vec_float_normalize_tests {
             // We expect `normalize_or_zero` to return zero when inputs are very large:
             assert_eq!(from_x_y(MAX, 0.0).normalize_or_zero(), $vec::ZERO);
             assert_eq!(from_x_y(MAX, MAX).normalize_or_zero(), $vec::ZERO);
-        }
+        });
     };
 }
 
diff --git a/tests/support/mod.rs b/tests/support/mod.rs
index a22f371..68f2a3e 100644
--- a/tests/support/mod.rs
+++ b/tests/support/mod.rs
@@ -1,6 +1,9 @@
 #[macro_use]
 mod macros;
 
+use wasm_bindgen_test::wasm_bindgen_test_configure;
+wasm_bindgen_test_configure!(run_in_browser);
+
 use glam::{
     DMat2, DMat3, DMat4, DQuat, DVec2, DVec3, DVec4, Mat2, Mat3, Mat3A, Mat4, Quat, Vec2, Vec3,
     Vec3A, Vec4,
diff --git a/tests/swizzle.rs b/tests/swizzle.rs
index 63dad3c..034b1fc 100644
--- a/tests/swizzle.rs
+++ b/tests/swizzle.rs
@@ -4,6 +4,7 @@ use glam::{
     vec4,
 };
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_vec4_swizzles() {
     let v = vec4(1_f32, 2_f32, 3_f32, 4_f32);
@@ -345,6 +346,7 @@ fn test_vec4_swizzles() {
     assert_eq!(v.ww(), vec2(4_f32, 4_f32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_vec3a_swizzles() {
     let v = vec3a(1_f32, 2_f32, 3_f32);
@@ -467,6 +469,7 @@ fn test_vec3a_swizzles() {
     assert_eq!(v.zz(), vec2(3_f32, 3_f32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_vec3_swizzles() {
     let v = vec3(1_f32, 2_f32, 3_f32);
@@ -589,6 +592,7 @@ fn test_vec3_swizzles() {
     assert_eq!(v.zz(), vec2(3_f32, 3_f32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_vec2_swizzles() {
     let v = vec2(1_f32, 2_f32);
@@ -622,6 +626,7 @@ fn test_vec2_swizzles() {
     assert_eq!(v.yy(), vec2(2_f32, 2_f32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_dvec4_swizzles() {
     let v = dvec4(1_f64, 2_f64, 3_f64, 4_f64);
@@ -963,6 +968,7 @@ fn test_dvec4_swizzles() {
     assert_eq!(v.ww(), dvec2(4_f64, 4_f64));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_dvec3_swizzles() {
     let v = dvec3(1_f64, 2_f64, 3_f64);
@@ -1085,6 +1091,7 @@ fn test_dvec3_swizzles() {
     assert_eq!(v.zz(), dvec2(3_f64, 3_f64));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_dvec2_swizzles() {
     let v = dvec2(1_f64, 2_f64);
@@ -1118,6 +1125,7 @@ fn test_dvec2_swizzles() {
     assert_eq!(v.yy(), dvec2(2_f64, 2_f64));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_ivec4_swizzles() {
     let v = ivec4(1_i32, 2_i32, 3_i32, 4_i32);
@@ -1459,6 +1467,7 @@ fn test_ivec4_swizzles() {
     assert_eq!(v.ww(), ivec2(4_i32, 4_i32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_ivec3_swizzles() {
     let v = ivec3(1_i32, 2_i32, 3_i32);
@@ -1581,6 +1590,7 @@ fn test_ivec3_swizzles() {
     assert_eq!(v.zz(), ivec2(3_i32, 3_i32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_ivec2_swizzles() {
     let v = ivec2(1_i32, 2_i32);
@@ -1614,6 +1624,7 @@ fn test_ivec2_swizzles() {
     assert_eq!(v.yy(), ivec2(2_i32, 2_i32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_uvec4_swizzles() {
     let v = uvec4(1_u32, 2_u32, 3_u32, 4_u32);
@@ -1955,6 +1966,7 @@ fn test_uvec4_swizzles() {
     assert_eq!(v.ww(), uvec2(4_u32, 4_u32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_uvec3_swizzles() {
     let v = uvec3(1_u32, 2_u32, 3_u32);
@@ -2077,6 +2089,7 @@ fn test_uvec3_swizzles() {
     assert_eq!(v.zz(), uvec2(3_u32, 3_u32));
 }
 
+#[cfg(not(target_arch = "wasm32"))]
 #[test]
 fn test_uvec2_swizzles() {
     let v = uvec2(1_u32, 2_u32);
diff --git a/tests/vec2.rs b/tests/vec2.rs
index 8a0ab0b..425c3e3 100644
--- a/tests/vec2.rs
+++ b/tests/vec2.rs
@@ -3,14 +3,12 @@ mod support;
 
 macro_rules! impl_vec2_tests {
     ($t:ty, $const_new:ident, $new:ident, $vec2:ident, $vec3:ident, $mask:ident) => {
-        #[test]
-        fn test_const() {
+        glam_test!(test_const, {
             const V: $vec2 = $const_new!([1 as $t, 2 as $t]);
             assert_eq!($vec2::new(1 as $t, 2 as $t), V);
-        }
+        });
 
-        #[test]
-        fn test_new() {
+        glam_test!(test_new, {
             let v = $new(1 as $t, 2 as $t);
 
             assert_eq!(v.x, 1 as $t);
@@ -30,10 +28,9 @@ macro_rules! impl_vec2_tests {
 
             assert_eq!($vec2::new(1 as $t, 0 as $t), $vec2::X);
             assert_eq!($vec2::new(0 as $t, 1 as $t), $vec2::Y);
-        }
+        });
 
-        #[test]
-        fn test_fmt() {
+        glam_test!(test_fmt, {
             let a = $vec2::new(1 as $t, 2 as $t);
             assert_eq!(
                 format!("{:?}", a),
@@ -41,23 +38,20 @@ macro_rules! impl_vec2_tests {
             );
             // assert_eq!(format!("{:#?}", a), "$vec2(\n    1.0,\n    2.0\n)");
             assert_eq!(format!("{}", a), "[1, 2]");
-        }
+        });
 
-        #[test]
-        fn test_zero() {
+        glam_test!(test_zero, {
             let v = $vec2::ZERO;
             assert_eq!($new(0 as $t, 0 as $t), v);
             assert_eq!(v, $vec2::default());
-        }
+        });
 
-        #[test]
-        fn test_splat() {
+        glam_test!(test_splat, {
             let v = $vec2::splat(1 as $t);
             assert_eq!($vec2::ONE, v);
-        }
+        });
 
-        #[test]
-        fn test_accessors() {
+        glam_test!(test_accessors, {
             let mut a = $vec2::ZERO;
             a.x = 1 as $t;
             a.y = 2 as $t;
@@ -71,18 +65,16 @@ macro_rules! impl_vec2_tests {
             assert_eq!(1 as $t, a[0]);
             assert_eq!(2 as $t, a[1]);
             assert_eq!($vec2::new(1 as $t, 2 as $t), a);
-        }
+        });
 
-        #[test]
-        fn test_dot_unsigned() {
+        glam_test!(test_dot_unsigned, {
             let x = $new(1 as $t, 0 as $t);
             let y = $new(0 as $t, 1 as $t);
             assert_eq!(1 as $t, x.dot(x));
             assert_eq!(0 as $t, x.dot(y));
-        }
+        });
 
-        #[test]
-        fn test_ops() {
+        glam_test!(test_ops, {
             let a = $new(2 as $t, 4 as $t);
             assert_eq!($new(4 as $t, 8 as $t), (a + a));
             assert_eq!($new(0 as $t, 0 as $t), (a - a));
@@ -98,10 +90,9 @@ macro_rules! impl_vec2_tests {
             assert_eq!($new(2 as $t, 1 as $t), a % 3 as $t);
             assert_eq!($new(1 as $t, 1 as $t), 17 as $t % a);
             assert_eq!($new(2 as $t, 4 as $t), a % 8 as $t);
-        }
+        });
 
-        #[test]
-        fn test_assign_ops() {
+        glam_test!(test_assign_ops, {
             let a = $new(1 as $t, 2 as $t);
             let mut b = a;
             b += a;
@@ -120,20 +111,18 @@ macro_rules! impl_vec2_tests {
             assert_eq!($new(1 as $t, 2 as $t), b);
             b %= b;
             assert_eq!($new(0 as $t, 0 as $t), b);
-        }
+        });
 
-        #[test]
-        fn test_min_max() {
+        glam_test!(test_min_max, {
             let a = $new(0 as $t, 2 as $t);
             let b = $new(1 as $t, 1 as $t);
             assert_eq!($new(0 as $t, 1 as $t), a.min(b));
             assert_eq!($new(0 as $t, 1 as $t), b.min(a));
             assert_eq!($new(1 as $t, 2 as $t), a.max(b));
             assert_eq!($new(1 as $t, 2 as $t), b.max(a));
-        }
+        });
 
-        #[test]
-        fn test_clamp() {
+        glam_test!(test_clamp, {
             fn vec(x: i32, y: i32) -> $vec2 {
                 $vec2::new(x as $t, y as $t)
             }
@@ -147,17 +136,15 @@ macro_rules! impl_vec2_tests {
             assert_eq!(vec(9, 9).clamp(min, max), vec(6, 8));
 
             should_glam_assert!({ $vec2::clamp($vec2::ZERO, $vec2::ONE, $vec2::ZERO) });
-        }
+        });
 
-        #[test]
-        fn test_hmin_hmax() {
+        glam_test!(test_hmin_hmax, {
             let a = $new(1 as $t, 2 as $t);
             assert_eq!(1 as $t, a.min_element());
             assert_eq!(2 as $t, a.max_element());
-        }
+        });
 
-        #[test]
-        fn test_eq() {
+        glam_test!(test_eq, {
             let a = $new(1 as $t, 1 as $t);
             let b = $new(1 as $t, 2 as $t);
             assert!(a.cmpeq(a).all());
@@ -165,10 +152,9 @@ macro_rules! impl_vec2_tests {
             assert!(a.cmpne(b).any());
             assert!(b.cmpne(a).any());
             assert!(b.cmpeq(a).any());
-        }
+        });
 
-        #[test]
-        fn test_cmp() {
+        glam_test!(test_cmp, {
             assert!(!$mask::default().any());
             assert!(!$mask::default().all());
             assert_eq!($mask::default().bitmask(), 0x0);
@@ -191,17 +177,15 @@ macro_rules! impl_vec2_tests {
             assert!(c.cmple(c).all());
             assert!(c.cmpge(c).all());
             assert!(a == a);
-        }
+        });
 
-        #[test]
-        fn test_extend_truncate() {
+        glam_test!(test_extend_truncate, {
             let a = $new(1 as $t, 2 as $t);
             let b = a.extend(3 as $t);
             assert_eq!($vec3::new(1 as $t, 2 as $t, 3 as $t), b);
-        }
+        });
 
-        #[test]
-        fn test_vec2mask() {
+        glam_test!(test_vec2mask, {
             // make sure the unused 'z' value doesn't break $vec2 behaviour
             let a = $vec3::ZERO;
             let mut b = a.truncate();
@@ -209,7 +193,7 @@ macro_rules! impl_vec2_tests {
             b.y = 1 as $t;
             assert!(!b.cmpeq($vec2::ZERO).any());
             assert!(b.cmpeq($vec2::splat(1 as $t)).all());
-        }
+        });
 
         // #[test]
         // fn test_mask_as_ref() {
@@ -219,40 +203,35 @@ macro_rules! impl_vec2_tests {
         //     assert_eq!($mask::new(true, true).as_ref(), &[!0, !0]);
         // }
 
-        #[test]
-        fn test_mask_from() {
+        glam_test!(test_mask_from, {
             assert_eq!(Into::<[u32; 2]>::into($mask::new(false, false)), [0, 0]);
             assert_eq!(Into::<[u32; 2]>::into($mask::new(true, false)), [!0, 0]);
             assert_eq!(Into::<[u32; 2]>::into($mask::new(false, true)), [0, !0]);
             assert_eq!(Into::<[u32; 2]>::into($mask::new(true, true)), [!0, !0]);
-        }
+        });
 
-        #[test]
-        fn test_mask_bitmask() {
+        glam_test!(test_mask_bitmask, {
             assert_eq!($mask::new(false, false).bitmask(), 0b00);
             assert_eq!($mask::new(true, false).bitmask(), 0b01);
             assert_eq!($mask::new(false, true).bitmask(), 0b10);
             assert_eq!($mask::new(true, true).bitmask(), 0b11);
-        }
+        });
 
-        #[test]
-        fn test_mask_any() {
+        glam_test!(test_mask_any, {
             assert_eq!($mask::new(false, false).any(), false);
             assert_eq!($mask::new(true, false).any(), true);
             assert_eq!($mask::new(false, true).any(), true);
             assert_eq!($mask::new(true, true).any(), true);
-        }
+        });
 
-        #[test]
-        fn test_mask_all() {
+        glam_test!(test_mask_all, {
             assert_eq!($mask::new(false, false).all(), false);
             assert_eq!($mask::new(true, false).all(), false);
             assert_eq!($mask::new(false, true).all(), false);
             assert_eq!($mask::new(true, true).all(), true);
-        }
+        });
 
-        #[test]
-        fn test_mask_select() {
+        glam_test!(test_mask_select, {
             let a = $vec2::new(1 as $t, 2 as $t);
             let b = $vec2::new(3 as $t, 4 as $t);
             assert_eq!(
@@ -271,10 +250,9 @@ macro_rules! impl_vec2_tests {
                 $vec2::select($mask::new(false, false), a, b),
                 $vec2::new(3 as $t, 4 as $t),
             );
-        }
+        });
 
-        #[test]
-        fn test_mask_and() {
+        glam_test!(test_mask_and, {
             assert_eq!(
                 ($mask::new(false, false) & $mask::new(false, false)).bitmask(),
                 0b00,
@@ -295,10 +273,9 @@ macro_rules! impl_vec2_tests {
             let mut mask = $mask::new(true, true);
             mask &= $mask::new(true, false);
             assert_eq!(mask.bitmask(), 0b01);
-        }
+        });
 
-        #[test]
-        fn test_mask_or() {
+        glam_test!(test_mask_or, {
             assert_eq!(
                 ($mask::new(false, false) | $mask::new(false, false)).bitmask(),
                 0b00,
@@ -319,18 +296,16 @@ macro_rules! impl_vec2_tests {
             let mut mask = $mask::new(true, true);
             mask |= $mask::new(true, false);
             assert_eq!(mask.bitmask(), 0b11);
-        }
+        });
 
-        #[test]
-        fn test_mask_not() {
+        glam_test!(test_mask_not, {
             assert_eq!((!$mask::new(false, false)).bitmask(), 0b11);
             assert_eq!((!$mask::new(true, false)).bitmask(), 0b10);
             assert_eq!((!$mask::new(false, true)).bitmask(), 0b01);
             assert_eq!((!$mask::new(true, true)).bitmask(), 0b00);
-        }
+        });
 
-        #[test]
-        fn test_mask_fmt() {
+        glam_test!(test_mask_fmt, {
             let a = $mask::new(true, false);
 
             assert_eq!(
@@ -338,10 +313,9 @@ macro_rules! impl_vec2_tests {
                 format!("{}(0xffffffff, 0x0)", stringify!($mask))
             );
             assert_eq!(format!("{}", a), "[true, false]");
-        }
+        });
 
-        #[test]
-        fn test_mask_eq() {
+        glam_test!(test_mask_eq, {
             let a = $mask::new(true, false);
             let b = $mask::new(true, false);
             let c = $mask::new(false, true);
@@ -350,10 +324,9 @@ macro_rules! impl_vec2_tests {
             assert_eq!(b, a);
             assert_ne!(a, c);
             assert_ne!(b, c);
-        }
+        });
 
-        #[test]
-        fn test_mask_hash() {
+        glam_test!(test_mask_hash, {
             use std::collections::hash_map::DefaultHasher;
             use std::hash::Hash;
             use std::hash::Hasher;
@@ -378,10 +351,9 @@ macro_rules! impl_vec2_tests {
             assert_eq!(a_hashed, b_hashed);
             assert_ne!(a, c);
             assert_ne!(a_hashed, c_hashed);
-        }
+        });
 
-        #[test]
-        fn test_to_from_slice() {
+        glam_test!(test_to_from_slice, {
             let v = $vec2::new(1 as $t, 2 as $t);
             let mut a = [0 as $t, 0 as $t];
             v.write_to_slice(&mut a);
@@ -389,21 +361,19 @@ macro_rules! impl_vec2_tests {
 
             should_panic!({ $vec2::ONE.write_to_slice(&mut [0 as $t]) });
             should_panic!({ $vec2::from_slice(&[0 as $t]) });
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_sum() {
+        glam_test!(test_sum, {
             let one = $vec2::ONE;
             assert_eq!(vec![one, one].iter().sum::<$vec2>(), one + one);
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let two = $vec2::new(2 as $t, 2 as $t);
             assert_eq!(vec![two, two].iter().product::<$vec2>(), two * two);
-        }
+        });
     };
 }
 
@@ -411,27 +381,24 @@ macro_rules! impl_vec2_signed_tests {
     ($t:ident, $const_new:ident, $new:ident, $vec2:ident, $vec3:ident, $mask:ident) => {
         impl_vec2_tests!($t, $const_new, $new, $vec2, $vec3, $mask);
 
-        #[test]
-        fn test_dot_signed() {
+        glam_test!(test_dot_signed, {
             let x = $new(1 as $t, 0 as $t);
             let y = $new(0 as $t, 1 as $t);
             assert_eq!(1 as $t, x.dot(x));
             assert_eq!(0 as $t, x.dot(y));
             assert_eq!(-1 as $t, x.dot(-x));
-        }
+        });
 
-        #[test]
-        fn test_neg() {
+        glam_test!(test_neg, {
             let a = $new(1 as $t, 2 as $t);
             assert_eq!($new(-1 as $t, -2 as $t), (-a));
-        }
+        });
     };
 }
 
 macro_rules! impl_vec2_eq_hash_tests {
     ($t:ident, $new:ident) => {
-        #[test]
-        fn test_ve2_hash() {
+        glam_test!(test_ve2_hash, {
             use std::collections::hash_map::DefaultHasher;
             use std::hash::Hash;
             use std::hash::Hasher;
@@ -456,7 +423,7 @@ macro_rules! impl_vec2_eq_hash_tests {
             assert_eq!(a_hashed, b_hashed);
             assert_ne!(a, c);
             assert_ne!(a_hashed, c_hashed);
-        }
+        });
     };
 }
 
@@ -469,16 +436,14 @@ macro_rules! impl_vec2_float_tests {
         use core::$t::NAN;
         use core::$t::NEG_INFINITY;
 
-        #[test]
-        fn test_vec2_consts() {
+        glam_test!(test_vec2_consts, {
             assert_eq!($vec2::ZERO, $new(0 as $t, 0 as $t));
             assert_eq!($vec2::ONE, $new(1 as $t, 1 as $t));
             assert_eq!($vec2::X, $new(1 as $t, 0 as $t));
             assert_eq!($vec2::Y, $new(0 as $t, 1 as $t));
-        }
+        });
 
-        #[test]
-        fn test_length() {
+        glam_test!(test_length, {
             let x = $new(1.0, 0.0);
             let y = $new(0.0, 1.0);
             assert_eq!(4.0, (2.0 * x).length_squared());
@@ -507,10 +472,9 @@ macro_rules! impl_vec2_float_tests {
                 $new(2.0, 3.0).normalize()
             );
             assert_eq!($new(0.5, 0.25), $new(2.0, 4.0).recip());
-        }
+        });
 
-        #[test]
-        fn test_project_reject() {
+        glam_test!(test_project_reject, {
             assert_eq!($new(0.0, 1.0), $new(1.0, 1.0).project_onto($new(0.0, 2.0)));
             assert_eq!($new(1.0, 0.0), $new(1.0, 1.0).reject_from($new(0.0, 2.0)));
             assert_eq!(
@@ -525,9 +489,9 @@ macro_rules! impl_vec2_float_tests {
             should_glam_assert!({ $vec2::ONE.reject_from($vec2::ZERO) });
             should_glam_assert!({ $vec2::ONE.project_onto_normalized($vec2::ONE) });
             should_glam_assert!({ $vec2::ONE.reject_from_normalized($vec2::ONE) });
-        }
-        #[test]
-        fn test_perp() {
+        });
+
+        glam_test!(test_perp, {
             let v1 = $vec2::new(1.0, 2.0);
             let v2 = $vec2::new(1.0, 1.0);
             let v1_perp = $vec2::new(-2.0, 1.0);
@@ -539,10 +503,9 @@ macro_rules! impl_vec2_float_tests {
             assert_eq!(v1.perp().dot(v2), v1.perp_dot(v2));
 
             assert_approx_eq!(v1.perp(), rot90 * v1);
-        }
+        });
 
-        #[test]
-        fn test_sign() {
+        glam_test!(test_sign, {
             assert_eq!($vec2::ZERO.signum(), $vec2::ONE);
             assert_eq!(-$vec2::ZERO.signum(), -$vec2::ONE);
             assert_eq!($vec2::ONE.signum(), $vec2::ONE);
@@ -550,17 +513,15 @@ macro_rules! impl_vec2_float_tests {
             assert_eq!($vec2::splat(INFINITY).signum(), $vec2::ONE);
             assert_eq!($vec2::splat(NEG_INFINITY).signum(), -$vec2::ONE);
             assert!($vec2::splat(NAN).signum().is_nan_mask().all());
-        }
+        });
 
-        #[test]
-        fn test_abs() {
+        glam_test!(test_abs, {
             assert_eq!($vec2::ZERO.abs(), $vec2::ZERO);
             assert_eq!($vec2::ONE.abs(), $vec2::ONE);
             assert_eq!((-$vec2::ONE).abs(), $vec2::ONE);
-        }
+        });
 
-        #[test]
-        fn test_round() {
+        glam_test!(test_round, {
             assert_eq!($vec2::new(1.35, 0.0).round().x, 1.0);
             assert_eq!($vec2::new(0.0, 1.5).round().y, 2.0);
             assert_eq!($vec2::new(0.0, -15.5).round().y, -16.0);
@@ -573,10 +534,9 @@ macro_rules! impl_vec2_float_tests {
                 $vec2::new(NEG_INFINITY, INFINITY)
             );
             assert!($vec2::new(NAN, 0.0).round().x.is_nan());
-        }
+        });
 
-        #[test]
-        fn test_floor() {
+        glam_test!(test_floor, {
             assert_eq!($vec2::new(1.35, -1.5).floor(), $vec2::new(1.0, -2.0));
             assert_eq!(
                 $vec2::new(INFINITY, NEG_INFINITY).floor(),
@@ -587,20 +547,18 @@ macro_rules! impl_vec2_float_tests {
                 $vec2::new(-2000000.123, 10000000.123).floor(),
                 $vec2::new(-2000001.0, 10000000.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_fract() {
+        glam_test!(test_fract, {
             assert_approx_eq!($vec2::new(1.35, -1.5).fract(), $vec2::new(0.35, 0.5));
             assert_approx_eq!(
                 $vec2::new(-2000000.123, 1000000.123).fract(),
                 $vec2::new(0.877, 0.123),
                 0.002
             );
-        }
+        });
 
-        #[test]
-        fn test_ceil() {
+        glam_test!(test_ceil, {
             assert_eq!($vec2::new(1.35, -1.5).ceil(), $vec2::new(2.0, -1.0));
             assert_eq!(
                 $vec2::new(INFINITY, NEG_INFINITY).ceil(),
@@ -611,42 +569,37 @@ macro_rules! impl_vec2_float_tests {
                 $vec2::new(-2000000.123, 1000000.123).ceil(),
                 $vec2::new(-2000000.0, 1000001.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_lerp() {
+        glam_test!(test_lerp, {
             let v0 = $vec2::new(-1.0, -1.0);
             let v1 = $vec2::new(1.0, 1.0);
             assert_approx_eq!(v0, v0.lerp(v1, 0.0));
             assert_approx_eq!(v1, v0.lerp(v1, 1.0));
             assert_approx_eq!($vec2::ZERO, v0.lerp(v1, 0.5));
-        }
+        });
 
-        #[test]
-        fn test_is_finite() {
+        glam_test!(test_is_finite, {
             assert!($vec2::new(0.0, 0.0).is_finite());
             assert!($vec2::new(-1e-10, 1e10).is_finite());
             assert!(!$vec2::new(INFINITY, 0.0).is_finite());
             assert!(!$vec2::new(0.0, NAN).is_finite());
             assert!(!$vec2::new(0.0, NEG_INFINITY).is_finite());
             assert!(!$vec2::new(INFINITY, NEG_INFINITY).is_finite());
-        }
+        });
 
-        #[test]
-        fn test_powf() {
+        glam_test!(test_powf, {
             assert_eq!($vec2::new(2.0, 4.0).powf(2.0), $vec2::new(4.0, 16.0));
-        }
+        });
 
-        #[test]
-        fn test_exp() {
+        glam_test!(test_exp, {
             assert_eq!(
                 $vec2::new(1.0, 2.0).exp(),
                 $vec2::new((1.0 as $t).exp(), (2.0 as $t).exp())
             );
-        }
+        });
 
-        #[test]
-        fn test_angle_between() {
+        glam_test!(test_angle_between, {
             let angle = $vec2::new(1.0, 0.0).angle_between($vec2::new(0.0, 1.0));
             assert_approx_eq!(core::$t::consts::FRAC_PI_2, angle, 1e-6);
 
@@ -655,10 +608,9 @@ macro_rules! impl_vec2_float_tests {
 
             let angle = $vec2::new(-1.0, 0.0).angle_between($vec2::new(0.0, 1.0));
             assert_approx_eq!(-core::$t::consts::FRAC_PI_2, angle, 1e-6);
-        }
+        });
 
-        #[test]
-        fn test_clamp_length() {
+        glam_test!(test_clamp_length, {
             // Too long gets shortened
             assert_eq!(
                 $vec2::new(12.0, 16.0).clamp_length(7.0, 10.0),
@@ -675,10 +627,9 @@ macro_rules! impl_vec2_float_tests {
                 $vec2::new(6.0, 8.0) // lengthened to length 10.0
             );
             should_glam_assert!({ $vec2::ONE.clamp_length(1.0, 0.0) });
-        }
+        });
 
-        #[test]
-        fn test_clamp_length_max() {
+        glam_test!(test_clamp_length_max, {
             // Too long gets shortened
             assert_eq!(
                 $vec2::new(12.0, 16.0).clamp_length_max(10.0),
@@ -689,10 +640,9 @@ macro_rules! impl_vec2_float_tests {
                 $vec2::new(2.0, 1.0).clamp_length_max(5.0),
                 $vec2::new(2.0, 1.0) // unchanged
             );
-        }
+        });
 
-        #[test]
-        fn test_clamp_length_min() {
+        glam_test!(test_clamp_length_min, {
             // Not too short is unchanged
             assert_eq!(
                 $vec2::new(2.0, 1.0).clamp_length_min(0.5),
@@ -703,32 +653,29 @@ macro_rules! impl_vec2_float_tests {
                 $vec2::new(0.6, 0.8).clamp_length_min(10.0),
                 $vec2::new(6.0, 8.0) // lengthened to length 10.0
             );
-        }
+        });
 
         #[cfg(any(feature = "glam-assert", feature = "debug-glam-assert"))]
-        #[test]
-        fn test_float_glam_assert() {
+        glam_test!(test_float_glam_assert, {
             use std::panic::catch_unwind;
 
             assert!(catch_unwind(|| $vec2::ZERO.normalize()).is_err());
-        }
+        });
     };
 }
 
 mod vec2 {
     use glam::{const_vec2, vec2, BVec2, Mat2, Vec2, Vec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use core::mem;
         assert_eq!(8, mem::size_of::<Vec2>());
         assert_eq!(4, mem::align_of::<Vec2>());
         assert_eq!(2, mem::size_of::<BVec2>());
         assert_eq!(1, mem::align_of::<BVec2>());
-    }
+    });
 
-    #[test]
-    fn test_as() {
+    glam_test!(test_as, {
         use glam::{DVec2, IVec2, UVec2};
         assert_eq!(DVec2::new(-1.0, -2.0), Vec2::new(-1.0, -2.0).as_dvec2());
         assert_eq!(IVec2::new(-1, -2), Vec2::new(-1.0, -2.0).as_ivec2());
@@ -745,7 +692,7 @@ mod vec2 {
         assert_eq!(DVec2::new(1.0, 2.0), UVec2::new(1, 2).as_dvec2());
         assert_eq!(IVec2::new(1, 2), UVec2::new(1, 2).as_ivec2());
         assert_eq!(Vec2::new(1.0, 2.0), UVec2::new(1, 2).as_vec2());
-    }
+    });
 
     impl_vec2_float_tests!(f32, const_vec2, vec2, Vec2, Vec3, BVec2, Mat2);
 }
@@ -753,14 +700,13 @@ mod vec2 {
 mod dvec2 {
     use glam::{const_dvec2, dvec2, BVec2, DMat2, DVec2, DVec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use core::mem;
         assert_eq!(16, mem::size_of::<DVec2>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DVec2>());
         assert_eq!(2, mem::size_of::<BVec2>());
         assert_eq!(1, mem::align_of::<BVec2>());
-    }
+    });
 
     impl_vec2_float_tests!(f64, const_dvec2, dvec2, DVec2, DVec3, BVec2, DMat2);
 }
@@ -768,14 +714,13 @@ mod dvec2 {
 mod ivec2 {
     use glam::{const_ivec2, ivec2, BVec2, IVec2, IVec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use core::mem;
         assert_eq!(8, mem::size_of::<IVec2>());
         assert_eq!(4, mem::align_of::<IVec2>());
         assert_eq!(2, mem::size_of::<BVec2>());
         assert_eq!(1, mem::align_of::<BVec2>());
-    }
+    });
 
     impl_vec2_signed_tests!(i32, const_ivec2, ivec2, IVec2, IVec3, BVec2);
     impl_vec2_eq_hash_tests!(i32, ivec2);
@@ -784,14 +729,13 @@ mod ivec2 {
 mod uvec2 {
     use glam::{const_uvec2, uvec2, BVec2, UVec2, UVec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use core::mem;
         assert_eq!(8, mem::size_of::<UVec2>());
         assert_eq!(4, mem::align_of::<UVec2>());
         assert_eq!(2, mem::size_of::<BVec2>());
         assert_eq!(1, mem::align_of::<BVec2>());
-    }
+    });
 
     impl_vec2_tests!(u32, const_uvec2, uvec2, UVec2, UVec3, BVec2);
     impl_vec2_eq_hash_tests!(u32, uvec2);
diff --git a/tests/vec3.rs b/tests/vec3.rs
index 2d74406..084ec48 100644
--- a/tests/vec3.rs
+++ b/tests/vec3.rs
@@ -3,14 +3,12 @@ mod support;
 
 macro_rules! impl_vec3_tests {
     ($t:ident, $const_new:ident, $new:ident, $vec3:ident, $mask:ident) => {
-        #[test]
-        fn test_const() {
+        glam_test!(test_const, {
             const V: $vec3 = $const_new!([1 as $t, 2 as $t, 3 as $t]);
             assert_eq!($vec3::new(1 as $t, 2 as $t, 3 as $t), V);
-        }
+        });
 
-        #[test]
-        fn test_new() {
+        glam_test!(test_new, {
             let v = $new(1 as $t, 2 as $t, 3 as $t);
 
             assert_eq!(v.x, 1 as $t);
@@ -32,10 +30,9 @@ macro_rules! impl_vec3_tests {
             assert_eq!($vec3::new(1 as $t, 0 as $t, 0 as $t), $vec3::X);
             assert_eq!($vec3::new(0 as $t, 1 as $t, 0 as $t), $vec3::Y);
             assert_eq!($vec3::new(0 as $t, 0 as $t, 1 as $t), $vec3::Z);
-        }
+        });
 
-        #[test]
-        fn test_fmt() {
+        glam_test!(test_fmt, {
             let a = $vec3::new(1 as $t, 2 as $t, 3 as $t);
             assert_eq!(
                 format!("{:?}", a),
@@ -43,23 +40,20 @@ macro_rules! impl_vec3_tests {
             );
             // assert_eq!(format!("{:#?}", a), "$vec3(\n    1.0,\n    2.0,\n    3.0\n)");
             assert_eq!(format!("{}", a), "[1, 2, 3]");
-        }
+        });
 
-        #[test]
-        fn test_zero() {
+        glam_test!(test_zero, {
             let v = $vec3::ZERO;
             assert_eq!((0 as $t, 0 as $t, 0 as $t), v.into());
             assert_eq!(v, $vec3::default());
-        }
+        });
 
-        #[test]
-        fn test_splat() {
+        glam_test!(test_splat, {
             let v = $vec3::splat(1 as $t);
             assert_eq!($vec3::ONE, v);
-        }
+        });
 
-        #[test]
-        fn test_accessors() {
+        glam_test!(test_accessors, {
             let mut a = $vec3::ZERO;
             a.x = 1 as $t;
             a.y = 2 as $t;
@@ -77,27 +71,24 @@ macro_rules! impl_vec3_tests {
             assert_eq!(2 as $t, a[1]);
             assert_eq!(3 as $t, a[2]);
             assert_eq!((1 as $t, 2 as $t, 3 as $t), a.into());
-        }
+        });
 
-        #[test]
-        fn test_dot_unsigned() {
+        glam_test!(test_dot_unsigned, {
             let x = $new(1 as $t, 0 as $t, 0 as $t);
             let y = $new(0 as $t, 1 as $t, 0 as $t);
             assert_eq!(1 as $t, x.dot(x));
             assert_eq!(0 as $t, x.dot(y));
-        }
+        });
 
-        #[test]
-        fn test_cross() {
+        glam_test!(test_cross, {
             let x = $new(1 as $t, 0 as $t, 0 as $t);
             let y = $new(0 as $t, 1 as $t, 0 as $t);
             let z = $new(0 as $t, 0 as $t, 1 as $t);
             assert_eq!(y, z.cross(x));
             assert_eq!(z, x.cross(y));
-        }
+        });
 
-        #[test]
-        fn test_ops() {
+        glam_test!(test_ops, {
             let a = $new(2 as $t, 4 as $t, 8 as $t);
             assert_eq!($new(4 as $t, 8 as $t, 16 as $t), a + a);
             assert_eq!($new(0 as $t, 0 as $t, 0 as $t), a - a);
@@ -113,10 +104,9 @@ macro_rules! impl_vec3_tests {
             assert_eq!($new(2 as $t, 1 as $t, 2 as $t), a % 3 as $t);
             assert_eq!($new(1 as $t, 1 as $t, 1 as $t), 17 as $t % a);
             assert_eq!($new(2 as $t, 4 as $t, 0 as $t), a % 8 as $t);
-        }
+        });
 
-        #[test]
-        fn test_assign_ops() {
+        glam_test!(test_assign_ops, {
             let a = $new(1 as $t, 2 as $t, 3 as $t);
             let mut b = a;
             b += a;
@@ -135,20 +125,18 @@ macro_rules! impl_vec3_tests {
             assert_eq!($new(1 as $t, 2 as $t, 3 as $t), b);
             b %= b;
             assert_eq!($new(0 as $t, 0 as $t, 0 as $t), b);
-        }
+        });
 
-        #[test]
-        fn test_min_max() {
+        glam_test!(test_min_max, {
             let a = $new(3 as $t, 5 as $t, 1 as $t);
             let b = $new(4 as $t, 2 as $t, 6 as $t);
             assert_eq!((3 as $t, 2 as $t, 1 as $t), a.min(b).into());
             assert_eq!((3 as $t, 2 as $t, 1 as $t), b.min(a).into());
             assert_eq!((4 as $t, 5 as $t, 6 as $t), a.max(b).into());
             assert_eq!((4 as $t, 5 as $t, 6 as $t), b.max(a).into());
-        }
+        });
 
-        #[test]
-        fn test_clamp() {
+        glam_test!(test_clamp, {
             fn vec(x: i32, y: i32, z: i32) -> $vec3 {
                 $vec3::new(x as $t, y as $t, z as $t)
             }
@@ -162,17 +150,15 @@ macro_rules! impl_vec3_tests {
             assert_eq!(vec(9, 9, 9).clamp(min, max), vec(6, 8, 8));
 
             should_glam_assert!({ $vec3::clamp($vec3::ZERO, $vec3::ONE, $vec3::ZERO) });
-        }
+        });
 
-        #[test]
-        fn test_hmin_hmax() {
+        glam_test!(test_hmin_hmax, {
             let a = $new(2 as $t, 3 as $t, 1 as $t);
             assert_eq!(1 as $t, a.min_element());
             assert_eq!(3 as $t, a.max_element());
-        }
+        });
 
-        #[test]
-        fn test_eq() {
+        glam_test!(test_eq, {
             let a = $new(1 as $t, 1 as $t, 1 as $t);
             let b = $new(1 as $t, 2 as $t, 3 as $t);
             assert!(a.cmpeq(a).all());
@@ -180,10 +166,9 @@ macro_rules! impl_vec3_tests {
             assert!(a.cmpne(b).any());
             assert!(b.cmpne(a).any());
             assert!(b.cmpeq(a).any());
-        }
+        });
 
-        #[test]
-        fn test_cmp() {
+        glam_test!(test_cmp, {
             assert!(!$mask::default().any());
             assert!(!$mask::default().all());
             assert_eq!($mask::default().bitmask(), 0x0);
@@ -207,26 +192,24 @@ macro_rules! impl_vec3_tests {
             assert!(c.cmple(c).all());
             assert!(c.cmpge(c).all());
             assert!(a == a);
-        }
+        });
 
-        #[test]
-        fn test_extend_truncate() {
+        glam_test!(test_extend_truncate, {
             let a = $new(1 as $t, 2 as $t, 3 as $t);
             let b = a.extend(4 as $t);
             assert_eq!((1 as $t, 2 as $t, 3 as $t, 4 as $t), b.into());
             let c = $vec3::from(b.truncate());
             assert_eq!(a, c);
-        }
+        });
 
-        #[test]
-        fn test_mask() {
+        glam_test!(test_mask, {
             let mut a = $vec3::ZERO;
             a.x = 1 as $t;
             a.y = 1 as $t;
             a.z = 1 as $t;
             assert!(!a.cmpeq($vec3::ZERO).any());
             assert!(a.cmpeq($vec3::ONE).all());
-        }
+        });
 
         // #[test]
         // fn test_mask_as_ref() {
@@ -238,8 +221,7 @@ macro_rules! impl_vec3_tests {
         //     assert_eq!($mask::new(true, true, true).as_ref(), &[!0, !0, !0]);
         // }
 
-        #[test]
-        fn test_mask_from() {
+        glam_test!(test_mask_from, {
             assert_eq!(
                 Into::<[u32; 3]>::into($mask::new(false, false, false)),
                 [0, 0, 0]
@@ -264,36 +246,32 @@ macro_rules! impl_vec3_tests {
                 Into::<[u32; 3]>::into($mask::new(true, true, true)),
                 [!0, !0, !0]
             );
-        }
+        });
 
-        #[test]
-        fn test_mask_bitmask() {
+        glam_test!(test_mask_bitmask, {
             assert_eq!($mask::new(false, false, false).bitmask(), 0b000);
             assert_eq!($mask::new(true, false, false).bitmask(), 0b001);
             assert_eq!($mask::new(false, true, true).bitmask(), 0b110);
             assert_eq!($mask::new(false, true, false).bitmask(), 0b010);
             assert_eq!($mask::new(true, false, true).bitmask(), 0b101);
             assert_eq!($mask::new(true, true, true).bitmask(), 0b111);
-        }
+        });
 
-        #[test]
-        fn test_mask_any() {
+        glam_test!(test_mask_any, {
             assert_eq!($mask::new(false, false, false).any(), false);
             assert_eq!($mask::new(true, false, false).any(), true);
             assert_eq!($mask::new(false, true, false).any(), true);
             assert_eq!($mask::new(false, false, true).any(), true);
-        }
+        });
 
-        #[test]
-        fn test_mask_all() {
+        glam_test!(test_mask_all, {
             assert_eq!($mask::new(true, true, true).all(), true);
             assert_eq!($mask::new(false, true, true).all(), false);
             assert_eq!($mask::new(true, false, true).all(), false);
             assert_eq!($mask::new(true, true, false).all(), false);
-        }
+        });
 
-        #[test]
-        fn test_mask_select() {
+        glam_test!(test_mask_select, {
             let a = $vec3::new(1 as $t, 2 as $t, 3 as $t);
             let b = $vec3::new(4 as $t, 5 as $t, 6 as $t);
             assert_eq!(
@@ -312,10 +290,9 @@ macro_rules! impl_vec3_tests {
                 $vec3::select($mask::new(false, false, false), a, b),
                 $vec3::new(4 as $t, 5 as $t, 6 as $t),
             );
-        }
+        });
 
-        #[test]
-        fn test_mask_and() {
+        glam_test!(test_mask_and, {
             assert_eq!(
                 ($mask::new(false, false, false) & $mask::new(false, false, false)).bitmask(),
                 0b000,
@@ -336,10 +313,9 @@ macro_rules! impl_vec3_tests {
             let mut mask = $mask::new(true, true, false);
             mask &= $mask::new(true, false, false);
             assert_eq!(mask.bitmask(), 0b001);
-        }
+        });
 
-        #[test]
-        fn test_mask_or() {
+        glam_test!(test_mask_or, {
             assert_eq!(
                 ($mask::new(false, false, false) | $mask::new(false, false, false)).bitmask(),
                 0b000,
@@ -360,18 +336,16 @@ macro_rules! impl_vec3_tests {
             let mut mask = $mask::new(true, true, false);
             mask |= $mask::new(true, false, false);
             assert_eq!(mask.bitmask(), 0b011);
-        }
+        });
 
-        #[test]
-        fn test_mask_not() {
+        glam_test!(test_mask_not, {
             assert_eq!((!$mask::new(false, false, false)).bitmask(), 0b111);
             assert_eq!((!$mask::new(true, true, true)).bitmask(), 0b000);
             assert_eq!((!$mask::new(true, false, true)).bitmask(), 0b010);
             assert_eq!((!$mask::new(false, true, false)).bitmask(), 0b101);
-        }
+        });
 
-        #[test]
-        fn test_mask_fmt() {
+        glam_test!(test_mask_fmt, {
             let a = $mask::new(true, false, false);
 
             // // debug fmt
@@ -382,10 +356,9 @@ macro_rules! impl_vec3_tests {
 
             // display fmt
             assert_eq!(format!("{}", a), "[true, false, false]");
-        }
+        });
 
-        #[test]
-        fn test_mask_eq() {
+        glam_test!(test_mask_eq, {
             let a = $mask::new(true, false, true);
             let b = $mask::new(true, false, true);
             let c = $mask::new(false, true, true);
@@ -394,10 +367,9 @@ macro_rules! impl_vec3_tests {
             assert_eq!(b, a);
             assert_ne!(a, c);
             assert_ne!(b, c);
-        }
+        });
 
-        #[test]
-        fn test_mask_hash() {
+        glam_test!(test_mask_hash, {
             use std::collections::hash_map::DefaultHasher;
             use std::hash::Hash;
             use std::hash::Hasher;
@@ -422,10 +394,9 @@ macro_rules! impl_vec3_tests {
             assert_eq!(a_hashed, b_hashed);
             assert_ne!(a, c);
             assert_ne!(a_hashed, c_hashed);
-        }
+        });
 
-        #[test]
-        fn test_to_from_slice() {
+        glam_test!(test_to_from_slice, {
             let v = $vec3::new(1 as $t, 2 as $t, 3 as $t);
             let mut a = [0 as $t, 0 as $t, 0 as $t];
             v.write_to_slice(&mut a);
@@ -433,21 +404,19 @@ macro_rules! impl_vec3_tests {
 
             should_panic!({ $vec3::ONE.write_to_slice(&mut [0 as $t; 2]) });
             should_panic!({ $vec3::from_slice(&[0 as $t; 2]) });
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_sum() {
+        glam_test!(test_sum, {
             let one = $vec3::ONE;
             assert_eq!(vec![one, one].iter().sum::<$vec3>(), one + one);
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let two = $vec3::new(2 as $t, 2 as $t, 2 as $t);
             assert_eq!(vec![two, two].iter().product::<$vec3>(), two * two);
-        }
+        });
     };
 }
 
@@ -455,28 +424,25 @@ macro_rules! impl_vec3_signed_tests {
     ($t:ident, $const_new:ident, $new:ident, $vec3:ident, $mask:ident) => {
         impl_vec3_tests!($t, $const_new, $new, $vec3, $mask);
 
-        #[test]
-        fn test_neg() {
+        glam_test!(test_neg, {
             let a = $new(1 as $t, 2 as $t, 3 as $t);
             assert_eq!((-1 as $t, -2 as $t, -3 as $t), (-a).into());
-        }
+        });
 
-        #[test]
-        fn test_dot_signed() {
+        glam_test!(test_dot_signed, {
             let x = $new(1 as $t, 0 as $t, 0 as $t);
             let y = $new(0 as $t, 1 as $t, 0 as $t);
             let z = $new(0 as $t, 0 as $t, 1 as $t);
             assert_eq!(1 as $t, x.dot(x));
             assert_eq!(0 as $t, x.dot(y));
             assert_eq!(-1 as $t, z.dot(-z));
-        }
+        });
     };
 }
 
 macro_rules! impl_vec3_eq_hash_tests {
     ($t:ident, $new:ident) => {
-        #[test]
-        fn test_vec3_hash() {
+        glam_test!(test_vec3_hash, {
             use std::collections::hash_map::DefaultHasher;
             use std::hash::Hash;
             use std::hash::Hasher;
@@ -501,7 +467,7 @@ macro_rules! impl_vec3_eq_hash_tests {
             assert_eq!(a_hashed, b_hashed);
             assert_ne!(a, c);
             assert_ne!(a_hashed, c_hashed);
-        }
+        });
     };
 }
 
@@ -514,17 +480,15 @@ macro_rules! impl_vec3_float_tests {
         use core::$t::NAN;
         use core::$t::NEG_INFINITY;
 
-        #[test]
-        fn test_vec3_consts() {
+        glam_test!(test_vec3_consts, {
             assert_eq!($vec3::ZERO, $new(0 as $t, 0 as $t, 0 as $t));
             assert_eq!($vec3::ONE, $new(1 as $t, 1 as $t, 1 as $t));
             assert_eq!($vec3::X, $new(1 as $t, 0 as $t, 0 as $t));
             assert_eq!($vec3::Y, $new(0 as $t, 1 as $t, 0 as $t));
             assert_eq!($vec3::Z, $new(0 as $t, 0 as $t, 1 as $t));
-        }
+        });
 
-        #[test]
-        fn test_funcs() {
+        glam_test!(test_funcs, {
             let x = $new(1.0, 0.0, 0.0);
             let y = $new(0.0, 1.0, 0.0);
             let z = $new(0.0, 0.0, 1.0);
@@ -564,10 +528,9 @@ macro_rules! impl_vec3_float_tests {
                 $new(2.0, 3.0, 4.0).normalize()
             );
             assert_eq!($new(0.5, 0.25, 0.125), $new(2.0, 4.0, 8.0).recip());
-        }
+        });
 
-        #[test]
-        fn test_project_reject() {
+        glam_test!(test_project_reject, {
             assert_eq!(
                 $new(0.0, 0.0, 1.0),
                 $new(1.0, 0.0, 1.0).project_onto($new(0.0, 0.0, 2.0))
@@ -588,10 +551,9 @@ macro_rules! impl_vec3_float_tests {
             should_glam_assert!({ $vec3::ONE.reject_from($vec3::ZERO) });
             should_glam_assert!({ $vec3::ONE.project_onto_normalized($vec3::ONE) });
             should_glam_assert!({ $vec3::ONE.reject_from_normalized($vec3::ONE) });
-        }
+        });
 
-        #[test]
-        fn test_signum() {
+        glam_test!(test_signum, {
             assert_eq!($vec3::ZERO.signum(), $vec3::ONE);
             assert_eq!(-$vec3::ZERO.signum(), -$vec3::ONE);
             assert_eq!($vec3::ONE.signum(), $vec3::ONE);
@@ -599,17 +561,15 @@ macro_rules! impl_vec3_float_tests {
             assert_eq!($vec3::splat(INFINITY).signum(), $vec3::ONE);
             assert_eq!($vec3::splat(NEG_INFINITY).signum(), -$vec3::ONE);
             assert!($vec3::splat(NAN).signum().is_nan_mask().all());
-        }
+        });
 
-        #[test]
-        fn test_abs() {
+        glam_test!(test_abs, {
             assert_eq!($vec3::ZERO.abs(), $vec3::ZERO);
             assert_eq!($vec3::ONE.abs(), $vec3::ONE);
             assert_eq!((-$vec3::ONE).abs(), $vec3::ONE);
-        }
+        });
 
-        #[test]
-        fn test_round() {
+        glam_test!(test_round, {
             assert_eq!($vec3::new(1.35, 0.0, 0.0).round().x, 1.0);
             assert_eq!($vec3::new(0.0, 1.5, 0.0).round().y, 2.0);
             assert_eq!($vec3::new(0.0, 0.0, -15.5).round().z, -16.0);
@@ -622,10 +582,9 @@ macro_rules! impl_vec3_float_tests {
                 $vec3::new(NEG_INFINITY, INFINITY, 0.0)
             );
             assert!($vec3::new(NAN, 0.0, 0.0).round().x.is_nan());
-        }
+        });
 
-        #[test]
-        fn test_floor() {
+        glam_test!(test_floor, {
             assert_eq!(
                 $vec3::new(1.35, 1.5, -1.5).floor(),
                 $vec3::new(1.0, 1.0, -2.0)
@@ -639,10 +598,9 @@ macro_rules! impl_vec3_float_tests {
                 $vec3::new(-2000000.123, 10000000.123, 1000.9).floor(),
                 $vec3::new(-2000001.0, 10000000.0, 1000.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_fract() {
+        glam_test!(test_fract, {
             assert_approx_eq!(
                 $vec3::new(1.35, 1.5, -1.5).fract(),
                 $vec3::new(0.35, 0.5, 0.5)
@@ -652,9 +610,9 @@ macro_rules! impl_vec3_float_tests {
                 $vec3::new(0.877, 0.123, 0.9),
                 0.002
             );
-        }
-        #[test]
-        fn test_ceil() {
+        });
+
+        glam_test!(test_ceil, {
             assert_eq!(
                 $vec3::new(1.35, 1.5, -1.5).ceil(),
                 $vec3::new(2.0, 2.0, -1.0)
@@ -668,44 +626,40 @@ macro_rules! impl_vec3_float_tests {
                 $vec3::new(-2000000.123, 1000000.123, 1000.9).ceil(),
                 $vec3::new(-2000000.0, 1000001.0, 1001.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_lerp() {
+        glam_test!(test_lerp, {
             let v0 = $vec3::new(-1.0, -1.0, -1.0);
             let v1 = $vec3::new(1.0, 1.0, 1.0);
             assert_approx_eq!(v0, v0.lerp(v1, 0.0));
             assert_approx_eq!(v1, v0.lerp(v1, 1.0));
             assert_approx_eq!($vec3::ZERO, v0.lerp(v1, 0.5));
-        }
-        #[test]
-        fn test_is_finite() {
+        });
+
+        glam_test!(test_is_finite, {
             assert!($vec3::new(0.0, 0.0, 0.0).is_finite());
             assert!($vec3::new(-1e-10, 1.0, 1e10).is_finite());
             assert!(!$vec3::new(INFINITY, 0.0, 0.0).is_finite());
             assert!(!$vec3::new(0.0, NAN, 0.0).is_finite());
             assert!(!$vec3::new(0.0, 0.0, NEG_INFINITY).is_finite());
             assert!(!$vec3::splat(NAN).is_finite());
-        }
+        });
 
-        #[test]
-        fn test_powf() {
+        glam_test!(test_powf, {
             assert_eq!(
                 $vec3::new(2.0, 4.0, 8.0).powf(2.0),
                 $vec3::new(4.0, 16.0, 64.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_exp() {
+        glam_test!(test_exp, {
             assert_eq!(
                 $vec3::new(1.0, 2.0, 3.0).exp(),
                 $vec3::new((1.0 as $t).exp(), (2.0 as $t).exp(), (3.0 as $t).exp())
             );
-        }
+        });
 
-        #[test]
-        fn test_angle_between() {
+        glam_test!(test_angle_between, {
             let angle = $vec3::new(1.0, 0.0, 1.0).angle_between($vec3::new(1.0, 1.0, 0.0));
             assert_approx_eq!(core::$t::consts::FRAC_PI_3, angle, 1e-6);
 
@@ -714,10 +668,9 @@ macro_rules! impl_vec3_float_tests {
 
             let angle = $vec3::new(-1.0, 0.0, -1.0).angle_between($vec3::new(1.0, -1.0, 0.0));
             assert_approx_eq!(2.0 * core::$t::consts::FRAC_PI_3, angle, 1e-6);
-        }
+        });
 
-        #[test]
-        fn test_clamp_length() {
+        glam_test!(test_clamp_length, {
             // Too long gets shortened
             assert_eq!(
                 $vec3::new(12.0, 16.0, 0.0).clamp_length(7.0, 10.0),
@@ -734,10 +687,9 @@ macro_rules! impl_vec3_float_tests {
                 $vec3::new(6.0, 8.0, 0.0) // lengthened to length 10.0
             );
             should_glam_assert!({ $vec3::ONE.clamp_length(1.0, 0.0) });
-        }
+        });
 
-        #[test]
-        fn test_clamp_length_max() {
+        glam_test!(test_clamp_length_max, {
             // Too long gets shortened
             assert_eq!(
                 $vec3::new(12.0, 16.0, 0.0).clamp_length_max(10.0),
@@ -748,10 +700,9 @@ macro_rules! impl_vec3_float_tests {
                 $vec3::new(2.0, 1.0, 0.0).clamp_length_max(5.0),
                 $vec3::new(2.0, 1.0, 0.0) // unchanged
             );
-        }
+        });
 
-        #[test]
-        fn test_clamp_length_min() {
+        glam_test!(test_clamp_length_min, {
             // Not too short is unchanged
             assert_eq!(
                 $vec3::new(2.0, 1.0, 0.0).clamp_length_min(0.5),
@@ -762,11 +713,10 @@ macro_rules! impl_vec3_float_tests {
                 $vec3::new(0.6, 0.8, 0.0).clamp_length_min(10.0),
                 $vec3::new(6.0, 8.0, 0.0) // lengthened to length 10.0
             );
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_any_ortho() {
+        glam_test!(test_any_ortho, {
             let eps = 2.0 * core::$t::EPSILON;
 
             for &v in &vec3_float_test_vectors!($vec3) {
@@ -784,24 +734,22 @@ macro_rules! impl_vec3_float_tests {
                 assert!(a.is_normalized() && n.dot(a).abs() < eps);
                 assert!(b.is_normalized() && n.dot(b).abs() < eps);
             }
-        }
+        });
     };
 }
 
 mod vec3 {
     use glam::{const_vec3, vec3, BVec3, Vec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(12, mem::size_of::<Vec3>());
         assert_eq!(4, mem::align_of::<Vec3>());
         assert_eq!(3, mem::size_of::<BVec3>());
         assert_eq!(1, mem::align_of::<BVec3>());
-    }
+    });
 
-    #[test]
-    fn test_as() {
+    glam_test!(test_as, {
         use glam::{DVec3, IVec3, UVec3, Vec3A};
         assert_eq!(
             DVec3::new(-1.0, -2.0, -3.0),
@@ -846,7 +794,7 @@ mod vec3 {
         assert_eq!(DVec3::new(1.0, 2.0, 3.0), UVec3::new(1, 2, 3).as_dvec3());
         assert_eq!(IVec3::new(1, 2, 3), UVec3::new(1, 2, 3).as_ivec3());
         assert_eq!(Vec3::new(1.0, 2.0, 3.0), UVec3::new(1, 2, 3).as_vec3());
-    }
+    });
 
     impl_vec3_float_tests!(f32, const_vec3, vec3, Vec3, BVec3);
 }
@@ -854,8 +802,7 @@ mod vec3 {
 mod vec3a {
     use glam::{const_vec3a, vec3a, BVec3A, Vec3A, Vec4};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(16, mem::size_of::<Vec3A>());
         assert_eq!(16, mem::align_of::<Vec3A>());
@@ -867,10 +814,9 @@ mod vec3a {
             assert_eq!(3, mem::size_of::<BVec3A>());
             assert_eq!(1, mem::align_of::<BVec3A>());
         }
-    }
+    });
 
-    #[test]
-    fn test_mask_align16() {
+    glam_test!(test_mask_align16, {
         // make sure the unused 'w' value doesn't break Vec3Ab behaviour
         let a = Vec4::ZERO;
         let mut b = Vec3A::from(a);
@@ -879,7 +825,7 @@ mod vec3a {
         b.z = 1.0;
         assert!(!b.cmpeq(Vec3A::ZERO).any());
         assert!(b.cmpeq(Vec3A::splat(1.0)).all());
-    }
+    });
 
     #[cfg(all(target_feature = "sse2", not(feature = "scalar-math")))]
     #[test]
@@ -914,14 +860,13 @@ mod vec3a {
         assert_eq!([0xffffffff, 0, 0xffffffff], a0.0);
     }
 
-    #[test]
-    fn test_min_max_from_vec4() {
+    glam_test!(test_min_max_from_vec4, {
         // checks that the 4th element is unused.
         let v1 = Vec3A::from(Vec4::new(1.0, 2.0, 3.0, 4.0));
         assert_eq!(v1.max_element(), 3.0);
         let v2 = Vec3A::from(Vec4::new(4.0, 3.0, 2.0, 1.0));
         assert_eq!(v2.min_element(), 2.0);
-    }
+    });
 
     impl_vec3_float_tests!(f32, const_vec3a, vec3a, Vec3A, BVec3A);
 }
@@ -929,14 +874,13 @@ mod vec3a {
 mod dvec3 {
     use glam::{const_dvec3, dvec3, BVec3, DVec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(24, mem::size_of::<DVec3>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DVec3>());
         assert_eq!(3, mem::size_of::<BVec3>());
         assert_eq!(1, mem::align_of::<BVec3>());
-    }
+    });
 
     impl_vec3_float_tests!(f64, const_dvec3, dvec3, DVec3, BVec3);
 }
@@ -944,14 +888,13 @@ mod dvec3 {
 mod ivec3 {
     use glam::{const_ivec3, ivec3, BVec3, IVec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(12, mem::size_of::<IVec3>());
         assert_eq!(4, mem::align_of::<IVec3>());
         assert_eq!(3, mem::size_of::<BVec3>());
         assert_eq!(1, mem::align_of::<BVec3>());
-    }
+    });
 
     impl_vec3_signed_tests!(i32, const_ivec3, ivec3, IVec3, BVec3);
     impl_vec3_eq_hash_tests!(i32, ivec3);
@@ -960,14 +903,13 @@ mod ivec3 {
 mod uvec3 {
     use glam::{const_uvec3, uvec3, BVec3, UVec3};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(12, mem::size_of::<UVec3>());
         assert_eq!(4, mem::align_of::<UVec3>());
         assert_eq!(3, mem::size_of::<BVec3>());
         assert_eq!(1, mem::align_of::<BVec3>());
-    }
+    });
 
     impl_vec3_tests!(u32, const_uvec3, uvec3, UVec3, BVec3);
     impl_vec3_eq_hash_tests!(u32, uvec3);
diff --git a/tests/vec4.rs b/tests/vec4.rs
index 809b9cb..b41d047 100644
--- a/tests/vec4.rs
+++ b/tests/vec4.rs
@@ -3,24 +3,21 @@ mod support;
 
 macro_rules! impl_vec4_tests {
     ($t:ident, $const_new:ident, $new:ident, $vec4:ident, $vec3:ident, $vec2:ident, $mask:ident) => {
-        #[test]
-        fn test_const() {
+        glam_test!(test_const, {
             const V: $vec4 = $const_new!([1 as $t, 2 as $t, 3 as $t, 4 as $t]);
             assert_eq!($vec4::new(1 as $t, 2 as $t, 3 as $t, 4 as $t), V);
-        }
+        });
 
-        #[test]
-        fn test_vec4_consts() {
+        glam_test!(test_vec4_consts, {
             assert_eq!($vec4::ZERO, $new(0 as $t, 0 as $t, 0 as $t, 0 as $t));
             assert_eq!($vec4::ONE, $new(1 as $t, 1 as $t, 1 as $t, 1 as $t));
             assert_eq!($vec4::X, $new(1 as $t, 0 as $t, 0 as $t, 0 as $t));
             assert_eq!($vec4::Y, $new(0 as $t, 1 as $t, 0 as $t, 0 as $t));
             assert_eq!($vec4::Z, $new(0 as $t, 0 as $t, 1 as $t, 0 as $t));
             assert_eq!($vec4::W, $new(0 as $t, 0 as $t, 0 as $t, 1 as $t));
-        }
+        });
 
-        #[test]
-        fn test_new() {
+        glam_test!(test_new, {
             let v = $new(1 as $t, 2 as $t, 3 as $t, 4 as $t);
 
             assert_eq!(v.x, 1 as $t);
@@ -63,10 +60,9 @@ macro_rules! impl_vec4_tests {
                 v,
                 $vec4::from(($vec2::new(1 as $t, 2 as $t), $vec2::new(3 as $t, 4 as $t)))
             );
-        }
+        });
 
-        #[test]
-        fn test_fmt() {
+        glam_test!(test_fmt, {
             let a = $vec4::new(1 as $t, 2 as $t, 3 as $t, 4 as $t);
             assert_eq!(
                 format!("{:?}", a),
@@ -84,23 +80,20 @@ macro_rules! impl_vec4_tests {
             //     "$vec4(\n    1.0,\n    2.0,\n    3.0,\n    4.0\n)"
             // );
             assert_eq!(format!("{}", a), "[1, 2, 3, 4]");
-        }
+        });
 
-        #[test]
-        fn test_zero() {
+        glam_test!(test_zero, {
             let v = $vec4::ZERO;
             assert_eq!((0 as $t, 0 as $t, 0 as $t, 0 as $t), v.into());
             assert_eq!(v, $vec4::default());
-        }
+        });
 
-        #[test]
-        fn test_splat() {
+        glam_test!(test_splat, {
             let v = $vec4::splat(1 as $t);
             assert_eq!($vec4::ONE, v);
-        }
+        });
 
-        #[test]
-        fn test_accessors() {
+        glam_test!(test_accessors, {
             let mut a = $vec4::ZERO;
             a.x = 1 as $t;
             a.y = 2 as $t;
@@ -122,10 +115,9 @@ macro_rules! impl_vec4_tests {
             assert_eq!(3 as $t, a[2]);
             assert_eq!(4 as $t, a[3]);
             assert_eq!((1 as $t, 2 as $t, 3 as $t, 4 as $t), a.into());
-        }
+        });
 
-        #[test]
-        fn test_dot_unsigned() {
+        glam_test!(test_dot_unsigned, {
             let x = $new(1 as $t, 0 as $t, 0 as $t, 0 as $t);
             let y = $new(0 as $t, 1 as $t, 0 as $t, 0 as $t);
             let z = $new(0 as $t, 0 as $t, 1 as $t, 0 as $t);
@@ -134,10 +126,9 @@ macro_rules! impl_vec4_tests {
             assert_eq!(0 as $t, x.dot(y));
             assert_eq!(0 as $t, y.dot(z));
             assert_eq!(0 as $t, z.dot(w));
-        }
+        });
 
-        #[test]
-        fn test_ops() {
+        glam_test!(test_ops, {
             let a = $new(2 as $t, 4 as $t, 8 as $t, 16 as $t);
             assert_eq!($new(4 as $t, 8 as $t, 16 as $t, 32 as $t), a + a);
             assert_eq!($new(0 as $t, 0 as $t, 0 as $t, 0 as $t), a - a);
@@ -153,10 +144,9 @@ macro_rules! impl_vec4_tests {
             assert_eq!($new(2 as $t, 1 as $t, 2 as $t, 1 as $t), a % 3 as $t);
             assert_eq!($new(1 as $t, 1 as $t, 1 as $t, 1 as $t), 17 as $t % a);
             assert_eq!($new(2 as $t, 4 as $t, 0 as $t, 0 as $t), a % 8 as $t);
-        }
+        });
 
-        #[test]
-        fn test_assign_ops() {
+        glam_test!(test_assign_ops, {
             let a = $new(1 as $t, 2 as $t, 3 as $t, 4 as $t);
             let mut b = a;
             b += a;
@@ -175,20 +165,18 @@ macro_rules! impl_vec4_tests {
             assert_eq!($new(1 as $t, 2 as $t, 3 as $t, 4 as $t), b);
             b %= b;
             assert_eq!($new(0 as $t, 0 as $t, 0 as $t, 0 as $t), b);
-        }
+        });
 
-        #[test]
-        fn test_min_max() {
+        glam_test!(test_min_max, {
             let a = $new(4 as $t, 6 as $t, 2 as $t, 8 as $t);
             let b = $new(5 as $t, 3 as $t, 7 as $t, 1 as $t);
             assert_eq!((4 as $t, 3 as $t, 2 as $t, 1 as $t), a.min(b).into());
             assert_eq!((4 as $t, 3 as $t, 2 as $t, 1 as $t), b.min(a).into());
             assert_eq!((5 as $t, 6 as $t, 7 as $t, 8 as $t), a.max(b).into());
             assert_eq!((5 as $t, 6 as $t, 7 as $t, 8 as $t), b.max(a).into());
-        }
+        });
 
-        #[test]
-        fn test_clamp() {
+        glam_test!(test_clamp, {
             fn vec(x: i32, y: i32, z: i32, w: i32) -> $vec4 {
                 $vec4::new(x as $t, y as $t, z as $t, w as $t)
             }
@@ -202,10 +190,9 @@ macro_rules! impl_vec4_tests {
             assert_eq!(vec(9, 9, 9, 9).clamp(min, max), vec(6, 6, 8, 8));
 
             should_glam_assert!({ $vec4::clamp($vec4::ZERO, $vec4::ONE, $vec4::ZERO) });
-        }
+        });
 
-        #[test]
-        fn test_hmin_hmax() {
+        glam_test!(test_hmin_hmax, {
             let a = $new(3 as $t, 4 as $t, 1 as $t, 2 as $t);
             assert_eq!(1 as $t, a.min_element());
             assert_eq!(4 as $t, a.max_element());
@@ -221,10 +208,9 @@ macro_rules! impl_vec4_tests {
                     .truncate()
                     .min_element()
             );
-        }
+        });
 
-        #[test]
-        fn test_eq() {
+        glam_test!(test_eq, {
             let a = $new(1 as $t, 1 as $t, 1 as $t, 1 as $t);
             let b = $new(1 as $t, 2 as $t, 3 as $t, 4 as $t);
             assert!(a.cmpeq(a).all());
@@ -232,10 +218,9 @@ macro_rules! impl_vec4_tests {
             assert!(a.cmpne(b).any());
             assert!(b.cmpne(a).any());
             assert!(b.cmpeq(a).any());
-        }
+        });
 
-        #[test]
-        fn test_cmp() {
+        glam_test!(test_cmp, {
             assert!(!$mask::default().any());
             assert!(!$mask::default().all());
             assert_eq!($mask::default().bitmask(), 0x0);
@@ -265,10 +250,9 @@ macro_rules! impl_vec4_tests {
             assert!(a.cmpne(b).all());
             assert!(a.cmpne(c).any());
             assert!(a == a);
-        }
+        });
 
-        #[test]
-        fn test_slice() {
+        glam_test!(test_slice, {
             let a = [1 as $t, 2 as $t, 3 as $t, 4 as $t];
             let b = $vec4::from_slice(&a);
             let c: [$t; 4] = b.into();
@@ -279,7 +263,7 @@ macro_rules! impl_vec4_tests {
 
             should_panic!({ $vec4::ONE.write_to_slice(&mut [0 as $t; 3]) });
             should_panic!({ $vec4::from_slice(&[0 as $t; 3]) });
-        }
+        });
 
         // #[test]
         // fn test_mask_as_ref() {
@@ -309,8 +293,7 @@ macro_rules! impl_vec4_tests {
         //     );
         // }
 
-        #[test]
-        fn test_mask_from() {
+        glam_test!(test_mask_from, {
             assert_eq!(
                 Into::<[u32; 4]>::into($mask::new(false, false, false, false)),
                 [0, 0, 0, 0]
@@ -335,38 +318,34 @@ macro_rules! impl_vec4_tests {
                 Into::<[u32; 4]>::into($mask::new(true, true, true, true)),
                 [!0, !0, !0, !0]
             );
-        }
+        });
 
-        #[test]
-        fn test_mask_bitmask() {
+        glam_test!(test_mask_bitmask, {
             assert_eq!($mask::new(false, false, false, false).bitmask(), 0b0000);
             assert_eq!($mask::new(false, false, true, true).bitmask(), 0b1100);
             assert_eq!($mask::new(true, true, false, false).bitmask(), 0b0011);
             assert_eq!($mask::new(false, true, false, true).bitmask(), 0b1010);
             assert_eq!($mask::new(true, false, true, false).bitmask(), 0b0101);
             assert_eq!($mask::new(true, true, true, true).bitmask(), 0b1111);
-        }
+        });
 
-        #[test]
-        fn test_mask_any() {
+        glam_test!(test_mask_any, {
             assert_eq!($mask::new(false, false, false, false).any(), false);
             assert_eq!($mask::new(true, false, false, false).any(), true);
             assert_eq!($mask::new(false, true, false, false).any(), true);
             assert_eq!($mask::new(false, false, true, false).any(), true);
             assert_eq!($mask::new(false, false, false, true).any(), true);
-        }
+        });
 
-        #[test]
-        fn test_mask_all() {
+        glam_test!(test_mask_all, {
             assert_eq!($mask::new(true, true, true, true).all(), true);
             assert_eq!($mask::new(false, true, true, true).all(), false);
             assert_eq!($mask::new(true, false, true, true).all(), false);
             assert_eq!($mask::new(true, true, false, true).all(), false);
             assert_eq!($mask::new(true, true, true, false).all(), false);
-        }
+        });
 
-        #[test]
-        fn test_mask_select() {
+        glam_test!(test_mask_select, {
             let a = $vec4::new(1 as $t, 2 as $t, 3 as $t, 4 as $t);
             let b = $vec4::new(5 as $t, 6 as $t, 7 as $t, 8 as $t);
             assert_eq!(
@@ -385,10 +364,9 @@ macro_rules! impl_vec4_tests {
                 $vec4::select($mask::new(false, false, false, false), a, b),
                 $vec4::new(5 as $t, 6 as $t, 7 as $t, 8 as $t),
             );
-        }
+        });
 
-        #[test]
-        fn test_mask_and() {
+        glam_test!(test_mask_and, {
             assert_eq!(
                 ($mask::new(false, false, false, false) & $mask::new(false, false, false, false))
                     .bitmask(),
@@ -412,10 +390,9 @@ macro_rules! impl_vec4_tests {
             let mut mask = $mask::new(true, true, false, false);
             mask &= $mask::new(true, false, true, false);
             assert_eq!(mask.bitmask(), 0b0001);
-        }
+        });
 
-        #[test]
-        fn test_mask_or() {
+        glam_test!(test_mask_or, {
             assert_eq!(
                 ($mask::new(false, false, false, false) | $mask::new(false, false, false, false))
                     .bitmask(),
@@ -439,18 +416,16 @@ macro_rules! impl_vec4_tests {
             let mut mask = $mask::new(true, true, false, false);
             mask |= $mask::new(true, false, true, false);
             assert_eq!(mask.bitmask(), 0b0111);
-        }
+        });
 
-        #[test]
-        fn test_mask_not() {
+        glam_test!(test_mask_not, {
             assert_eq!((!$mask::new(false, false, false, false)).bitmask(), 0b1111);
             assert_eq!((!$mask::new(true, true, true, true)).bitmask(), 0b0000);
             assert_eq!((!$mask::new(true, false, true, false)).bitmask(), 0b1010);
             assert_eq!((!$mask::new(false, true, false, true)).bitmask(), 0b0101);
-        }
+        });
 
-        #[test]
-        fn test_mask_fmt() {
+        glam_test!(test_mask_fmt, {
             let a = $mask::new(true, false, true, false);
 
             assert_eq!(format!("{}", a), "[true, false, true, false]");
@@ -458,10 +433,9 @@ macro_rules! impl_vec4_tests {
             //     format!("{:?}", a),
             //     format!("{}(0xffffffff, 0x0, 0xffffffff, 0x0)", stringify!($mask))
             // );
-        }
+        });
 
-        #[test]
-        fn test_mask_eq() {
+        glam_test!(test_mask_eq, {
             let a = $mask::new(true, false, true, false);
             let b = $mask::new(true, false, true, false);
             let c = $mask::new(false, true, true, false);
@@ -470,10 +444,9 @@ macro_rules! impl_vec4_tests {
             assert_eq!(b, a);
             assert_ne!(a, c);
             assert_ne!(b, c);
-        }
+        });
 
-        #[test]
-        fn test_mask_hash() {
+        glam_test!(test_mask_hash, {
             use std::collections::hash_map::DefaultHasher;
             use std::hash::Hash;
             use std::hash::Hasher;
@@ -498,29 +471,26 @@ macro_rules! impl_vec4_tests {
             assert_eq!(a_hashed, b_hashed);
             assert_ne!(a, c);
             assert_ne!(a_hashed, c_hashed);
-        }
+        });
 
-        #[test]
-        fn test_to_from_slice() {
+        glam_test!(test_to_from_slice, {
             let v = $vec4::new(1 as $t, 2 as $t, 3 as $t, 4 as $t);
             let mut a = [0 as $t, 0 as $t, 0 as $t, 0 as $t];
             v.write_to_slice(&mut a);
             assert_eq!(v, $vec4::from_slice(&a));
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_sum() {
+        glam_test!(test_sum, {
             let one = $vec4::ONE;
             assert_eq!(vec![one, one].iter().sum::<$vec4>(), one + one);
-        }
+        });
 
         #[cfg(feature = "std")]
-        #[test]
-        fn test_product() {
+        glam_test!(test_product, {
             let two = $vec4::new(2 as $t, 2 as $t, 2 as $t, 2 as $t);
             assert_eq!(vec![two, two].iter().product::<$vec4>(), two * two);
-        }
+        });
     };
 }
 
@@ -528,14 +498,12 @@ macro_rules! impl_vec4_signed_tests {
     ($t:ident, $const_new:ident, $new:ident, $vec4:ident, $vec3:ident, $vec2:ident, $mask:ident) => {
         impl_vec4_tests!($t, $const_new, $new, $vec4, $vec3, $vec2, $mask);
 
-        #[test]
-        fn test_neg() {
+        glam_test!(test_neg, {
             let a = $new(1 as $t, 2 as $t, 3 as $t, 4 as $t);
             assert_eq!((-1 as $t, -2 as $t, -3 as $t, -4 as $t), (-a).into());
-        }
+        });
 
-        #[test]
-        fn test_dot_signed() {
+        glam_test!(test_dot_signed, {
             let x = $new(1 as $t, 0 as $t, 0 as $t, 0 as $t);
             let y = $new(0 as $t, 1 as $t, 0 as $t, 0 as $t);
             let z = $new(0 as $t, 0 as $t, 1 as $t, 0 as $t);
@@ -544,14 +512,13 @@ macro_rules! impl_vec4_signed_tests {
             assert_eq!(0 as $t, x.dot(y));
             assert_eq!(0 as $t, x.dot(-z));
             assert_eq!(-1 as $t, w.dot(-w));
-        }
+        });
     };
 }
 
 macro_rules! impl_vec4_eq_hash_tests {
     ($t:ident, $new:ident) => {
-        #[test]
-        fn test_ve2_hash() {
+        glam_test!(test_ve2_hash, {
             use std::collections::hash_map::DefaultHasher;
             use std::hash::Hash;
             use std::hash::Hasher;
@@ -576,7 +543,7 @@ macro_rules! impl_vec4_eq_hash_tests {
             assert_eq!(a_hashed, b_hashed);
             assert_ne!(a, c);
             assert_ne!(a_hashed, c_hashed);
-        }
+        });
     };
 }
 
@@ -589,8 +556,7 @@ macro_rules! impl_vec4_float_tests {
         use core::$t::NAN;
         use core::$t::NEG_INFINITY;
 
-        #[test]
-        fn test_funcs() {
+        glam_test!(test_funcs, {
             let x = $new(1.0, 0.0, 0.0, 0.0);
             let y = $new(0.0, 1.0, 0.0, 0.0);
             let z = $new(0.0, 0.0, 1.0, 0.0);
@@ -635,10 +601,9 @@ macro_rules! impl_vec4_float_tests {
                 $new(0.5, 0.25, 0.125, 0.0625),
                 $new(2.0, 4.0, 8.0, 16.0).recip()
             );
-        }
+        });
 
-        #[test]
-        fn test_project_reject() {
+        glam_test!(test_project_reject, {
             assert_eq!(
                 $new(0.0, 0.0, 0.0, 1.0),
                 $new(0.0, 1.0, 0.0, 1.0).project_onto($new(0.0, 0.0, 0.0, 2.0))
@@ -659,10 +624,9 @@ macro_rules! impl_vec4_float_tests {
             should_glam_assert!({ $vec4::ONE.reject_from($vec4::ZERO) });
             should_glam_assert!({ $vec4::ONE.project_onto_normalized($vec4::ONE) });
             should_glam_assert!({ $vec4::ONE.reject_from_normalized($vec4::ONE) });
-        }
+        });
 
-        #[test]
-        fn test_signum() {
+        glam_test!(test_signum, {
             assert_eq!($vec4::ZERO.signum(), $vec4::ONE);
             assert_eq!(-$vec4::ZERO.signum(), -$vec4::ONE);
             assert_eq!($vec4::ONE.signum(), $vec4::ONE);
@@ -670,17 +634,15 @@ macro_rules! impl_vec4_float_tests {
             assert_eq!($vec4::splat(INFINITY).signum(), $vec4::ONE);
             assert_eq!($vec4::splat(NEG_INFINITY).signum(), -$vec4::ONE);
             assert!($vec4::splat(NAN).signum().is_nan_mask().all());
-        }
+        });
 
-        #[test]
-        fn test_abs() {
+        glam_test!(test_abs, {
             assert_eq!($vec4::ZERO.abs(), $vec4::ZERO);
             assert_eq!($vec4::ONE.abs(), $vec4::ONE);
             assert_eq!((-$vec4::ONE).abs(), $vec4::ONE);
-        }
+        });
 
-        #[test]
-        fn test_round() {
+        glam_test!(test_round, {
             assert_eq!($vec4::new(1.35, 0.0, 0.0, 0.0).round().x, 1.0);
             assert_eq!($vec4::new(0.0, 1.5, 0.0, 0.0).round().y, 2.0);
             assert_eq!($vec4::new(0.0, 0.0, -15.5, 0.0).round().z, -16.0);
@@ -693,10 +655,9 @@ macro_rules! impl_vec4_float_tests {
                 $vec4::new(NEG_INFINITY, INFINITY, 1.0, -1.0)
             );
             assert!($vec4::new(NAN, 0.0, 0.0, 1.0).round().x.is_nan());
-        }
+        });
 
-        #[test]
-        fn test_floor() {
+        glam_test!(test_floor, {
             assert_eq!(
                 $vec4::new(1.35, 1.5, -1.5, 1.999).floor(),
                 $vec4::new(1.0, 1.0, -2.0, 1.0)
@@ -710,10 +671,9 @@ macro_rules! impl_vec4_float_tests {
                 $vec4::new(-0.0, -2000000.123, 10000000.123, 1000.9).floor(),
                 $vec4::new(-0.0, -2000001.0, 10000000.0, 1000.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_fract() {
+        glam_test!(test_fract, {
             assert_approx_eq!(
                 $vec4::new(1.35, 1.5, -1.5, 1.999).fract(),
                 $vec4::new(0.35, 0.5, 0.5, 0.999)
@@ -723,10 +683,9 @@ macro_rules! impl_vec4_float_tests {
                 $vec4::new(0.0, 0.877, 0.123, 0.9),
                 0.002
             );
-        }
+        });
 
-        #[test]
-        fn test_ceil() {
+        glam_test!(test_ceil, {
             assert_eq!(
                 $vec4::new(1.35, 1.5, -1.5, 1234.1234).ceil(),
                 $vec4::new(2.0, 2.0, -1.0, 1235.0)
@@ -740,37 +699,33 @@ macro_rules! impl_vec4_float_tests {
                 $vec4::new(-1234.1234, -2000000.123, 1000000.123, 1000.9).ceil(),
                 $vec4::new(-1234.0, -2000000.0, 1000001.0, 1001.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_lerp() {
+        glam_test!(test_lerp, {
             let v0 = $vec4::new(-1.0, -1.0, -1.0, -1.0);
             let v1 = $vec4::new(1.0, 1.0, 1.0, 1.0);
             assert_approx_eq!(v0, v0.lerp(v1, 0.0));
             assert_approx_eq!(v1, v0.lerp(v1, 1.0));
             assert_approx_eq!($vec4::ZERO, v0.lerp(v1, 0.5));
-        }
+        });
 
-        #[test]
-        fn test_is_finite() {
+        glam_test!(test_is_finite, {
             assert!($vec4::new(0.0, 0.0, 0.0, 0.0).is_finite());
             assert!($vec4::new(-1e-10, 1.0, 1e10, 42.0).is_finite());
             assert!(!$vec4::new(INFINITY, 0.0, 0.0, 0.0).is_finite());
             assert!(!$vec4::new(0.0, NAN, 0.0, 0.0).is_finite());
             assert!(!$vec4::new(0.0, 0.0, NEG_INFINITY, 0.0).is_finite());
             assert!(!$vec4::new(0.0, 0.0, 0.0, NAN).is_finite());
-        }
+        });
 
-        #[test]
-        fn test_powf() {
+        glam_test!(test_powf, {
             assert_eq!(
                 $vec4::new(2.0, 4.0, 8.0, 16.0).powf(2.0),
                 $vec4::new(4.0, 16.0, 64.0, 256.0)
             );
-        }
+        });
 
-        #[test]
-        fn test_exp() {
+        glam_test!(test_exp, {
             assert_eq!(
                 $vec4::new(1.0, 2.0, 3.0, 4.0).exp(),
                 $vec4::new(
@@ -780,10 +735,9 @@ macro_rules! impl_vec4_float_tests {
                     (4.0 as $t).exp()
                 )
             );
-        }
+        });
 
-        #[test]
-        fn test_clamp_length() {
+        glam_test!(test_clamp_length, {
             // Too long gets shortened
             assert_eq!(
                 $vec4::new(12.0, 16.0, 0.0, 0.0).clamp_length(7.0, 10.0),
@@ -800,10 +754,9 @@ macro_rules! impl_vec4_float_tests {
                 $vec4::new(6.0, 8.0, 0.0, 0.0) // lengthened to length 10.0
             );
             should_glam_assert!({ $vec4::ONE.clamp_length(1.0, 0.0) });
-        }
+        });
 
-        #[test]
-        fn test_clamp_length_max() {
+        glam_test!(test_clamp_length_max, {
             // Too long gets shortened
             assert_eq!(
                 $vec4::new(12.0, 16.0, 0.0, 0.0).clamp_length_max(10.0),
@@ -814,10 +767,9 @@ macro_rules! impl_vec4_float_tests {
                 $vec4::new(2.0, 1.0, 0.0, 0.0).clamp_length_max(5.0),
                 $vec4::new(2.0, 1.0, 0.0, 0.0) // unchanged
             );
-        }
+        });
 
-        #[test]
-        fn test_clamp_length_min() {
+        glam_test!(test_clamp_length_min, {
             // Not too short is unchanged
             assert_eq!(
                 $vec4::new(2.0, 1.0, 0.0, 0.0).clamp_length_min(0.5),
@@ -828,7 +780,7 @@ macro_rules! impl_vec4_float_tests {
                 $vec4::new(0.6, 0.8, 0.0, 0.0).clamp_length_min(10.0),
                 $vec4::new(6.0, 8.0, 0.0, 0.0) // lengthened to length 10.0
             );
-        }
+        });
     };
 }
 
@@ -841,8 +793,7 @@ mod vec4 {
     #[cfg(any(not(target_feature = "sse2"), feature = "scalar-math"))]
     type Vec4Mask = glam::BVec4;
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(16, mem::size_of::<Vec4>());
         if cfg!(not(feature = "scalar-math")) {
@@ -857,7 +808,7 @@ mod vec4 {
             assert_eq!(4, mem::size_of::<Vec4Mask>());
             assert_eq!(1, mem::align_of::<Vec4Mask>());
         }
-    }
+    });
 
     #[cfg(all(target_feature = "sse2", not(feature = "scalar-math")))]
     #[test]
@@ -892,8 +843,7 @@ mod vec4 {
         assert_eq!([0xffffffff, 0, 0xffffffff, 0], a0.0);
     }
 
-    #[test]
-    fn test_as() {
+    glam_test!(test_as, {
         use glam::{DVec4, IVec4, UVec4};
         assert_eq!(
             DVec4::new(-1.0, -2.0, -3.0, -4.0),
@@ -940,10 +890,9 @@ mod vec4 {
             Vec4::new(1.0, 2.0, 3.0, 4.0),
             UVec4::new(1, 2, 3, 4).as_vec4()
         );
-    }
+    });
 
-    #[test]
-    fn test_vec3a() {
+    glam_test!(test_vec3a, {
         use glam::Vec3A;
         assert_eq!(
             Vec4::new(1.0, 2.0, 3.0, 4.0),
@@ -953,7 +902,7 @@ mod vec4 {
             Vec4::new(1.0, 2.0, 3.0, 4.0),
             Vec4::from((1.0, Vec3A::new(2.0, 3.0, 4.0)))
         );
-    }
+    });
 
     impl_vec4_float_tests!(f32, const_vec4, vec4, Vec4, Vec3, Vec2, Vec4Mask);
 }
@@ -961,14 +910,13 @@ mod vec4 {
 mod dvec4 {
     use glam::{const_dvec4, dvec4, BVec4, DVec2, DVec3, DVec4};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(32, mem::size_of::<DVec4>());
         assert_eq!(mem::align_of::<f64>(), mem::align_of::<DVec4>());
         assert_eq!(4, mem::size_of::<BVec4>());
         assert_eq!(1, mem::align_of::<BVec4>());
-    }
+    });
 
     impl_vec4_float_tests!(f64, const_dvec4, dvec4, DVec4, DVec3, DVec2, BVec4);
 }
@@ -976,14 +924,13 @@ mod dvec4 {
 mod ivec4 {
     use glam::{const_ivec4, ivec4, BVec4, IVec2, IVec3, IVec4};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(16, mem::size_of::<IVec4>());
         assert_eq!(4, mem::align_of::<IVec4>());
         assert_eq!(4, mem::size_of::<BVec4>());
         assert_eq!(1, mem::align_of::<BVec4>());
-    }
+    });
 
     impl_vec4_signed_tests!(i32, const_ivec4, ivec4, IVec4, IVec3, IVec2, BVec4);
     impl_vec4_eq_hash_tests!(i32, ivec4);
@@ -992,14 +939,13 @@ mod ivec4 {
 mod uvec4 {
     use glam::{const_uvec4, uvec4, BVec4, UVec2, UVec3, UVec4};
 
-    #[test]
-    fn test_align() {
+    glam_test!(test_align, {
         use std::mem;
         assert_eq!(16, mem::size_of::<UVec4>());
         assert_eq!(4, mem::align_of::<UVec4>());
         assert_eq!(4, mem::size_of::<BVec4>());
         assert_eq!(1, mem::align_of::<BVec4>());
-    }
+    });
 
     impl_vec4_tests!(u32, const_uvec4, uvec4, UVec4, UVec3, UVec2, BVec4);
     impl_vec4_eq_hash_tests!(u32, uvec4);