From bfb89fbe460c2d47b6204a001c9981bc66aba554 Mon Sep 17 00:00:00 2001 From: Albert Meltzer <7529386+kitbellew@users.noreply.github.com> Date: Mon, 27 Dec 2021 16:40:09 -0800 Subject: [PATCH] Add tests with comments at opt-braces region end --- .../src/test/resources/unit/Comment.stat | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/scalafmt-tests/src/test/resources/unit/Comment.stat b/scalafmt-tests/src/test/resources/unit/Comment.stat index 1fb4e390d2..21ee6871df 100644 --- a/scalafmt-tests/src/test/resources/unit/Comment.stat +++ b/scalafmt-tests/src/test/resources/unit/Comment.stat @@ -853,3 +853,43 @@ for { case Left(error) => FC.raiseError(error) } } yield foo +<<< wrapping in optional braces 1 +maxColumn = 20 +runner.dialect = scala3 +indent.callSite = 2 +align.preset = none +comments.wrap = trailing +=== +object a: + def foo = + bar + baz /* comment1 comment2 + * comment3 */ + val qux = foo +>>> +object a: + def foo = + bar + baz /* comment1 + * comment2 + * comment3 */ + val qux = foo +<<< wrapping in optional braces 2 +maxColumn = 20 +runner.dialect = scala3 +indent.callSite = 2 +align.preset = none +comments.wrap = trailing +=== +object a: + def foo = + bar + baz /* comment1 comment2 + * comment3 */ +>>> +object a: + def foo = + bar + baz /* comment1 + * comment2 + * comment3 */