use testutil::ToolchainVersion;
#[test]
#[cfg_attr(miri, ignore)]
fn ui() {
let version = ToolchainVersion::extract_from_pwd().unwrap();
let source_files_dirname = version.get_ui_source_files_dirname_and_maybe_print_warning();
let t = trybuild::TestCases::new();
t.compile_fail(format!("tests/{}/*.rs", source_files_dirname));
}
#[cfg(feature = "derive")]
#[test]
#[cfg_attr(miri, ignore)]
fn ui_invalid_impls() {
assert!(cfg!(feature = "derive"), "ui tests cannot be run without the `derive` feature");
let version = ToolchainVersion::extract_from_pwd().unwrap();
let source_files_dirname = version.get_ui_source_files_dirname_and_maybe_print_warning();
let t = trybuild::TestCases::new();
t.compile_fail(format!("tests/{}/invalid-impls/*.rs", source_files_dirname));
}