Suppress failing WASI tests, enable running WASI tests by default

This commit is contained in:
Alexey Andreev 2023-10-08 19:23:34 +02:00
parent d47fea0b55
commit f6a16c1b94
38 changed files with 97 additions and 36 deletions

View File

@ -24,4 +24,5 @@ teavm.tests.decodeStack=false
teavm.tests.optimized=true teavm.tests.optimized=true
teavm.tests.minified=false teavm.tests.minified=false
teavm.tests.c=true teavm.tests.c=true
teavm.tests.wasm=true teavm.tests.wasm=true
teavm.tests.wasi=true

View File

@ -1 +1,2 @@
mkdir -p build/wasi-testdir
~/.wasmtime/bin/wasmtime run --mapdir /::build/wasi-testdir $1 $2 ~/.wasmtime/bin/wasmtime run --mapdir /::build/wasi-testdir $1 $2

View File

@ -27,7 +27,9 @@ import java.io.IOException;
import org.junit.After; import org.junit.After;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
public class FileOutputStreamTest { public class FileOutputStreamTest {
@ -282,6 +284,7 @@ public class FileOutputStreamTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void repeatedWrite() throws IOException { public void repeatedWrite() throws IOException {
f = new File(System.getProperty("user.home"), "test.txt"); f = new File(System.getProperty("user.home"), "test.txt");
fos = new FileOutputStream(f); fos = new FileOutputStream(f);

View File

@ -36,7 +36,9 @@ import org.junit.After;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.interop.PlatformMarker; import org.teavm.interop.PlatformMarker;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
public class FileTest { public class FileTest {
@ -1664,6 +1666,7 @@ public class FileTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void renameToLjava_io_File() throws IOException { public void renameToLjava_io_File() throws IOException {
String base = tempDirectory.getPath(); String base = tempDirectory.getPath();
File dir = new File(base, platformId); File dir = new File(base, platformId);
@ -1749,6 +1752,7 @@ public class FileTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void setReadOnly() throws IOException { public void setReadOnly() throws IOException {
File f1 = null; File f1 = null;
File f2 = null; File f2 = null;

View File

@ -106,7 +106,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void available() throws Exception { public void available() throws Exception {
pis = new PipedInputStream(); pis = new PipedInputStream();
pos = new PipedOutputStream(); pos = new PipedOutputStream();
@ -133,6 +133,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void close() throws IOException { public void close() throws IOException {
pis = new PipedInputStream(); pis = new PipedInputStream();
pos = new PipedOutputStream(); pos = new PipedOutputStream();
@ -150,7 +151,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void connectLjava_io_PipedOutputStream() throws Exception { public void connectLjava_io_PipedOutputStream() throws Exception {
pis = new PipedInputStream(); pis = new PipedInputStream();
pos = new PipedOutputStream(); pos = new PipedOutputStream();
@ -168,7 +169,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_read() throws Exception { public void test_read() throws Exception {
pis = new PipedInputStream(); pis = new PipedInputStream();
pos = new PipedOutputStream(); pos = new PipedOutputStream();
@ -186,7 +187,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_read$BII() throws Exception { public void test_read$BII() throws Exception {
pis = new PipedInputStream(); pis = new PipedInputStream();
pos = new PipedOutputStream(); pos = new PipedOutputStream();
@ -208,6 +209,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void read$BII_2() throws IOException { public void read$BII_2() throws IOException {
PipedInputStream obj = new PipedInputStream(); PipedInputStream obj = new PipedInputStream();
try { try {
@ -221,6 +223,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void read$BII_3() throws IOException { public void read$BII_3() throws IOException {
PipedInputStream obj = new PipedInputStream(); PipedInputStream obj = new PipedInputStream();
try { try {
@ -234,6 +237,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void read$BII_4() throws IOException { public void read$BII_4() throws IOException {
PipedInputStream obj = new PipedInputStream(); PipedInputStream obj = new PipedInputStream();
try { try {
@ -375,7 +379,7 @@ public class PipedInputStreamTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void read_after_write_close() throws Exception { public void read_after_write_close() throws Exception {
PipedInputStream in = new PipedInputStream(); PipedInputStream in = new PipedInputStream();
PipedOutputStream out = new PipedOutputStream(); PipedOutputStream out = new PipedOutputStream();

View File

@ -90,13 +90,14 @@ public class PipedOutputStreamTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void constructorLjava_io_PipedInputStream() throws Exception { public void constructorLjava_io_PipedInputStream() throws Exception {
out = new PipedOutputStream(new PipedInputStream()); out = new PipedOutputStream(new PipedInputStream());
out.write('b'); out.write('b');
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void close() throws Exception { public void close() throws Exception {
out = new PipedOutputStream(); out = new PipedOutputStream();
reader = new PReader(out); reader = new PReader(out);
@ -118,6 +119,7 @@ public class PipedOutputStreamTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void connectLjava_io_PipedInputStream() { public void connectLjava_io_PipedInputStream() {
try { try {
out = new PipedOutputStream(); out = new PipedOutputStream();
@ -132,7 +134,7 @@ public class PipedOutputStreamTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void flush() throws IOException { public void flush() throws IOException {
out = new PipedOutputStream(); out = new PipedOutputStream();
reader = new PReader(out); reader = new PReader(out);
@ -145,7 +147,7 @@ public class PipedOutputStreamTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void write$BII() throws IOException { public void write$BII() throws IOException {
out = new PipedOutputStream(); out = new PipedOutputStream();
reader = new PReader(out); reader = new PReader(out);
@ -157,6 +159,7 @@ public class PipedOutputStreamTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void test_writeI() throws IOException { public void test_writeI() throws IOException {
out = new PipedOutputStream(); out = new PipedOutputStream();
reader = new PReader(out); reader = new PReader(out);

View File

@ -32,7 +32,7 @@ import org.teavm.junit.TestPlatform;
@EachTestCompiledSeparately @EachTestCompiledSeparately
public class ClassLoaderTest { public class ClassLoaderTest {
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void loadsResources() { public void loadsResources() {
assertEquals("q", loadResource("1")); assertEquals("q", loadResource("1"));
assertEquals("qw", loadResource("2")); assertEquals("qw", loadResource("2"));

View File

@ -31,7 +31,7 @@ import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform; import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public class ClassTest { public class ClassTest {
@Test @Test
public void classNameEvaluated() { public void classNameEvaluated() {

View File

@ -18,9 +18,12 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class MathTest { public class MathTest {
private static void sameDouble(double a, double b) { private static void sameDouble(double a, double b) {
assertEquals(Double.valueOf(a), Double.valueOf(b)); assertEquals(Double.valueOf(a), Double.valueOf(b));

View File

@ -23,7 +23,9 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately; import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately @EachTestCompiledSeparately
@ -74,6 +76,7 @@ public class ObjectTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void waitWorks() throws InterruptedException { public void waitWorks() throws InterruptedException {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
final Object lock = new Object(); final Object lock = new Object();

View File

@ -24,10 +24,13 @@ import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately; import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately @EachTestCompiledSeparately
@SkipPlatform(TestPlatform.WASI)
public class ThreadTest { public class ThreadTest {
@Test @Test
public void sleeps() throws InterruptedException { public void sleeps() throws InterruptedException {

View File

@ -30,7 +30,7 @@ import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately @EachTestCompiledSeparately
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public class SerializedLambdaTest { public class SerializedLambdaTest {
@Test @Test
public void serializableLambdaHasWriteReplaceMethod() throws NoSuchMethodException, InvocationTargetException, public void serializableLambdaHasWriteReplaceMethod() throws NoSuchMethodException, InvocationTargetException,

View File

@ -43,7 +43,7 @@ public class ArrayTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void setWorks() { public void setWorks() {
Object array = Array.newInstance(String.class, 2); Object array = Array.newInstance(String.class, 2);
Array.set(array, 0, "foo"); Array.set(array, 0, "foo");
@ -52,7 +52,7 @@ public class ArrayTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void setPrimitiveWorks() { public void setPrimitiveWorks() {
Object array = Array.newInstance(int.class, 2); Object array = Array.newInstance(int.class, 2);
Array.set(array, 0, 23); Array.set(array, 0, 23);

View File

@ -32,7 +32,7 @@ import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately @EachTestCompiledSeparately
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public class ConstructorTest { public class ConstructorTest {
@Test @Test
public void constructorsEnumerated() { public void constructorsEnumerated() {

View File

@ -29,7 +29,7 @@ import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately @EachTestCompiledSeparately
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public class FieldTest { public class FieldTest {
@Test @Test
public void fieldsEnumerated() { public void fieldsEnumerated() {

View File

@ -31,7 +31,7 @@ import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately @EachTestCompiledSeparately
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public class MethodTest { public class MethodTest {
@Test @Test
public void methodsEnumerated() { public void methodsEnumerated() {

View File

@ -41,9 +41,12 @@ import java.math.MathContext;
import java.math.RoundingMode; import java.math.RoundingMode;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class BigDecimalArithmeticTest { public class BigDecimalArithmeticTest {
/** /**
* Add two numbers of equal positive scales * Add two numbers of equal positive scales

View File

@ -46,9 +46,12 @@ import java.math.MathContext;
import java.math.RoundingMode; import java.math.RoundingMode;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class BigDecimalCompareTest { public class BigDecimalCompareTest {
/** /**
* Abs() of a negative BigDecimal * Abs() of a negative BigDecimal

View File

@ -44,9 +44,12 @@ import java.math.MathContext;
import java.math.RoundingMode; import java.math.RoundingMode;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class BigDecimalConstructorsTest { public class BigDecimalConstructorsTest {
/** /**
* check ONE * check ONE

View File

@ -44,9 +44,12 @@ import java.math.BigInteger;
import java.math.RoundingMode; import java.math.RoundingMode;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class BigDecimalScaleOperationsTest { public class BigDecimalScaleOperationsTest {
/** /**
* Check the default scale * Check the default scale

View File

@ -40,9 +40,12 @@ import static org.junit.Assert.assertTrue;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class BigIntegerToStringTest { public class BigIntegerToStringTest {
/** /**
* If 36 < radix < 2 it should be set to 10 * If 36 < radix < 2 it should be set to 10

View File

@ -27,12 +27,15 @@ import java.util.Currency;
import java.util.Locale; import java.util.Locale;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMProperties; import org.teavm.junit.TeaVMProperties;
import org.teavm.junit.TeaVMProperty; import org.teavm.junit.TeaVMProperty;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@TeaVMProperties(@TeaVMProperty(key = "java.util.Locale.available", value = "en, en_US, en_GB, ru, ru_RU")) @TeaVMProperties(@TeaVMProperty(key = "java.util.Locale.available", value = "en, en_US, en_GB, ru, ru_RU"))
@SkipPlatform(TestPlatform.WASI)
public class DecimalFormatTest { public class DecimalFormatTest {
private static DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.ENGLISH); private static DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.ENGLISH);

View File

@ -38,9 +38,12 @@ import java.util.TimeZone;
import org.junit.After; import org.junit.After;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class MessageFormatTest { public class MessageFormatTest {
private MessageFormat format1; private MessageFormat format1;
private MessageFormat format2; private MessageFormat format2;

View File

@ -23,13 +23,16 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately; import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipJVM; import org.teavm.junit.SkipJVM;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMProperties; import org.teavm.junit.TeaVMProperties;
import org.teavm.junit.TeaVMProperty; import org.teavm.junit.TeaVMProperty;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@TeaVMProperties(@TeaVMProperty(key = "java.util.Locale.available", value = "en, en_US, en_GB, ru, ru_RU")) @TeaVMProperties(@TeaVMProperty(key = "java.util.Locale.available", value = "en, en_US, en_GB, ru, ru_RU"))
@EachTestCompiledSeparately @EachTestCompiledSeparately
@SkipPlatform(TestPlatform.WASI)
public class NumberFormatTest { public class NumberFormatTest {
@Test @Test
public void formatsNumber() { public void formatsNumber() {

View File

@ -56,7 +56,9 @@ import java.time.ZoneId;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
import org.testng.annotations.Test; import org.testng.annotations.Test;
/** /**
@ -64,6 +66,7 @@ import org.testng.annotations.Test;
*/ */
@Test @Test
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class TestClockTick extends AbstractTest { public class TestClockTick extends AbstractTest {
private static final ZoneId MOSCOW = ZoneId.of("Europe/Moscow"); private static final ZoneId MOSCOW = ZoneId.of("Europe/Moscow");

View File

@ -310,7 +310,7 @@ public class TestDateTimesImplementation {
} }
@Test(dataProvider = "safeMultiplyLongLongProviderOverflow", expectedExceptions = ArithmeticException.class) @Test(dataProvider = "safeMultiplyLongLongProviderOverflow", expectedExceptions = ArithmeticException.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_safeMultiplyLongLong_overflow(long a, long b) { public void test_safeMultiplyLongLong_overflow(long a, long b) {
Jdk8Methods.safeMultiply(a, b); Jdk8Methods.safeMultiply(a, b);
} }

View File

@ -944,7 +944,7 @@ public class TestLocalDate extends AbstractDateTimeTest {
} }
@Test(expectedExceptions = NullPointerException.class) @Test(expectedExceptions = NullPointerException.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_plus_longPeriodUnit_null() { public void test_plus_longPeriodUnit_null() {
test2007x07x15.plus(1, (TemporalUnit) null); test2007x07x15.plus(1, (TemporalUnit) null);
} }
@ -1305,7 +1305,7 @@ public class TestLocalDate extends AbstractDateTimeTest {
} }
@Test(expectedExceptions = NullPointerException.class) @Test(expectedExceptions = NullPointerException.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_minus_longPeriodUnit_null() { public void test_minus_longPeriodUnit_null() {
test2007x07x15.minus(1, (TemporalUnit) null); test2007x07x15.minus(1, (TemporalUnit) null);
} }

View File

@ -1261,7 +1261,7 @@ public class TestLocalDateTime extends AbstractDateTimeTest {
} }
@Test(expectedExceptions = NullPointerException.class) @Test(expectedExceptions = NullPointerException.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_plus_longPeriodUnit_null() { public void test_plus_longPeriodUnit_null() {
test2007x07x15x12x30x40x987654321.plus(1, null); test2007x07x15x12x30x40x987654321.plus(1, null);
} }
@ -1972,7 +1972,7 @@ public class TestLocalDateTime extends AbstractDateTimeTest {
} }
@Test(expectedExceptions = NullPointerException.class) @Test(expectedExceptions = NullPointerException.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_minus_longPeriodUnit_null() { public void test_minus_longPeriodUnit_null() {
test2007x07x15x12x30x40x987654321.minus(1, null); test2007x07x15x12x30x40x987654321.minus(1, null);
} }

View File

@ -668,7 +668,7 @@ public class TestOffsetTime extends AbstractDateTimeTest {
} }
@Test(expectedExceptions = NullPointerException.class) @Test(expectedExceptions = NullPointerException.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_with_TemporalField_null() { public void test_with_TemporalField_null() {
test11x30x59x500pone.with((TemporalField) null, 0); test11x30x59x500pone.with((TemporalField) null, 0);
} }

View File

@ -1456,7 +1456,7 @@ public class TestZonedDateTime extends AbstractDateTimeTest {
} }
@Test(expectedExceptions = NullPointerException.class) @Test(expectedExceptions = NullPointerException.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_plus_longUnit_null() { public void test_plus_longUnit_null() {
testDateTimeParis.plus(0, null); testDateTimeParis.plus(0, null);
} }

View File

@ -710,7 +710,7 @@ public class TestYear extends AbstractDateTimeTest {
} }
@Test(expectedExceptions = NullPointerException.class) @Test(expectedExceptions = NullPointerException.class)
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void test_compareTo_nullYear() { public void test_compareTo_nullYear() {
Year doy = null; Year doy = null;
Year test = Year.of(1); Year test = Year.of(1);

View File

@ -42,9 +42,12 @@ import java.util.Locale;
import java.util.TimeZone; import java.util.TimeZone;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class CalendarTest { public class CalendarTest {
Locale defaultLocale; Locale defaultLocale;

View File

@ -26,6 +26,7 @@ import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately @EachTestCompiledSeparately
@SkipPlatform(TestPlatform.WASI)
public class DateTest { public class DateTest {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Test @Test

View File

@ -110,7 +110,7 @@ public class FormatterTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WEBASSEMBLY) @SkipPlatform({TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void formatsChar() { public void formatsChar() {
assertEquals("x: Y:\uDBFF\uDFFF ", new Formatter().format("%c:%3C:%-3c", 'x', 'y', 0x10ffff).toString()); assertEquals("x: Y:\uDBFF\uDFFF ", new Formatter().format("%c:%3C:%-3c", 'x', 'y', 0x10ffff).toString());

View File

@ -32,6 +32,7 @@ import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform; import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@SkipPlatform(TestPlatform.WASI)
public class RandomTest { public class RandomTest {
@Test @Test
public void testDoubles() { public void testDoubles() {

View File

@ -29,10 +29,13 @@ import java.util.concurrent.BlockingQueue;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.teavm.junit.EachTestCompiledSeparately; import org.teavm.junit.EachTestCompiledSeparately;
import org.teavm.junit.SkipPlatform;
import org.teavm.junit.TeaVMTestRunner; import org.teavm.junit.TeaVMTestRunner;
import org.teavm.junit.TestPlatform;
@RunWith(TeaVMTestRunner.class) @RunWith(TeaVMTestRunner.class)
@EachTestCompiledSeparately @EachTestCompiledSeparately
@SkipPlatform(TestPlatform.WASI)
public class ArrayBlockingQueueTest { public class ArrayBlockingQueueTest {
@Test @Test
public void constructed() { public void constructed() {

View File

@ -484,7 +484,7 @@ public class MetaprogrammingTest {
private static int counter; private static int counter;
@Test @Test
@SkipPlatform(TestPlatform.WEBASSEMBLY) @SkipPlatform({TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void arrayTypeSelected() { public void arrayTypeSelected() {
assertEquals(String[].class, createInstance(String.class, 1).getClass()); assertEquals(String[].class, createInstance(String.class, 1).getClass());
assertEquals(String[][].class, createInstance(String[].class, 1).getClass()); assertEquals(String[][].class, createInstance(String[].class, 1).getClass());

View File

@ -258,7 +258,7 @@ public class VMTest {
@Test @Test
@SkipJVM @SkipJVM
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void asyncClinit() { public void asyncClinit() {
assertEquals(0, initCount); assertEquals(0, initCount);
assertEquals("foo", AsyncClinitClass.foo()); assertEquals("foo", AsyncClinitClass.foo());
@ -270,13 +270,13 @@ public class VMTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void asyncClinitField() { public void asyncClinitField() {
assertEquals("ok", AsyncClinitClass.state); assertEquals("ok", AsyncClinitClass.state);
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void asyncClinitInstance() { public void asyncClinitInstance() {
AsyncClinitClass acl = new AsyncClinitClass(); AsyncClinitClass acl = new AsyncClinitClass();
assertEquals("ok", AsyncClinitClass.state); assertEquals("ok", AsyncClinitClass.state);
@ -284,7 +284,7 @@ public class VMTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void asyncWait() { public void asyncWait() {
AsyncClinitClass acl = new AsyncClinitClass(); AsyncClinitClass acl = new AsyncClinitClass();
acl.doWait(); acl.doWait();
@ -293,7 +293,7 @@ public class VMTest {
@Test @Test
@SkipJVM @SkipJVM
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void loopAndExceptionPhi() { public void loopAndExceptionPhi() {
int[] a = createArray(); int[] a = createArray();
int s = 0; int s = 0;
@ -312,7 +312,7 @@ public class VMTest {
@Test @Test
@SkipJVM @SkipJVM
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void asyncTryCatch() { public void asyncTryCatch() {
try { try {
throwExceptionAsync(); throwExceptionAsync();
@ -324,7 +324,7 @@ public class VMTest {
@Test @Test
@SkipJVM @SkipJVM
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void asyncExceptionHandler() { public void asyncExceptionHandler() {
try { try {
throw new RuntimeException("OK"); throw new RuntimeException("OK");
@ -530,7 +530,7 @@ public class VMTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void indirectDefaultMethod() { public void indirectDefaultMethod() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (FirstPath o : new FirstPath[] { new PathJoint(), new FirstPathOptimizationPrevention() }) { for (FirstPath o : new FirstPath[] { new PathJoint(), new FirstPathOptimizationPrevention() }) {
@ -540,7 +540,7 @@ public class VMTest {
} }
@Test @Test
@SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY}) @SkipPlatform({TestPlatform.C, TestPlatform.WEBASSEMBLY, TestPlatform.WASI})
public void indirectDefaultMethodSubclass() { public void indirectDefaultMethodSubclass() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (FirstPath o : new FirstPath[] { new PathJointSubclass(), new FirstPathOptimizationPrevention() }) { for (FirstPath o : new FirstPath[] { new PathJointSubclass(), new FirstPathOptimizationPrevention() }) {
@ -615,6 +615,7 @@ public class VMTest {
} }
@Test @Test
@SkipPlatform(TestPlatform.WASI)
public void arrayMonitor() throws InterruptedException { public void arrayMonitor() throws InterruptedException {
int[] array = { 1, 2, 3 }; int[] array = { 1, 2, 3 };
synchronized (array) { synchronized (array) {