Skip to content

Commit

Permalink
test all of the autocfg queries
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 24, 2022
1 parent d905901 commit 6d626f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test-cargo-miri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,16 @@ fn main() {
let a = autocfg::new();
assert!(a.probe_sysroot_crate("std"));
assert!(!a.probe_sysroot_crate("doesnotexist"));
assert!(a.probe_rustc_version(1, 0));
assert!(!a.probe_rustc_version(2, 0));
assert!(a.probe_type("i128"));
assert!(!a.probe_type("doesnotexist"));
assert!(a.probe_trait("Send"));
assert!(!a.probe_trait("doesnotexist"));
assert!(a.probe_path("std::num"));
assert!(!a.probe_path("doesnotexist"));
assert!(a.probe_constant("i32::MAX"));
assert!(!a.probe_constant("doesnotexist"));
assert!(a.probe_expression("Box::new(0)"));
assert!(!a.probe_expression("doesnotexist"));
}

0 comments on commit 6d626f9

Please sign in to comment.