Tweak dumbindent.breakAfterBrace

This commit is contained in:
Nigel Tao committed 2020-06-09 22:45:40 +10:00
1 parent 63c12cad17
commit 8bd30e912c
2 files changed
+49 -18

No files matched your search

+8
View File
@@ -79,6 +79,14 @@ func TestFormatBytes(tt *testing.T) {
// Namespaces.
src: "namespace A {\nint f() {\nreturn 0;\n}\n}\n",
want: "namespace A {\nint f() {\n return 0;\n}\n}\n",
}, {
// No break between "{" and "//".
src: "if (b) { // Blah.\nreturn;\n",
want: "if (b) { // Blah.\n return;\n",
}, {
// Simple compound literal.
src: "T x = {0};",
want: "T x = {0};\n",
}}
for i, tc := range testCases {