Skip to content

Commit

Permalink
NOT READY: Fix phantom tests (#1403)
Browse files Browse the repository at this point in the history
macro_tools : phantom testing under feature
  • Loading branch information
BigglesworthCat authored Jul 3, 2024
1 parent 879afb9 commit 38d970d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
18 changes: 11 additions & 7 deletions module/core/derive_tools/tests/inc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use derive_tools_meta::phantom;
use derive_tools::phantom;

#[ phantom ]
enum Enum< T >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use derive_tools_meta::phantom;
use derive_tools::phantom;

#[ phantom ]
struct InvariantType< T >
Expand Down
2 changes: 2 additions & 0 deletions module/core/derive_tools/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

include!( "../../../../module/step/meta/src/module/terminal.rs" );

#[ allow( unused_imports ) ]
use derive_tools as the_module;
#[ allow( unused_imports ) ]
Expand Down

0 comments on commit 38d970d

Please sign in to comment.