diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-15 15:39:34 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-15 15:39:34 +0000 |
commit | b8a85e960398ebab4624574f9c2ed9c655612d56 (patch) | |
tree | 3f094d444b42e9d9d953bcf192d68441eea730c6 /crates/proc_macro_srv | |
parent | 106a5abbef7fb07bf65a173fc5e53e46fb207af7 (diff) | |
parent | a8c9c882921c052be4e8ef65557c2946d013e425 (diff) |
Merge #8033
8033: Add test for proc-macro meta info retrieval r=edwin0cheng a=edwin0cheng
bors r+
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/proc_macro_srv')
-rw-r--r-- | crates/proc_macro_srv/src/tests/mod.rs | 7 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/tests/utils.rs | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/crates/proc_macro_srv/src/tests/mod.rs b/crates/proc_macro_srv/src/tests/mod.rs index fd54f8dfd..b4ab4c077 100644 --- a/crates/proc_macro_srv/src/tests/mod.rs +++ b/crates/proc_macro_srv/src/tests/mod.rs | |||
@@ -56,3 +56,10 @@ DummyTrait [CustomDerive]"#, | |||
56 | &res | 56 | &res |
57 | ); | 57 | ); |
58 | } | 58 | } |
59 | |||
60 | #[test] | ||
61 | fn test_version_check() { | ||
62 | let path = fixtures::dylib_path("proc_macro_test", "0.0.0"); | ||
63 | let info = proc_macro_api::read_dylib_info(&path).unwrap(); | ||
64 | assert!(info.version.1 >= 50); | ||
65 | } | ||
diff --git a/crates/proc_macro_srv/src/tests/utils.rs b/crates/proc_macro_srv/src/tests/utils.rs index 0484c3af4..f15381f0f 100644 --- a/crates/proc_macro_srv/src/tests/utils.rs +++ b/crates/proc_macro_srv/src/tests/utils.rs | |||
@@ -6,7 +6,7 @@ use proc_macro_api::ListMacrosTask; | |||
6 | use std::str::FromStr; | 6 | use std::str::FromStr; |
7 | use test_utils::assert_eq_text; | 7 | use test_utils::assert_eq_text; |
8 | 8 | ||
9 | mod fixtures { | 9 | pub mod fixtures { |
10 | use cargo_metadata::Message; | 10 | use cargo_metadata::Message; |
11 | use std::path::PathBuf; | 11 | use std::path::PathBuf; |
12 | use std::process::Command; | 12 | use std::process::Command; |