@@ -19,6 +19,7 @@ mod test_fmt {
1919 space_from_label_block : 1 ,
2020 space_from_start_end_block : 1 ,
2121 colon_after_label : true ,
22+ fixed_body_comment_indent : true ,
2223 } ;
2324
2425 const NO_COLON_STYLE : FormatStyle = FormatStyle {
@@ -31,6 +32,20 @@ mod test_fmt {
3132 space_from_label_block : 1 ,
3233 space_from_start_end_block : 1 ,
3334 colon_after_label : false ,
35+ fixed_body_comment_indent : true ,
36+ } ;
37+
38+ const FLEXIBLE_BODY_COMMENT_INDENT : FormatStyle = FormatStyle {
39+ indent_directive : 3 ,
40+ indent_instruction : 4 ,
41+ indent_label : 0 ,
42+ indent_min_comment_from_block : 1 ,
43+ space_block_to_comment : 1 ,
44+ space_comment_stick_to_body : 0 ,
45+ space_from_label_block : 1 ,
46+ space_from_start_end_block : 1 ,
47+ colon_after_label : true ,
48+ fixed_body_comment_indent : false ,
3449 } ;
3550
3651 fn assert_true ( style : & FormatStyle , path : & ' static str ) {
@@ -108,4 +123,12 @@ mod test_fmt {
108123 fn test_no_colon_labels ( ) {
109124 assert_true ( & NO_COLON_STYLE , "fmt/no_colon_labels.asm" )
110125 }
126+
127+ #[ test]
128+ fn test_flexible_block_comment_indent ( ) {
129+ assert_true (
130+ & FLEXIBLE_BODY_COMMENT_INDENT ,
131+ "fmt/flexible_comment_indent.asm" ,
132+ )
133+ }
111134}
0 commit comments