Skip to content

Commit 625aeab

Browse files
committed
Reformat code
1 parent bad6712 commit 625aeab

11 files changed

+271
-42
lines changed

.idea/codeStyleSettings.xml

Lines changed: 231 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/test/java/com/termux/app/TermuxActivityTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77

88
public class TermuxActivityTest extends TestCase {
99

10-
private void assertUrlsAre(String text, String... urls) {
11-
LinkedHashSet<String> expected = new LinkedHashSet<>();
12-
Collections.addAll(expected, urls);
13-
assertEquals(expected, TermuxActivity.extractUrls(text));
14-
}
10+
private void assertUrlsAre(String text, String... urls) {
11+
LinkedHashSet<String> expected = new LinkedHashSet<>();
12+
Collections.addAll(expected, urls);
13+
assertEquals(expected, TermuxActivity.extractUrls(text));
14+
}
1515

16-
public void testExtractUrls() {
17-
assertUrlsAre("hello http://example.com world", "http://example.com");
16+
public void testExtractUrls() {
17+
assertUrlsAre("hello http://example.com world", "http://example.com");
1818

19-
assertUrlsAre("http://example.com\nhttp://another.com", "http://example.com", "http://another.com");
19+
assertUrlsAre("http://example.com\nhttp://another.com", "http://example.com", "http://another.com");
2020

21-
assertUrlsAre("hello http://example.com world and http://more.example.com with secure https://more.example.com",
22-
"http://example.com", "http://more.example.com", "https://more.example.com");
23-
}
21+
assertUrlsAre("hello http://example.com world and http://more.example.com with secure https://more.example.com",
22+
"http://example.com", "http://more.example.com", "https://more.example.com");
23+
}
2424

2525
}

app/src/test/java/com/termux/terminal/ByteQueueTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ private static void assertArrayEquals(byte[] expected, byte[] actual) {
1717

1818
public void testCompleteWrites() throws Exception {
1919
ByteQueue q = new ByteQueue(10);
20-
assertEquals(true, q.write(new byte[] { 1, 2, 3 }, 0, 3));
20+
assertEquals(true, q.write(new byte[]{1, 2, 3}, 0, 3));
2121

2222
byte[] arr = new byte[10];
2323
assertEquals(3, q.read(arr, true));
24-
assertArrayEquals(new byte[] { 1, 2, 3 }, new byte[] { arr[0], arr[1], arr[2] });
24+
assertArrayEquals(new byte[]{1, 2, 3}, new byte[]{arr[0], arr[1], arr[2]});
2525

26-
assertEquals(true, q.write(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, 0, 10));
26+
assertEquals(true, q.write(new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 0, 10));
2727
assertEquals(10, q.read(arr, true));
28-
assertArrayEquals(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, arr);
28+
assertArrayEquals(new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, arr);
2929
}
3030

3131
public void testQueueWraparound() throws Exception {
3232
ByteQueue q = new ByteQueue(10);
3333

34-
byte[] origArray = new byte[] { 1, 2, 3, 4, 5, 6 };
34+
byte[] origArray = new byte[]{1, 2, 3, 4, 5, 6};
3535
byte[] readArray = new byte[origArray.length];
3636
for (int i = 0; i < 20; i++) {
3737
q.write(origArray, 0, origArray.length);
@@ -43,7 +43,7 @@ public void testQueueWraparound() throws Exception {
4343
public void testWriteNotesClosing() throws Exception {
4444
ByteQueue q = new ByteQueue(10);
4545
q.close();
46-
assertEquals(false, q.write(new byte[] { 1, 2, 3 }, 0, 3));
46+
assertEquals(false, q.write(new byte[]{1, 2, 3}, 0, 3));
4747
}
4848

4949
public void testReadNonBlocking() throws Exception {

app/src/test/java/com/termux/terminal/DecSetTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* <pre>
55
* "CSI ? Pm h", DEC Private Mode Set (DECSET)
66
* </pre>
7-
*
7+
* <p/>
88
* and
9-
*
9+
* <p/>
1010
* <pre>
1111
* "CSI ? Pm l", DEC Private Mode Reset (DECRST)
1212
* </pre>
13-
*
13+
* <p/>
1414
* controls various aspects of the terminal
1515
*/
1616
public class DecSetTest extends TerminalTestCase {

app/src/test/java/com/termux/terminal/KeyHandlerTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.termux.terminal;
22

33
import android.view.KeyEvent;
4+
45
import junit.framework.TestCase;
56

67
public class KeyHandlerTest extends TestCase {

app/src/test/java/com/termux/terminal/OperatingSystemControlTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package com.termux.terminal;
22

3+
import android.util.Base64;
4+
35
import java.util.ArrayList;
46
import java.util.List;
57
import java.util.Random;
68

7-
import android.util.Base64;
8-
99
/** "ESC ]" is the Operating System Command. */
1010
public class OperatingSystemControlTest extends TerminalTestCase {
1111

app/src/test/java/com/termux/terminal/ScrollRegionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* ${CSI}${top};${bottom}r" - set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM).
5-
*
5+
* <p/>
66
* "DECSTBM moves the cursor to column 1, line 1 of the page" (http://www.vt100.net/docs/vt510-rm/DECSTBM).
77
*/
88
public class ScrollRegionTest extends TerminalTestCase {

app/src/test/java/com/termux/terminal/TerminalRowTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.termux.terminal;
22

3+
import junit.framework.TestCase;
4+
35
import java.util.Arrays;
46
import java.util.Random;
57

6-
import junit.framework.TestCase;
7-
88
public class TerminalRowTest extends TestCase {
99

1010
/** The properties of these code points are validated in {@link #testStaticConstants()}. */
@@ -96,7 +96,7 @@ public void testAscii() {
9696
assertEquals(80, row.getSpaceUsed());
9797
assertColumnCharIndicesStartsWith(0, 1, 2, 3);
9898

99-
char[] someChars = new char[] { 'a', 'c', 'e', '4', '5', '6', '7', '8' };
99+
char[] someChars = new char[]{'a', 'c', 'e', '4', '5', '6', '7', '8'};
100100

101101
char[] rawLine = new char[80];
102102
Arrays.fill(rawLine, ' ');
@@ -373,7 +373,7 @@ public void testCrashATE145() {
373373
assertEquals(0, WcWidth.width(0x009F));
374374
assertEquals(1, Character.charCount(0x009F));
375375

376-
int[] points = new int[] { 0xC2541, 'a', '8', 0x73EE, 0x009F, 0x881F, 0x8324, 0xD4C9, 0xFFFD, 'B', 0x009B, 0x61C9, 'Z' };
376+
int[] points = new int[]{0xC2541, 'a', '8', 0x73EE, 0x009F, 0x881F, 0x8324, 0xD4C9, 0xFFFD, 'B', 0x009B, 0x61C9, 'Z'};
377377
// int[] expected = new int[] { TerminalEmulator.UNICODE_REPLACEMENT_CHAR, 'a', '8', 0x73EE, 0x009F, 0x881F, 0x8324, 0xD4C9, 0xFFFD,
378378
// 'B', 0x009B, 0x61C9, 'Z' };
379379
int currentColumn = 0;

0 commit comments

Comments
 (0)