From 9adc474b21344ecb97d84e8386b3395c84f8e425 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 12 Apr 2016 16:08:02 -0700 Subject: [PATCH] update tests --- formatTest/unit_tests/input/comments.re | 27 +++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/formatTest/unit_tests/input/comments.re b/formatTest/unit_tests/input/comments.re index 0127a753a..f713c2903 100644 --- a/formatTest/unit_tests/input/comments.re +++ b/formatTest/unit_tests/input/comments.re @@ -1,7 +1,6 @@ /* * Multiline comment */ - /* @@ -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 => { @@ -30,13 +30,11 @@ let testMultiline a => switch a { // single line comment below }; - /* short comment */ let x = [ "test", ]; - /* short comment */ let x = { // /* */ @@ -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 @@ -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", +]; + + +