Skip to content

Commit 9adc474

Browse files
committed
update tests
1 parent d0b8073 commit 9adc474

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

formatTest/unit_tests/input/comments.re

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
22
* Multiline comment
33
*/
4-
54
/*
65
76
@@ -10,11 +9,12 @@
109
/*
1110
* Multiline comment with a // single line comment
1211
*/
12+
1313
// Single line comment
1414
let testPostComment = "";
1515
// let commentedCode = "";
1616

17-
// Test inter-code comments
17+
// Test: inter-code comments
1818
let 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 */
3534
let x = [
3635
"test",
3736
];
3837

39-
4038
/* short comment */
4139
let 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

5148
let 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

0 commit comments

Comments
 (0)