You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Hover on field_name in search domain should show field name and field type"
138
138
);
139
-
let hover_code = test_utils::get_hover_markdown(&mut session,&file_symbol,&file_info,31,48).unwrap_or_default();
139
+
let hover_code = test_utils::get_hover_markdown(&mut session,&file_symbol,&file_info,33,48).unwrap_or_default();
140
140
assert!(
141
141
hover_code.contains("code: str"),
142
142
"Hover on field_name in search domain should show field name and field type"
143
143
);
144
144
145
145
// Hover on a variable assignment (baseInstance1)
146
-
let hover_var = test_utils::get_hover_markdown(&mut session,&file_symbol,&file_info,33,0).unwrap_or_default();
146
+
let hover_var = test_utils::get_hover_markdown(&mut session,&file_symbol,&file_info,35,0).unwrap_or_default();
147
147
assert!(
148
148
hover_var.contains("BaseTestModel"),
149
149
"Hover on variable should show type info"
@@ -200,13 +200,13 @@ fn test_definition() {
200
200
assert_eq!(file_mgr.borrow().text_range_to_range(&mut session,&module1_test_file, sym_compute_something[0].borrow().range()), compute_arg_locs[0].target_range,"Expected _compute_something to be at the same location as the compute argument");
201
201
202
202
// Test definition for model class BaseTestModel compute something in module_2, first on the super call
203
-
let compute_arg_locs = test_utils::get_definition_locs(&mut session,&m2_tf_file_symbol,&m2_tf_file_info,6,36);
203
+
let compute_arg_locs = test_utils::get_definition_locs(&mut session,&m2_tf_file_symbol,&m2_tf_file_info,10,36);
204
204
assert_eq!(compute_arg_locs.len(),1,"Expected 1 location for compute method '_compute_something'");
205
205
assert_eq!(compute_arg_locs[0].target_uri.to_file_path().unwrap().sanitize(), module1_test_file,"Expected location to be in module_1 file");
206
206
assert_eq!(file_mgr.borrow().text_range_to_range(&mut session,&module1_test_file, sym_compute_something[0].borrow().range()), compute_arg_locs[0].target_range,"Expected _compute_something to be at the same location as the compute argument");
207
207
208
208
// Then on the compute keyword argument in module_2, it should point to both methods in module_1 and module_2
209
-
let compute_kwarg_locs = test_utils::get_definition_locs(&mut session,&m2_tf_file_symbol,&m2_tf_file_info,3,50);
209
+
let compute_kwarg_locs = test_utils::get_definition_locs(&mut session,&m2_tf_file_symbol,&m2_tf_file_info,6,50);
210
210
assert_eq!(compute_kwarg_locs.len(),2,"Expected 2 locations for compute method '_compute_something'");
211
211
assert!(compute_kwarg_locs.iter().any(|loc| loc.target_uri.to_file_path().unwrap().sanitize() == module1_test_file),"Expected one location to be in module_1 file");
212
212
assert!(compute_kwarg_locs.iter().any(|loc| loc.target_uri.to_file_path().unwrap().sanitize() == module2_test_file),"Expected one location to be in module_2 file");
@@ -218,7 +218,7 @@ fn test_definition() {
218
218
assert!(compute_kwarg_locs.iter().any(|loc| file_mgr.borrow().text_range_to_range(&mut session,&module2_test_file, sym_compute_something_m2[0].borrow().range()) == loc.target_range),"Expected _compute_something to be at the same location as the compute keyword argument in module_2");
219
219
220
220
// Now test go to def of `partner_id.country_id.phone_code` on each field.
221
-
let partner_id_locs = test_utils::get_definition_locs(&mut session,&m1_tf_file_symbol,&m1_tf_file_info,31,25);
221
+
let partner_id_locs = test_utils::get_definition_locs(&mut session,&m1_tf_file_symbol,&m1_tf_file_info,33,25);
222
222
assert_eq!(partner_id_locs.len(),1,"Expected 1 location for partner_id");
223
223
assert_eq!(partner_id_locs[0].target_uri.to_file_path().unwrap().sanitize(), module1_test_file,"Expected location to be in the same file");
224
224
let sym_partner_id = m1_tf_file_symbol.borrow().get_symbol(&(vec![],vec![Sy!("BaseTestModel"),Sy!("partner_id")]), u32::MAX);
0 commit comments