From 750975e0a1694de581802f8f6a6fa41a376e44ba Mon Sep 17 00:00:00 2001 From: vic1707 <28602203+vic1707@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:43:59 +0200 Subject: [PATCH] add `tests` module around generated tests --- nutype_macros/src/common/gen/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nutype_macros/src/common/gen/mod.rs b/nutype_macros/src/common/gen/mod.rs index 650797c..0e48805 100644 --- a/nutype_macros/src/common/gen/mod.rs +++ b/nutype_macros/src/common/gen/mod.rs @@ -453,7 +453,11 @@ pub trait GenerateNewtype { #implementation #implement_traits - #tests + #[cfg(test)] + mod tests { + use super::*; + #tests + } } #reimports ))