Skip to content

Commit

Permalink
Fixed tests for new autoformat style
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed May 21, 2021
1 parent 09c6626 commit 7754b7f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ public class AutoformatProducesOneUndoActionTest extends AbstractGUITest {
"}";
public static final String SOURCE_AFTER = "void setup() {\n" +
" // put your setup code here, to run once:\n" +
"\n" +
"}\n" +
"\n" +
"void loop() {\n" +
" // put your main code here, to run repeatedly:\n" +
"\n" +
"}";

@Test
Expand Down
2 changes: 0 additions & 2 deletions app/test/processing/app/AutoformatSavesCaretPositionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ public void shouldSaveCaretPositionAfterAutoformat() {
String formattedText = editor.getText();
assertEquals("void setup() {\n" +
" // put your setup code here, to run once:\n" +
"\n" +
"}\n" +
"\n" +
"void loop() {\n" +
" // put your main code here, to run repeatedly:\n" +
"\n" +
"}", formattedText);

// Autoformat with clang-format keeps cursor relative to source code
Expand Down
4 changes: 2 additions & 2 deletions app/test/processing/app/AutoformatTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public void shouldProduceNicelyFormattedCode() throws Exception {
String formattedText = editor.getText();
assertEquals("void setup() {\n" +
" // put your setup code here, to run once:\n" +
" int foo[] = { 1, 2, 3, 4, 5};\n" +
" int foo[2][5] = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}};\n" +
" int foo[] = { 1, 2, 3, 4, 5 };\n" +
" int foo[2][5] = { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 } };\n" +
"}\n" +
"\n" +
"void loop() {\n" +
Expand Down

0 comments on commit 7754b7f

Please sign in to comment.