@@ -5,7 +5,7 @@ use rustc_span::create_default_session_globals_then;
5
5
fn test_block_doc_comment_1 ( ) {
6
6
create_default_session_globals_then ( || {
7
7
let comment = "\n * Test \n ** Test\n * Test\n " ;
8
- let stripped = beautify_doc_string ( Symbol :: intern ( comment) ) ;
8
+ let stripped = beautify_doc_string ( Symbol :: intern ( comment) , CommentKind :: Block ) ;
9
9
assert_eq ! ( stripped. as_str( ) , " Test \n * Test\n Test" ) ;
10
10
} )
11
11
}
@@ -14,7 +14,7 @@ fn test_block_doc_comment_1() {
14
14
fn test_block_doc_comment_2 ( ) {
15
15
create_default_session_globals_then ( || {
16
16
let comment = "\n * Test\n * Test\n " ;
17
- let stripped = beautify_doc_string ( Symbol :: intern ( comment) ) ;
17
+ let stripped = beautify_doc_string ( Symbol :: intern ( comment) , CommentKind :: Block ) ;
18
18
assert_eq ! ( stripped. as_str( ) , " Test\n Test" ) ;
19
19
} )
20
20
}
@@ -23,21 +23,21 @@ fn test_block_doc_comment_2() {
23
23
fn test_block_doc_comment_3 ( ) {
24
24
create_default_session_globals_then ( || {
25
25
let comment = "\n let a: *i32;\n *a = 5;\n " ;
26
- let stripped = beautify_doc_string ( Symbol :: intern ( comment) ) ;
26
+ let stripped = beautify_doc_string ( Symbol :: intern ( comment) , CommentKind :: Block ) ;
27
27
assert_eq ! ( stripped. as_str( ) , " let a: *i32;\n *a = 5;" ) ;
28
28
} )
29
29
}
30
30
31
31
#[ test]
32
32
fn test_line_doc_comment ( ) {
33
33
create_default_session_globals_then ( || {
34
- let stripped = beautify_doc_string ( Symbol :: intern ( " test" ) ) ;
34
+ let stripped = beautify_doc_string ( Symbol :: intern ( " test" ) , CommentKind :: Line ) ;
35
35
assert_eq ! ( stripped. as_str( ) , " test" ) ;
36
- let stripped = beautify_doc_string ( Symbol :: intern ( "! test" ) ) ;
36
+ let stripped = beautify_doc_string ( Symbol :: intern ( "! test" ) , CommentKind :: Line ) ;
37
37
assert_eq ! ( stripped. as_str( ) , "! test" ) ;
38
- let stripped = beautify_doc_string ( Symbol :: intern ( "test" ) ) ;
38
+ let stripped = beautify_doc_string ( Symbol :: intern ( "test" ) , CommentKind :: Line ) ;
39
39
assert_eq ! ( stripped. as_str( ) , "test" ) ;
40
- let stripped = beautify_doc_string ( Symbol :: intern ( "!test" ) ) ;
40
+ let stripped = beautify_doc_string ( Symbol :: intern ( "!test" ) , CommentKind :: Line ) ;
41
41
assert_eq ! ( stripped. as_str( ) , "!test" ) ;
42
42
} )
43
43
}
0 commit comments