mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Disable PngSuite test by default.
Results are device-dependent and outside our control.
This commit is contained in:
@@ -135,6 +135,7 @@ dependencies {
|
|||||||
testImplementation "org.jmock:jmock-junit4:$jmockVersion"
|
testImplementation "org.jmock:jmock-junit4:$jmockVersion"
|
||||||
testImplementation "org.jmock:jmock-legacy:$jmockVersion"
|
testImplementation "org.jmock:jmock-legacy:$jmockVersion"
|
||||||
|
|
||||||
|
androidTestImplementation project(path: ':bramble-api', configuration: 'testOutput')
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||||
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
|
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
|
||||||
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
|
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
|
||||||
|
|||||||
@@ -6,18 +6,30 @@ import org.junit.runners.Parameterized;
|
|||||||
import org.junit.runners.Parameterized.Parameters;
|
import org.junit.runners.Parameterized.Parameters;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import static java.util.Arrays.asList;
|
import static java.util.logging.Logger.getLogger;
|
||||||
import static org.briarproject.bramble.api.nullsafety.NullSafety.requireNonNull;
|
import static org.briarproject.bramble.api.nullsafety.NullSafety.requireNonNull;
|
||||||
|
import static org.briarproject.bramble.test.TestUtils.isOptionalTestEnabled;
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
import static org.junit.Assume.assumeTrue;
|
||||||
|
|
||||||
@RunWith(Parameterized.class)
|
@RunWith(Parameterized.class)
|
||||||
public class PngSuiteAttachmentCreationTaskTest
|
public class PngSuiteAttachmentCreationTaskTest
|
||||||
extends AbstractAttachmentCreationTaskTest {
|
extends AbstractAttachmentCreationTaskTest {
|
||||||
|
|
||||||
|
private static final Logger LOG =
|
||||||
|
getLogger(PngSuiteAttachmentCreationTaskTest.class.getName());
|
||||||
|
|
||||||
@Parameters
|
@Parameters
|
||||||
public static Iterable<String> data() throws IOException {
|
public static Iterable<String> data() throws IOException {
|
||||||
return asList(requireNonNull(getAssetManager().list("PngSuite")));
|
List<String> data = new ArrayList<>();
|
||||||
|
String[] files = requireNonNull(getAssetManager().list("PngSuite"));
|
||||||
|
for (String filename : files)
|
||||||
|
if (filename.endsWith(".png")) data.add(filename);
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String filename;
|
private final String filename;
|
||||||
@@ -28,6 +40,9 @@ public class PngSuiteAttachmentCreationTaskTest
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPngSuiteCompress() throws Exception {
|
public void testPngSuiteCompress() throws Exception {
|
||||||
|
assumeTrue(isOptionalTestEnabled(
|
||||||
|
PngSuiteAttachmentCreationTaskTest.class));
|
||||||
|
LOG.info("Testing " + filename);
|
||||||
if (filename.startsWith("x")) {
|
if (filename.startsWith("x")) {
|
||||||
try {
|
try {
|
||||||
testCompress("PngSuite/" + filename, "image/png");
|
testCompress("PngSuite/" + filename, "image/png");
|
||||||
|
|||||||
Reference in New Issue
Block a user