From 38d970d5a02f4fa91f5e6148004a2241838cf57d Mon Sep 17 00:00:00 2001 From: Dmytro Kriuchkov <75734980+BigglesworthCat@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:09:31 +0300 Subject: [PATCH] NOT READY: Fix `phantom` tests (#1403) macro_tools : phantom testing under feature --- module/core/derive_tools/tests/inc/mod.rs | 18 +++++++++++------- .../tests/inc/phantom/compiletime/enum.rs | 2 +- .../inc/phantom/compiletime/invariant_type.rs | 2 +- module/core/derive_tools/tests/tests.rs | 2 ++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/module/core/derive_tools/tests/inc/mod.rs b/module/core/derive_tools/tests/inc/mod.rs index c0817b4d86..36c16aa17c 100644 --- a/module/core/derive_tools/tests/inc/mod.rs +++ b/module/core/derive_tools/tests/inc/mod.rs @@ -278,15 +278,19 @@ mod phantom_tests mod contravariant_type_manual; mod send_sync_type; mod send_sync_type_manual; - #[ test_tools::nightly ] - #[ test ] - fn phantom_trybuild() + + only_for_terminal_module! { + #[ test_tools::nightly ] + #[ test ] + fn phantom_trybuild() + { - println!( "current_dir : {:?}", std::env::current_dir().unwrap() ); - let t = test_tools::compiletime::TestCases::new(); + println!( "current_dir : {:?}", std::env::current_dir().unwrap() ); + let t = test_tools::compiletime::TestCases::new(); - t.compile_fail( "tests/inc/phantom/compiletime/enum.rs" ); - t.compile_fail( "tests/inc/phantom/compiletime/invariant_type.rs" ); + t.compile_fail( "tests/inc/phantom/compiletime/enum.rs" ); + t.compile_fail( "tests/inc/phantom/compiletime/invariant_type.rs" ); + } } } diff --git a/module/core/derive_tools/tests/inc/phantom/compiletime/enum.rs b/module/core/derive_tools/tests/inc/phantom/compiletime/enum.rs index fa8f131612..f3aea8bc03 100644 --- a/module/core/derive_tools/tests/inc/phantom/compiletime/enum.rs +++ b/module/core/derive_tools/tests/inc/phantom/compiletime/enum.rs @@ -1,4 +1,4 @@ -use derive_tools_meta::phantom; +use derive_tools::phantom; #[ phantom ] enum Enum< T > diff --git a/module/core/derive_tools/tests/inc/phantom/compiletime/invariant_type.rs b/module/core/derive_tools/tests/inc/phantom/compiletime/invariant_type.rs index 7febb58d57..feea6184c6 100644 --- a/module/core/derive_tools/tests/inc/phantom/compiletime/invariant_type.rs +++ b/module/core/derive_tools/tests/inc/phantom/compiletime/invariant_type.rs @@ -1,4 +1,4 @@ -use derive_tools_meta::phantom; +use derive_tools::phantom; #[ phantom ] struct InvariantType< T > diff --git a/module/core/derive_tools/tests/tests.rs b/module/core/derive_tools/tests/tests.rs index 766eadcfe7..3475251921 100644 --- a/module/core/derive_tools/tests/tests.rs +++ b/module/core/derive_tools/tests/tests.rs @@ -1,4 +1,6 @@ +include!( "../../../../module/step/meta/src/module/terminal.rs" ); + #[ allow( unused_imports ) ] use derive_tools as the_module; #[ allow( unused_imports ) ]