Skip to content

Commit 647683b

Browse files
committed
Add test marks
1 parent 09a4b78 commit 647683b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

crates/ra_ide/src/completion/presentation.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,14 @@ pub(crate) fn compute_score(
311311
name: &str,
312312
) -> Option<CompletionScore> {
313313
let (active_name, active_type) = if let Some(record_field) = &ctx.record_field_syntax {
314+
tested_by!(test_struct_field_completion_in_record_lit);
314315
let (struct_field, _local) = ctx.sema.resolve_record_field(record_field)?;
315316
(
316317
struct_field.name(ctx.db).to_string(),
317318
struct_field.signature_ty(ctx.db).display(ctx.db).to_string(),
318319
)
319320
} else if let Some(active_parameter) = &ctx.active_parameter {
321+
tested_by!(test_struct_field_completion_in_func_call);
320322
(active_parameter.name.clone(), active_parameter.ty.clone())
321323
} else {
322324
return None;
@@ -1072,6 +1074,7 @@ mod tests {
10721074

10731075
#[test]
10741076
fn test_struct_field_completion_in_func_call() {
1077+
covers!(test_struct_field_completion_in_func_call);
10751078
assert_debug_snapshot!(
10761079
do_reference_completion(
10771080
r"
@@ -1161,6 +1164,7 @@ mod tests {
11611164

11621165
#[test]
11631166
fn test_struct_field_completion_in_record_lit() {
1167+
covers!(test_struct_field_completion_in_func_call);
11641168
assert_debug_snapshot!(
11651169
do_reference_completion(
11661170
r"

crates/ra_ide/src/marks.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ test_utils::marks!(
99
search_filters_by_range
1010
dont_insert_macro_call_parens_unncessary
1111
self_fulfilling_completion
12+
test_struct_field_completion_in_func_call
13+
test_struct_field_completion_in_record_lit
1214
);

0 commit comments

Comments
 (0)