@@ -2,50 +2,50 @@ use crate::lint::rules::tests::common::{set_up, assert_snippet};
22use crate :: lint:: rules:: RuleType ;
33
44
5- static CORRECT_BREAK_BEFORE_QUESTION_MARK : & str = "
5+ static BEFORE_QUESTION_MARK_CORRECT : & str = "
66method bootprep_type_to_string(uint8 prep_type) -> (const char*) {
77 return
88 prep_type == PREP_GENERAL
99 ? \" PrepGeneral\" : \" PrepEarly\" ;
1010}" ;
1111#[ test]
12- fn condexpr_correct_break_before_question_mark ( ) {
12+ fn before_question_mark_correct ( ) {
1313 let rules = set_up ( ) ;
1414 let expected_errors = vec ! [ ] ;
15- assert_snippet ( CORRECT_BREAK_BEFORE_QUESTION_MARK , expected_errors, & rules) ;
15+ assert_snippet ( BEFORE_QUESTION_MARK_CORRECT , expected_errors, & rules) ;
1616}
1717
18- static CORRECT_BREAK_BEFORE_COLON_AND_QUESTION_MARK : & str = "
18+ static BEFORE_COLON_AND_QUESTION_MARK_CORRECT : & str = "
1919method bootprep_type_to_string(uint8 prep_type) -> (const char*) {
2020 return
2121 prep_type == PREP_GENERAL
2222 ? \" PrepGeneral\"
2323 : \" PrepEarly\" ;
2424}" ;
2525#[ test]
26- fn condexpr_correct_break_after_colon_and_question_mark ( ) {
26+ fn after_colon_and_question_mark_correct ( ) {
2727 let rules = set_up ( ) ;
2828 let expected_errors = vec ! [ ] ;
29- assert_snippet ( CORRECT_BREAK_BEFORE_COLON_AND_QUESTION_MARK , expected_errors, & rules) ;
29+ assert_snippet ( BEFORE_COLON_AND_QUESTION_MARK_CORRECT , expected_errors, & rules) ;
3030}
3131
32- static BREAK_ONLY_BEFORE_COLON : & str = "
32+ static ONLY_BEFORE_COLON : & str = "
3333method harvest_resource() {
3434 harvest_resource(my->gas < GAS_THRESHOLD ? Rsrc_Gas
3535 : (my->minerals < MINERAL_THRESHOLD
3636 ? Rsrc_Minerals : nearest_resource()));
3737}" ;
3838#[ test]
39- fn condexpr_only_before_colon ( ) {
39+ fn only_before_colon ( ) {
4040 let rules = set_up ( ) ;
4141 let expected_errors = define_expected_errors ! (
4242 RuleType :: LL3 ,
4343 ( 3 , 3 , 21 , 22 ) ,
4444 ) ;
45- assert_snippet ( BREAK_ONLY_BEFORE_COLON , expected_errors, & rules) ;
45+ assert_snippet ( ONLY_BEFORE_COLON , expected_errors, & rules) ;
4646}
4747
48- static CORRECT_NESTED : & str = "
48+ static NESTED_CORRECT : & str = "
4949method bootprep_type_to_string(uint8 prep_type) -> (const char*) {
5050 return
5151 prep_type == PREP_GENERAL
@@ -54,13 +54,13 @@ method bootprep_type_to_string(uint8 prep_type) -> (const char*) {
5454 ? \" PrepEarly\" : \" UnknownBootPrepType\" ;
5555}" ;
5656#[ test]
57- fn condexpr_correct_nested ( ) {
57+ fn nested_correct ( ) {
5858 let rules = set_up ( ) ;
5959 let expected_errors = vec ! [ ] ;
60- assert_snippet ( CORRECT_NESTED , expected_errors, & rules) ;
60+ assert_snippet ( NESTED_CORRECT , expected_errors, & rules) ;
6161}
6262
63- static BREAK_AFTER_OPERATORS_NESTED : & str = "
63+ static AFTER_OPERATORS_NESTED : & str = "
6464method bootprep_type_to_string(uint8 prep_type) -> (const char*) {
6565 return
6666 prep_type == PREP_GENERAL ?
@@ -69,14 +69,14 @@ method bootprep_type_to_string(uint8 prep_type) -> (const char*) {
6969 \" UnknownBootPrepType\" ;
7070}" ;
7171#[ test]
72- fn condexpr_broken_after_operators_nested ( ) {
72+ fn after_operators_nested ( ) {
7373 let rules = set_up ( ) ;
7474 let expected_errors = define_expected_errors ! (
7575 RuleType :: LL3 ,
7676 ( 3 , 3 , 34 , 35 ) ,
7777 ( 4 , 4 , 22 , 23 ) ,
7878 ( 5 , 5 , 46 , 47 ) ,
7979 ) ;
80- assert_snippet ( BREAK_AFTER_OPERATORS_NESTED , expected_errors, & rules) ;
80+ assert_snippet ( AFTER_OPERATORS_NESTED , expected_errors, & rules) ;
8181}
8282
0 commit comments