Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dxu committed Apr 13, 2016
1 parent d0b8073 commit 9adc474
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions formatTest/unit_tests/input/comments.re
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Multiline comment
*/

/*
Expand All @@ -10,11 +9,12 @@
/*
* Multiline comment with a // single line comment
*/

// Single line comment
let testPostComment = "";
// let commentedCode = "";

// Test inter-code comments
// Test: inter-code comments
let testMultiline a => switch a {
// single line comment
| `Thingy x => {
Expand All @@ -30,13 +30,11 @@ let testMultiline a => switch a {
// single line comment below
};


/* short comment */
let x = [
"test",
];


/* short comment */
let x = {
// /* */
Expand All @@ -45,15 +43,14 @@ let x = {

// /* this is a valid nested comment*/ this is a valid comment


// valid /* this is a valid comment */
// valid /* this is also a valid nested comment */

let z = 10;



///////////////////////////////////////////////////////////////////////////////////
// The following tests will test the conversion of /* */ to single line
// comments as well as the wrapping of interleaved comments within short sequences.
///////////////////////////////////////////////////////////////////////////////////

/*
* Test wrapping every form of named arguments where various parts are
Expand Down Expand Up @@ -173,4 +170,18 @@ let defOptionalAnnot
/* 10; */
10;

// This tests a short inline comment that should retain it's inline properties when formatted
let x = [
/* sh */
"te",
];

// This tests a line comment that should be converted to an inline comment when formatted
let x = [
// sh
"te",
];




0 comments on commit 9adc474

Please sign in to comment.