@@ -288,18 +288,30 @@ fn test_class_name() {
288288 frames,
289289 [
290290 "<module>" ,
291+ // regular functions
291292 "normal_function" ,
292293 "normal_function_with_arg" ,
293294 "normal_function_with_non_arg_local_called_self" ,
294295 "normal_function_with_non_arg_local_called_cls" ,
295- "object.normal_function_with_a_confusing_self_arg" , // first arg confused with self - room for improvement
296- "object.normal_function_with_a_confusing_cls_arg" , // first arg confused with cls - room for improvement
297- "SomeClass.class_method" , // correctly recognised class
298- "class_method_confusing_first_arg" , // class arg name doesn't follow the convention - not recognised
299- "SomeClass.normal_method" , // correctly recognised class instance
300- "normal_method_confusing_first_arg" , // self arg name doesn't follow the convention - not recognised
296+ // first arg confused with an actual self arg - room for improvement
297+ "object.normal_function_with_a_confusing_self_arg" ,
298+ // first arg confused with cls - room for improvement
299+ "object.normal_function_with_a_confusing_cls_arg" ,
300+ // correctly recognised class (typical case)
301+ "SomeClass.class_method" ,
302+ // class arg name doesn't follow the convention - not recognised
303+ "class_method_confusing_first_arg" ,
304+ // correctly recognised class instance (typical case)
305+ "SomeClass.normal_method" ,
306+ // self arg name doesn't follow the convention - not recognised
307+ "normal_method_confusing_first_arg" ,
301308 ]
302309 ) ;
310+
311+ assert ! (
312+ trace. frames. iter( ) . all( |f| f. locals. is_none( ) ) ,
313+ "`--class-name` shouldn't imply `--locals`"
314+ ) ;
303315}
304316
305317#[ test]
@@ -405,7 +417,6 @@ fn test_local_vars_and_class_name() {
405417 assert_eq ! ( fn_frame. name, "ClassName.local_variable_lookup" ) ;
406418
407419 let locals = fn_frame. locals . as_ref ( ) . unwrap ( ) ;
408-
409420 assert_eq ! ( locals[ 0 ] . name, "self" ) ;
410421 assert_eq ! ( locals[ 0 ] . arg, true ) ;
411422 assert ! ( locals[ 0 ]
0 commit comments