Suppress tests that are failing on C backend

This commit is contained in:
Alexey Andreev 2023-10-02 08:30:52 +02:00
parent 8fb6087bf0
commit 1c56036171
14 changed files with 58 additions and 0 deletions

View File

@ -25,7 +25,9 @@ import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
@ -104,6 +106,7 @@ public class PipedInputStreamTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void available() throws Exception {
pis = new PipedInputStream();
pos = new PipedOutputStream();
@ -147,6 +150,7 @@ public class PipedInputStreamTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void connectLjava_io_PipedOutputStream() throws Exception {
pis = new PipedInputStream();
pos = new PipedOutputStream();
@ -164,6 +168,7 @@ public class PipedInputStreamTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void test_read() throws Exception {
pis = new PipedInputStream();
pos = new PipedOutputStream();
@ -181,6 +186,7 @@ public class PipedInputStreamTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void test_read$BII() throws Exception {
pis = new PipedInputStream();
pos = new PipedOutputStream();

View File

@ -26,7 +26,9 @@ import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
@ -94,6 +96,7 @@ public class PipedOutputStreamTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void close() throws Exception {
out = new PipedOutputStream();
reader = new PReader(out);
@ -129,6 +132,7 @@ public class PipedOutputStreamTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void flush() throws IOException {
out = new PipedOutputStream();
reader = new PReader(out);
@ -141,6 +145,7 @@ public class PipedOutputStreamTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void write$BII() throws IOException {
out = new PipedOutputStream();
reader = new PReader(out);

View File

@ -24,12 +24,15 @@ import java.io.InputStreamReader;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
public class ClassLoaderTest {
@Test
@SkipPlatform(TestPlatform.C)
public void loadsResources() {
assertEquals("q", loadResource("1"));
assertEquals("qw", loadResource("2"));
@ -43,6 +46,7 @@ public class ClassLoaderTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void returnsNullForNonExistentResource() {
InputStream input = ClassLoader.getSystemClassLoader().getResourceAsStream("non-existent-resource.txt");
assertNull(input);

View File

@ -26,9 +26,12 @@ import java.lang.annotation.RetentionPolicy;
import java.util.Set;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.C)
public class ClassTest {
@Test
public void classNameEvaluated() {

View File

@ -24,10 +24,13 @@ import java.util.function.Function;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
@SkipPlatform(TestPlatform.C)
public class SerializedLambdaTest {
@Test
public void serializableLambdaHasWriteReplaceMethod() throws NoSuchMethodException, InvocationTargetException,

View File

@ -21,7 +21,9 @@ import java.lang.reflect.Array;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
@ -41,6 +43,7 @@ public class ArrayTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void setWorks() {
Object array = Array.newInstance(String.class, 2);
Array.set(array, 0, "foo");
@ -49,6 +52,7 @@ public class ArrayTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void setPrimitiveWorks() {
Object array = Array.newInstance(int.class, 2);
Array.set(array, 0, 23);

View File

@ -26,10 +26,13 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.classlib.support.Reflectable;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
@SkipPlatform(TestPlatform.C)
public class ConstructorTest {
@Test
public void constructorsEnumerated() {

View File

@ -23,10 +23,13 @@ import org.junit.runner.RunWith;
import org.teavm.classlib.support.Reflectable;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipJVM;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
@SkipPlatform(TestPlatform.C)
public class FieldTest {
@Test
public void fieldsEnumerated() {

View File

@ -25,10 +25,13 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.classlib.support.Reflectable;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
@SkipPlatform(TestPlatform.C)
public class MethodTest {
@Test
public void methodsEnumerated() {

View File

@ -48,7 +48,9 @@ package org.teavm.classlib.java.time;
import static org.testng.Assert.assertEquals;
import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.threeten.bp.jdk8.Jdk8Methods;
@ -308,6 +310,7 @@ public class TestDateTimesImplementation {
}
@Test(dataProvider = "safeMultiplyLongLongProviderOverflow", expectedExceptions = ArithmeticException.class)
@SkipPlatform(TestPlatform.C)
public void test_safeMultiplyLongLong_overflow(long a, long b) {
Jdk8Methods.safeMultiply(a, b);
}

View File

@ -20,9 +20,12 @@ import java.nio.charset.StandardCharsets;
import java.util.Base64;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.C)
public class Base64Test {
@Test
public void decoderWorks() {

View File

@ -26,7 +26,9 @@ import java.util.Map;
import java.util.TreeMap;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
public class MapTest {
@ -54,6 +56,7 @@ public class MapTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void copyOfWorks() {
testOf(new String[0], Map.copyOf(new HashMap<>()));
testOf(new String[] { "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a" },

View File

@ -27,7 +27,9 @@ import java.util.stream.IntStream;
import java.util.stream.LongStream;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
public class RandomTest {
@ -61,6 +63,7 @@ public class RandomTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void testIntegers() {
Random random = new Random();
int[] ints = IntStream.range(0, 10000).map(i -> random.nextInt())
@ -99,6 +102,7 @@ public class RandomTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void testLongs() {
Random random = new Random();
long[] longs = IntStream.range(0, 10000).mapToLong(i -> random.nextLong())

View File

@ -30,7 +30,9 @@ import org.teavm.interop.AsyncCallback;
import org.teavm.jso.JSBody;
import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipJVM;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately
@ -253,6 +255,7 @@ public class VMTest {
@Test
@SkipJVM
@SkipPlatform(TestPlatform.C)
public void asyncClinit() {
assertEquals(0, initCount);
assertEquals("foo", AsyncClinitClass.foo());
@ -264,11 +267,13 @@ public class VMTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void asyncClinitField() {
assertEquals("ok", AsyncClinitClass.state);
}
@Test
@SkipPlatform(TestPlatform.C)
public void asyncClinitInstance() {
AsyncClinitClass acl = new AsyncClinitClass();
assertEquals("ok", AsyncClinitClass.state);
@ -276,6 +281,7 @@ public class VMTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void asyncWait() {
AsyncClinitClass acl = new AsyncClinitClass();
acl.doWait();
@ -284,6 +290,7 @@ public class VMTest {
@Test
@SkipJVM
@SkipPlatform(TestPlatform.C)
public void loopAndExceptionPhi() {
int[] a = createArray();
int s = 0;
@ -302,6 +309,7 @@ public class VMTest {
@Test
@SkipJVM
@SkipPlatform(TestPlatform.C)
public void asyncTryCatch() {
try {
throwExceptionAsync();
@ -313,6 +321,7 @@ public class VMTest {
@Test
@SkipJVM
@SkipPlatform(TestPlatform.C)
public void asyncExceptionHandler() {
try {
throw new RuntimeException("OK");
@ -518,6 +527,7 @@ public class VMTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void indirectDefaultMethod() {
StringBuilder sb = new StringBuilder();
for (FirstPath o : new FirstPath[] { new PathJoint(), new FirstPathOptimizationPrevention() }) {
@ -527,6 +537,7 @@ public class VMTest {
}
@Test
@SkipPlatform(TestPlatform.C)
public void indirectDefaultMethodSubclass() {
StringBuilder sb = new StringBuilder();
for (FirstPath o : new FirstPath[] { new PathJointSubclass(), new FirstPathOptimizationPrevention() }) {