mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Fix inspect code warnings
This commit is contained in:
@@ -2,13 +2,14 @@ package com.termux.app;
|
|||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
|
|
||||||
public class TermuxActivityTest extends TestCase {
|
public class TermuxActivityTest extends TestCase {
|
||||||
|
|
||||||
private void assertUrlsAre(String text, String... urls) {
|
private void assertUrlsAre(String text, String... urls) {
|
||||||
LinkedHashSet<String> expected = new LinkedHashSet<>();
|
LinkedHashSet<String> expected = new LinkedHashSet<>();
|
||||||
for (String url : urls) expected.add(url);
|
Collections.addAll(expected, urls);
|
||||||
assertEquals(expected, TermuxActivity.extractUrls(text));
|
assertEquals(expected, TermuxActivity.extractUrls(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@ import com.termux.terminal.TerminalOutput;
|
|||||||
public abstract class TerminalTestCase extends TestCase {
|
public abstract class TerminalTestCase extends TestCase {
|
||||||
|
|
||||||
public static class MockTerminalOutput extends TerminalOutput {
|
public static class MockTerminalOutput extends TerminalOutput {
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
public final List<ChangedTitle> titleChanges = new ArrayList<>();
|
public final List<ChangedTitle> titleChanges = new ArrayList<>();
|
||||||
public final List<String> clipboardPuts = new ArrayList<>();
|
public final List<String> clipboardPuts = new ArrayList<>();
|
||||||
public int bellsRung = 0;
|
public int bellsRung = 0;
|
||||||
@@ -117,7 +117,7 @@ public abstract class TerminalTestCase extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final class LineWrapper {
|
private static final class LineWrapper {
|
||||||
TerminalRow mLine;
|
final TerminalRow mLine;
|
||||||
|
|
||||||
public LineWrapper(TerminalRow line) {
|
public LineWrapper(TerminalRow line) {
|
||||||
mLine = line;
|
mLine = line;
|
||||||
|
Reference in New Issue
Block a user