@@ -5,7 +5,7 @@ use rustc_span::create_default_session_globals_then;
55fn test_block_doc_comment_1 ( ) {
66 create_default_session_globals_then ( || {
77 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 ) ;
99 assert_eq ! ( stripped. as_str( ) , " Test \n * Test\n Test" ) ;
1010 } )
1111}
@@ -14,7 +14,7 @@ fn test_block_doc_comment_1() {
1414fn test_block_doc_comment_2 ( ) {
1515 create_default_session_globals_then ( || {
1616 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 ) ;
1818 assert_eq ! ( stripped. as_str( ) , " Test\n Test" ) ;
1919 } )
2020}
@@ -23,21 +23,21 @@ fn test_block_doc_comment_2() {
2323fn test_block_doc_comment_3 ( ) {
2424 create_default_session_globals_then ( || {
2525 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 ) ;
2727 assert_eq ! ( stripped. as_str( ) , " let a: *i32;\n *a = 5;" ) ;
2828 } )
2929}
3030
3131#[ test]
3232fn test_line_doc_comment ( ) {
3333 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 ) ;
3535 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 ) ;
3737 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 ) ;
3939 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 ) ;
4141 assert_eq ! ( stripped. as_str( ) , "!test" ) ;
4242 } )
4343}
0 commit comments