internal: switch some tests to minicore
This commit is contained in:
parent
7e0d441687
commit
7ba5482a04
@ -182,23 +182,17 @@ fn deref(&self) -> &Self::Target {
|
||||
);
|
||||
}
|
||||
|
||||
fn check_not_applicable(ra_fixture: &str) {
|
||||
let fixture = format!(
|
||||
"//- /main.rs crate:main deps:core,std\n{}\n{}",
|
||||
ra_fixture,
|
||||
FamousDefs::FIXTURE
|
||||
);
|
||||
check_assist_not_applicable(generate_deref, &fixture)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_generate_record_deref_not_applicable_if_already_impl() {
|
||||
cov_mark::check!(test_add_record_deref_impl_already_exists);
|
||||
check_not_applicable(
|
||||
r#"struct A { }
|
||||
check_assist_not_applicable(
|
||||
generate_deref,
|
||||
r#"
|
||||
//- minicore: deref
|
||||
struct A { }
|
||||
struct B { $0a: A }
|
||||
|
||||
impl std::ops::Deref for B {
|
||||
impl core::ops::Deref for B {
|
||||
type Target = A;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
@ -211,11 +205,14 @@ fn deref(&self) -> &Self::Target {
|
||||
#[test]
|
||||
fn test_generate_field_deref_not_applicable_if_already_impl() {
|
||||
cov_mark::check!(test_add_field_deref_impl_already_exists);
|
||||
check_not_applicable(
|
||||
r#"struct A { }
|
||||
check_assist_not_applicable(
|
||||
generate_deref,
|
||||
r#"
|
||||
//- minicore: deref
|
||||
struct A { }
|
||||
struct B($0A)
|
||||
|
||||
impl std::ops::Deref for B {
|
||||
impl core::ops::Deref for B {
|
||||
type Target = A;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
|
Loading…
Reference in New Issue
Block a user