File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
formatTest/unit_tests/input Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change 11/*
22 * Multiline comment
33 */
4-
54/*
65
76
109/*
1110 * Multiline comment with a // single line comment
1211 */
12+
1313// Single line comment
1414let testPostComment = "" ;
1515// let commentedCode = "";
1616
17- // Test inter-code comments
17+ // Test: inter-code comments
1818let testMultiline a => switch a {
1919 // single line comment
2020 | ` Thingy x => {
@@ -30,13 +30,11 @@ let testMultiline a => switch a {
3030 // single line comment below
3131};
3232
33-
3433/* short comment */
3534let x = [
3635 "test" ,
3736] ;
3837
39-
4038/* short comment */
4139let x = {
4240 // /* */
@@ -45,15 +43,14 @@ let x = {
4543
4644// /* this is a valid nested comment*/ this is a valid comment
4745
48-
49- // valid /* this is a valid comment */
46+ // valid /* this is also a valid nested comment */
5047
5148let z = 10 ;
5249
53-
54-
50+ // /////////////////////////////////////////////////////////////////////////////////
5551// The following tests will test the conversion of /* */ to single line
5652// comments as well as the wrapping of interleaved comments within short sequences.
53+ // /////////////////////////////////////////////////////////////////////////////////
5754
5855/*
5956 * Test wrapping every form of named arguments where various parts are
@@ -173,4 +170,18 @@ let defOptionalAnnot
173170 /* 10; */
174171 10 ;
175172
173+ // This tests a short inline comment that should retain it's inline properties when formatted
174+ let x = [
175+ /* sh */
176+ "te" ,
177+ ] ;
178+
179+ // This tests a line comment that should be converted to an inline comment when formatted
180+ let x = [
181+ // sh
182+ "te" ,
183+ ] ;
184+
185+
186+
176187
You can’t perform that action at this time.
0 commit comments