Run JUnit tests via JUnit runner instead of Maven plugin

This commit is contained in:
Alexey Andreev 2016-02-23 18:46:32 +03:00
parent 5e7311d8cc
commit 2b3cba69bc
106 changed files with 525 additions and 301 deletions

View File

@ -34,6 +34,7 @@
<module name="teavm-jso" /> <module name="teavm-jso" />
<module name="teavm-jso-apis" /> <module name="teavm-jso-apis" />
<module name="teavm-jso-impl" /> <module name="teavm-jso-impl" />
<module name="teavm-junit" />
<module name="teavm-maven-plugin" /> <module name="teavm-maven-plugin" />
<module name="teavm-maven-webapp" /> <module name="teavm-maven-webapp" />
<module name="teavm-metaprogramming-api" /> <module name="teavm-metaprogramming-api" />
@ -60,6 +61,7 @@
<module name="teavm-jso" target="1.8" /> <module name="teavm-jso" target="1.8" />
<module name="teavm-jso-apis" target="1.8" /> <module name="teavm-jso-apis" target="1.8" />
<module name="teavm-jso-impl" target="1.8" /> <module name="teavm-jso-impl" target="1.8" />
<module name="teavm-junit" target="1.8" />
<module name="teavm-maven" target="1.5" /> <module name="teavm-maven" target="1.5" />
<module name="teavm-maven-plugin" target="1.8" /> <module name="teavm-maven-plugin" target="1.8" />
<module name="teavm-maven-webapp" target="1.5" /> <module name="teavm-maven-webapp" target="1.5" />

View File

@ -23,6 +23,7 @@
<file url="file://$PROJECT_DIR$/tools/chrome-rdp" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/tools/chrome-rdp" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/tools/cli" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/tools/cli" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/tools/core" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/tools/core" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/tools/junit" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/tools/maven" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/tools/maven" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/tools/maven/plugin" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/tools/maven/plugin" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/tools/maven/webapp" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/tools/maven/webapp" charset="UTF-8" />

View File

@ -2,6 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/all-deps/all-deps.iml" filepath="$PROJECT_DIR$/all-deps/all-deps.iml" />
<module fileurl="file://$PROJECT_DIR$/teavm.iml" filepath="$PROJECT_DIR$/teavm.iml" /> <module fileurl="file://$PROJECT_DIR$/teavm.iml" filepath="$PROJECT_DIR$/teavm.iml" />
<module fileurl="file://$PROJECT_DIR$/tools/chrome-rdp/teavm-chrome-rdp.iml" filepath="$PROJECT_DIR$/tools/chrome-rdp/teavm-chrome-rdp.iml" /> <module fileurl="file://$PROJECT_DIR$/tools/chrome-rdp/teavm-chrome-rdp.iml" filepath="$PROJECT_DIR$/tools/chrome-rdp/teavm-chrome-rdp.iml" />
<module fileurl="file://$PROJECT_DIR$/classlib/teavm-classlib.iml" filepath="$PROJECT_DIR$/classlib/teavm-classlib.iml" /> <module fileurl="file://$PROJECT_DIR$/classlib/teavm-classlib.iml" filepath="$PROJECT_DIR$/classlib/teavm-classlib.iml" />
@ -14,6 +15,7 @@
<module fileurl="file://$PROJECT_DIR$/jso/core/teavm-jso.iml" filepath="$PROJECT_DIR$/jso/core/teavm-jso.iml" /> <module fileurl="file://$PROJECT_DIR$/jso/core/teavm-jso.iml" filepath="$PROJECT_DIR$/jso/core/teavm-jso.iml" />
<module fileurl="file://$PROJECT_DIR$/jso/apis/teavm-jso-apis.iml" filepath="$PROJECT_DIR$/jso/apis/teavm-jso-apis.iml" /> <module fileurl="file://$PROJECT_DIR$/jso/apis/teavm-jso-apis.iml" filepath="$PROJECT_DIR$/jso/apis/teavm-jso-apis.iml" />
<module fileurl="file://$PROJECT_DIR$/jso/impl/teavm-jso-impl.iml" filepath="$PROJECT_DIR$/jso/impl/teavm-jso-impl.iml" /> <module fileurl="file://$PROJECT_DIR$/jso/impl/teavm-jso-impl.iml" filepath="$PROJECT_DIR$/jso/impl/teavm-jso-impl.iml" />
<module fileurl="file://$PROJECT_DIR$/tools/junit/teavm-junit.iml" filepath="$PROJECT_DIR$/tools/junit/teavm-junit.iml" />
<module fileurl="file://$PROJECT_DIR$/tools/maven/teavm-maven.iml" filepath="$PROJECT_DIR$/tools/maven/teavm-maven.iml" /> <module fileurl="file://$PROJECT_DIR$/tools/maven/teavm-maven.iml" filepath="$PROJECT_DIR$/tools/maven/teavm-maven.iml" />
<module fileurl="file://$PROJECT_DIR$/tools/maven/plugin/teavm-maven-plugin.iml" filepath="$PROJECT_DIR$/tools/maven/plugin/teavm-maven-plugin.iml" /> <module fileurl="file://$PROJECT_DIR$/tools/maven/plugin/teavm-maven-plugin.iml" filepath="$PROJECT_DIR$/tools/maven/plugin/teavm-maven-plugin.iml" />
<module fileurl="file://$PROJECT_DIR$/tools/maven/webapp/teavm-maven-webapp.iml" filepath="$PROJECT_DIR$/tools/maven/webapp/teavm-maven-webapp.iml" /> <module fileurl="file://$PROJECT_DIR$/tools/maven/webapp/teavm-maven-webapp.iml" filepath="$PROJECT_DIR$/tools/maven/webapp/teavm-maven-webapp.iml" />

View File

@ -0,0 +1,29 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="run-tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.teavm.classlib.java.lang.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="teavm-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.teavm" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -Dteavm.junit.target=target/js-tests" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$MODULE_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<dir value="$PROJECT_DIR$/../../idea-debug/teavm/tests/src/test/java" />
<patterns />
<method />
</configuration>
</component>

25
all-deps/all-deps.iml Normal file
View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="teavm-classlib" exported="" />
<orderEntry type="module" module-name="teavm-cli" exported="" />
<orderEntry type="module" module-name="teavm-core" exported="" />
<orderEntry type="module" module-name="teavm-jso-apis" exported="" />
<orderEntry type="module" module-name="teavm-jso-impl" exported="" />
<orderEntry type="module" module-name="teavm-metaprogramming-api" exported="" />
<orderEntry type="module" module-name="teavm-platform" exported="" />
<orderEntry type="module" module-name="teavm-tests" exported="" />
<orderEntry type="module" module-name="teavm-tooling" exported="" />
<orderEntry type="module" module-name="teavm-samples-async" exported="" />
<orderEntry type="module" module-name="teavm-samples-benchmark" exported="" />
<orderEntry type="module" module-name="teavm-samples-hello" exported="" />
<orderEntry type="module" module-name="teavm-samples-kotlin" exported="" />
<orderEntry type="module" module-name="teavm-samples-scala" exported="" />
<orderEntry type="module" module-name="teavm-samples-storage" exported="" />
<orderEntry type="module" module-name="teavm-samples-video" exported="" />
</component>
</module>

View File

@ -26,6 +26,9 @@
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>TeaVM core</name>
<description>TeaVM compiler and SPI</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@ -57,9 +60,6 @@
</dependency> </dependency>
</dependencies> </dependencies>
<name>TeaVM core</name>
<description>TeaVM compiler and SPI</description>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

View File

@ -92,6 +92,7 @@
<module>tools/cli</module> <module>tools/cli</module>
<module>tools/maven</module> <module>tools/maven</module>
<module>tools/chrome-rdp</module> <module>tools/chrome-rdp</module>
<module>tools/junit</module>
<module>tests</module> <module>tests</module>
<module>extras-slf4j</module> <module>extras-slf4j</module>
</modules> </modules>

View File

@ -73,6 +73,12 @@
<version>${project.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.teavm</groupId>
<artifactId>teavm-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -19,8 +19,11 @@ package org.teavm.classlib.java.io;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.io.*; import java.io.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@SuppressWarnings("resource") @SuppressWarnings("resource")
@RunWith(TeaVMTestRunner.class)
public class BufferedInputStreamTest { public class BufferedInputStreamTest {
byte[] ibuf = new byte[4096]; byte[] ibuf = new byte[4096];
@ -35,20 +38,6 @@ public class BufferedInputStreamTest {
} }
} }
static class MockBufferedInputStream extends BufferedInputStream {
static byte[] buf;
MockBufferedInputStream(InputStream is) {
super(is);
buf = super.buf;
}
MockBufferedInputStream(InputStream is, int size) {
super(is, size);
buf = super.buf;
}
}
@Test @Test
public void test_available() throws IOException { public void test_available() throws IOException {
ByteArrayInputStream isFile = new ByteArrayInputStream(new byte[] { 2, 3, 5, 7, 11 }); ByteArrayInputStream isFile = new ByteArrayInputStream(new byte[] { 2, 3, 5, 7, 11 });

View File

@ -20,11 +20,14 @@ import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.StringReader; import java.io.StringReader;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
*/ */
@RunWith(TeaVMTestRunner.class)
public class BufferedReaderTest { public class BufferedReaderTest {
@Test @Test
public void readsCharacters() throws IOException { public void readsCharacters() throws IOException {

View File

@ -20,11 +20,10 @@ import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class InputStreamReaderTest { public class InputStreamReaderTest {
@Test @Test
public void readsChars() throws IOException { public void readsChars() throws IOException {

View File

@ -24,8 +24,11 @@ import java.io.InputStreamReader;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
import static org.junit.Assert.*; import static org.junit.Assert.*;
@RunWith(TeaVMTestRunner.class)
public class OutputStreamWriterTest { public class OutputStreamWriterTest {
private static final int UPPER = 0xd800; private static final int UPPER = 0xd800;

View File

@ -21,8 +21,11 @@ import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.PushbackInputStream; import java.io.PushbackInputStream;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@SuppressWarnings("resource") @SuppressWarnings("resource")
@RunWith(TeaVMTestRunner.class)
public class PushbackInputStreamTest { public class PushbackInputStreamTest {
PushbackInputStream pis; PushbackInputStream pis;

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class BooleanTest { public class BooleanTest {
@Test @Test
public void parsesBoolean() { public void parsesBoolean() {

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class CharacterTest { public class CharacterTest {
@Test @Test
public void digitsRecognized() { public void digitsRecognized() {

View File

@ -20,11 +20,10 @@ import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ClassLoaderTest { public class ClassLoaderTest {
@Test @Test
public void loadsResources() { public void loadsResources() {

View File

@ -24,11 +24,10 @@ import java.lang.annotation.Annotation;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ClassTest { public class ClassTest {
@Test @Test
public void classNameEvaluated() { public void classNameEvaluated() {

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class DoubleTest { public class DoubleTest {
@Test @Test
public void parsed() { public void parsed() {

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class EnumTest { public class EnumTest {
private enum Foo { private enum Foo {
A, B, C A, B, C

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class FloatTest { public class FloatTest {
@Test @Test
public void parsed() { public void parsed() {

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class IntegerTest { public class IntegerTest {
@Test @Test
public void parsesInteger() { public void parsesInteger() {

View File

@ -4,11 +4,10 @@ import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class LambdaTest { public class LambdaTest {
@Test @Test
public void lambdaWorks() { public void lambdaWorks() {

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class MathTest { public class MathTest {
@Test @Test
public void sinComputed() { public void sinComputed() {

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ObjectTest { public class ObjectTest {
@Test @Test
public void objectCreated() { public void objectCreated() {

View File

@ -17,11 +17,10 @@ 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.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class StringBuilderTest { public class StringBuilderTest {
@Test @Test
public void integerAppended() { public void integerAppended() {

View File

@ -18,11 +18,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class StringTest { public class StringTest {
@Test @Test
public void charsExtracted() { public void charsExtracted() {

View File

@ -17,11 +17,10 @@ package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class SystemTest { public class SystemTest {
@Test @Test
public void copiesArray() { public void copiesArray() {

View File

@ -15,10 +15,6 @@
*/ */
package org.teavm.classlib.java.lang; package org.teavm.classlib.java.lang;
/**
*
* @author Alexey Andreev
*/
public class TestObject extends Object implements Runnable { public class TestObject extends Object implements Runnable {
private int counter; private int counter;

View File

@ -18,10 +18,6 @@ package org.teavm.classlib.java.lang;
import org.teavm.classlib.ResourceSupplier; import org.teavm.classlib.ResourceSupplier;
import org.teavm.model.ListableClassReaderSource; import org.teavm.model.ListableClassReaderSource;
/**
*
* @author Alexey Andreev
*/
public class TestResourcesSupplier implements ResourceSupplier { public class TestResourcesSupplier implements ResourceSupplier {
@Override @Override
public String[] supplyResources(ClassLoader classLoader, ListableClassReaderSource classSource) { public String[] supplyResources(ClassLoader classLoader, ListableClassReaderSource classSource) {

View File

@ -16,12 +16,16 @@
package org.teavm.classlib.java.lang; package org.teavm.classlib.java.lang;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.lang.annotation.Retention;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
*/ */
@RunWith(TeaVMTestRunner.class)
public class VMTest { public class VMTest {
@Test @Test
public void multiArrayCreated() { public void multiArrayCreated() {

View File

@ -18,11 +18,10 @@ package org.teavm.classlib.java.lang.reflect;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ArrayTest { public class ArrayTest {
@Test @Test
public void createsNewInstance() { public void createsNewInstance() {

View File

@ -23,11 +23,10 @@ import java.math.BigInteger;
import java.math.MathContext; 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.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigDecimal
* Methods: add, subtract, multiply, divide
*/
public class BigDecimalArithmeticTest { public class BigDecimalArithmeticTest {
/** /**
* Add two numbers of equal positive scales * Add two numbers of equal positive scales

View File

@ -26,12 +26,10 @@ import java.math.BigInteger;
import java.math.MathContext; 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.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigDecimal
* Methods: abs, compareTo, equals, hashCode,
* max, min, negate, signum
*/
public class BigDecimalCompareTest { public class BigDecimalCompareTest {
/** /**
* Abs() of a negative BigDecimal * Abs() of a negative BigDecimal

View File

@ -26,11 +26,10 @@ import java.math.BigInteger;
import java.math.MathContext; 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.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigDecimal
* Methods: constructors and fields
*/
public class BigDecimalConstructorsTest { public class BigDecimalConstructorsTest {
/** /**
* check ONE * check ONE

View File

@ -24,12 +24,10 @@ import static org.junit.Assert.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigDecimal
* Methods: doubleValue, floatValue, intValue, longValue,
* valueOf, toString, toBigInteger
*/
public class BigDecimalConvertTest { public class BigDecimalConvertTest {
/** /**
* Double value of a negative BigDecimal * Double value of a negative BigDecimal

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.*; import java.math.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigDecimal
* Methods: movePointLeft, movePointRight, scale, setScale, unscaledValue *
*/
public class BigDecimalScaleOperationsTest { public class BigDecimalScaleOperationsTest {
/** /**
* Check the default scale * Check the default scale

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Method: add
*/
public class BigIntegerAddTest { public class BigIntegerAddTest {
/** /**
* Add two positive numbers of the same length * Add two positive numbers of the same length

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Method: and
*/
public class BigIntegerAndTest { public class BigIntegerAndTest {
/** /**
* And for zero and a positive number * And for zero and a positive number

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Methods: abs, compareTo, equals, max, min, negate, signum
*/
public class BigIntegerCompareTest { public class BigIntegerCompareTest {
/** /**
* abs() for a positive number * abs() for a positive number

View File

@ -24,12 +24,10 @@ import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.Random; import java.util.Random;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Constructors: BigInteger(byte[] a), BigInteger(int sign, byte[] a),
* BigInteger(String val, int radix)
*/
public class BigIntegerConstructorsTest { public class BigIntegerConstructorsTest {
/** /**
* Create a number from an array of bytes. * Create a number from an array of bytes.

View File

@ -23,12 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Methods: intValue, longValue, toByteArray(), valueOf(long val),
* floatValue(), doubleValue()
*/
public class BigIntegerConvertTest { public class BigIntegerConvertTest {
/** /**
* Return the double value of ZERO. * Return the double value of ZERO.

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Methods: divide, remainder, mod, and divideAndRemainder
*/
public class BigIntegerDivideTest { public class BigIntegerDivideTest {
/** /**
* Divide by zero * Divide by zero

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Method: hashCode()
*/
public class BigIntegerHashCodeTest { public class BigIntegerHashCodeTest {
/** /**
* Test hash codes for the same object * Test hash codes for the same object

View File

@ -23,10 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger Methods: modPow, modInverse, and gcd
*/
public class BigIntegerModPowTest { public class BigIntegerModPowTest {
/** /**
* modPow: non-positive modulus * modPow: non-positive modulus

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Method: multiply
*/
public class BigIntegerMultiplyTest { public class BigIntegerMultiplyTest {
/** /**
* Multiply two negative numbers of the same length * Multiply two negative numbers of the same length

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Methods: and, andNot
*/
public class BigIntegerNotTest { public class BigIntegerNotTest {
/** /**
* andNot for two positive numbers; the first is longer * andNot for two positive numbers; the first is longer

View File

@ -23,12 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Methods: bitLength, shiftLeft, shiftRight,
* clearBit, flipBit, setBit, testBit
*/
public class BigIntegerOperateBitsTest { public class BigIntegerOperateBitsTest {
/** /**
* bitCount() of zero. * bitCount() of zero.

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Method: or
*/
public class BigIntegerOrTest { public class BigIntegerOrTest {
/** /**
* Or for zero and a positive number * Or for zero and a positive number

View File

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Method: subtract
*/
public class BigIntegerSubtractTest { public class BigIntegerSubtractTest {
/** /**
* Subtract two positive numbers of the same length. * Subtract two positive numbers of the same length.

View File

@ -22,12 +22,11 @@ package org.teavm.classlib.java.math;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
import static org.junit.Assert.*; import static org.junit.Assert.*;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Method: toString(int radix)
*/
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

@ -23,11 +23,10 @@ package org.teavm.classlib.java.math;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.math.BigInteger; import java.math.BigInteger;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* Class: java.math.BigInteger
* Method: xor
*/
public class BigIntegerXorTest { public class BigIntegerXorTest {
/** /**
* Xor for zero and a positive number * Xor for zero and a positive number

View File

@ -5,11 +5,10 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.nio.*; import java.nio.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ByteBufferTest { public class ByteBufferTest {
@Test @Test
public void allocatesDirect() { public void allocatesDirect() {

View File

@ -19,11 +19,10 @@ import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.nio.*; import java.nio.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ByteBufferWrapperTest { public class ByteBufferWrapperTest {
@Test @Test
public void wrapsIntoShortBuffer() { public void wrapsIntoShortBuffer() {

View File

@ -7,11 +7,10 @@ import static org.junit.Assert.fail;
import java.io.IOException; import java.io.IOException;
import java.nio.*; import java.nio.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class CharBufferTest { public class CharBufferTest {
@Test @Test
public void allocates() { public void allocates() {

View File

@ -21,11 +21,10 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.nio.*; import java.nio.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class DoubleBufferTest { public class DoubleBufferTest {
@Test @Test
public void allocatesSimple() { public void allocatesSimple() {

View File

@ -21,11 +21,10 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.nio.*; import java.nio.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class FloatBufferTest { public class FloatBufferTest {
@Test @Test
public void allocatesSimple() { public void allocatesSimple() {

View File

@ -21,11 +21,10 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.nio.*; import java.nio.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class IntBufferTest { public class IntBufferTest {
@Test @Test
public void allocatesSimple() { public void allocatesSimple() {

View File

@ -21,11 +21,10 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.nio.*; import java.nio.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class LongBufferTest { public class LongBufferTest {
@Test @Test
public void allocatesSimple() { public void allocatesSimple() {

View File

@ -5,11 +5,10 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.nio.*; import java.nio.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ShortBufferTest { public class ShortBufferTest {
@Test @Test
public void allocatesSimple() { public void allocatesSimple() {

View File

@ -9,11 +9,10 @@ import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult; import java.nio.charset.CoderResult;
import java.util.Arrays; import java.util.Arrays;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class UTF8Test { public class UTF8Test {
@Test @Test
public void encode1() { public void encode1() {

View File

@ -24,11 +24,10 @@ import java.util.GregorianCalendar;
import java.util.Locale; 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.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class DateFormatTest { public class DateFormatTest {
public DateFormatTest() { public DateFormatTest() {
TimeZone.setDefault(TimeZone.getTimeZone("GMT")); TimeZone.setDefault(TimeZone.getTimeZone("GMT"));

View File

@ -22,11 +22,10 @@ import java.text.DecimalFormatSymbols;
import java.text.ParseException; import java.text.ParseException;
import java.util.Locale; import java.util.Locale;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class DecimalFormatParseTest { public class DecimalFormatParseTest {
private static DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.ENGLISH); private static DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.ENGLISH);

View File

@ -24,11 +24,10 @@ import java.text.DecimalFormatSymbols;
import java.util.Currency; 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.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class DecimalFormatTest { public class DecimalFormatTest {
private static DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.ENGLISH); private static DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.ENGLISH);

View File

@ -6,11 +6,10 @@ import java.util.Currency;
import java.util.Locale; import java.util.Locale;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class NumberFormatTest { public class NumberFormatTest {
@Test @Test
public void formatsNumber() { public void formatsNumber() {

View File

@ -20,11 +20,10 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class SimpleDateFormatTest { public class SimpleDateFormatTest {
public SimpleDateFormatTest() { public SimpleDateFormatTest() {
TimeZone.setDefault(TimeZone.getTimeZone("GMT")); TimeZone.setDefault(TimeZone.getTimeZone("GMT"));

View File

@ -20,11 +20,10 @@ import java.util.ArrayDeque;
import java.util.Deque; import java.util.Deque;
import java.util.Iterator; import java.util.Iterator;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ArrayDequeTest { public class ArrayDequeTest {
@Test @Test
public void addsToFront() { public void addsToFront() {

View File

@ -20,11 +20,10 @@ import java.util.ArrayList;
import java.util.ConcurrentModificationException; import java.util.ConcurrentModificationException;
import java.util.List; import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ArrayListTest { public class ArrayListTest {
@Test @Test
public void elementsAdded() { public void elementsAdded() {

View File

@ -19,11 +19,10 @@ import static org.junit.Assert.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ArraysTest { public class ArraysTest {
@Test @Test
public void arraySorted() { public void arraySorted() {

View File

@ -35,7 +35,10 @@ import static org.junit.Assert.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.BitSet; import java.util.BitSet;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@RunWith(TeaVMTestRunner.class)
public class BitSetTest { public class BitSetTest {
BitSet eightbs; BitSet eightbs;

View File

@ -21,12 +21,11 @@ import java.util.GregorianCalendar;
import java.util.Locale; 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.teavm.junit.TeaVMTestRunner;
import static org.junit.Assert.*; import static org.junit.Assert.*;
/** @RunWith(TeaVMTestRunner.class)
*
* @author shannah
*/
public class CalendarTest { public class CalendarTest {
Locale defaultLocale; Locale defaultLocale;

View File

@ -21,11 +21,10 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class CollectionsTest { public class CollectionsTest {
@Test @Test
public void listSorted() { public void listSorted() {

View File

@ -20,11 +20,10 @@ import java.util.Currency;
import java.util.Locale; import java.util.Locale;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class CurrencyTest { public class CurrencyTest {
@Test @Test
public void findsByCode() { public void findsByCode() {

View File

@ -3,11 +3,10 @@ package org.teavm.classlib.java.util;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.util.Date; import java.util.Date;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class DateTest { public class DateTest {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Test @Test

View File

@ -47,9 +47,12 @@ import java.util.Set;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.Vector; import java.util.Vector;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.classlib.support.Support_MapTest2; import org.teavm.classlib.support.Support_MapTest2;
import org.teavm.classlib.support.Support_UnmodifiableCollectionTest; import org.teavm.classlib.support.Support_UnmodifiableCollectionTest;
import org.teavm.junit.TeaVMTestRunner;
@RunWith(TeaVMTestRunner.class)
public class HashtableTest { public class HashtableTest {
private Hashtable<String, String> ht10; private Hashtable<String, String> ht10;

View File

@ -20,11 +20,11 @@ import static org.junit.Assert.*;
import java.util.*; import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.classlib.support.Support_MapTest2; import org.teavm.classlib.support.Support_MapTest2;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
* @tests java.util.LinkedHashMap
*/
public class LinkedHashMapTest { public class LinkedHashMapTest {
LinkedHashMap<Object, Object> hm; LinkedHashMap<Object, Object> hm;

View File

@ -18,11 +18,10 @@ package org.teavm.classlib.java.util;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.util.*; import java.util.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class LinkedListTest { public class LinkedListTest {
@Test @Test
public void emptyListCreated() { public void emptyListCreated() {

View File

@ -18,11 +18,10 @@ package org.teavm.classlib.java.util;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.util.Locale; import java.util.Locale;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class LocaleTest { public class LocaleTest {
@Test @Test
public void availableLocalesFound() { public void availableLocalesFound() {

View File

@ -23,11 +23,10 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.PriorityQueue; import java.util.PriorityQueue;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class PriorityQueueTest { public class PriorityQueueTest {
@Test @Test
public void receivesElements() { public void receivesElements() {

View File

@ -18,11 +18,10 @@ package org.teavm.classlib.java.util;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.util.ServiceLoader; import java.util.ServiceLoader;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ServiceLoaderTest { public class ServiceLoaderTest {
@Test @Test
public void loadsService() { public void loadsService() {

View File

@ -21,7 +21,10 @@ import static org.junit.Assert.*;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@RunWith(TeaVMTestRunner.class)
public class StringTokenizerTest { public class StringTokenizerTest {
@Test @Test
public void test_ConstructorLjava_lang_StringLjava_lang_String() { public void test_ConstructorLjava_lang_StringLjava_lang_String() {

View File

@ -15,10 +15,14 @@
*/ */
package org.teavm.classlib.java.util; package org.teavm.classlib.java.util;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
*/ */
@RunWith(TeaVMTestRunner.class)
public interface TestService { public interface TestService {
void foo(); void foo();
} }

View File

@ -15,10 +15,14 @@
*/ */
package org.teavm.classlib.java.util; package org.teavm.classlib.java.util;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
*/ */
@RunWith(TeaVMTestRunner.class)
public class TestServiceImpl implements TestService { public class TestServiceImpl implements TestService {
private int counter; private int counter;

View File

@ -24,11 +24,14 @@ import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import java.util.TimeZone; import java.util.TimeZone;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
*/ */
@RunWith(TeaVMTestRunner.class)
public class TimeZoneTest { public class TimeZoneTest {
private static final int ONE_HOUR = 3600000; private static final int ONE_HOUR = 3600000;

View File

@ -35,7 +35,10 @@ import static org.junit.Assert.*;
import java.io.Serializable; import java.io.Serializable;
import java.util.*; import java.util.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@RunWith(TeaVMTestRunner.class)
public class TreeMapTest { public class TreeMapTest {
public static class ReversedComparator implements Comparator<Object> { public static class ReversedComparator implements Comparator<Object> {

View File

@ -40,8 +40,11 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.util.*; import java.util.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.classlib.support.Support_ListTest; import org.teavm.classlib.support.Support_ListTest;
import org.teavm.junit.TeaVMTestRunner;
@RunWith(TeaVMTestRunner.class)
public class VectorTest { public class VectorTest {
private Vector<Object> tVector = new Vector<>(); private Vector<Object> tVector = new Vector<>();

View File

@ -20,11 +20,11 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException; import java.util.regex.PatternSyntaxException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
import static org.junit.Assert.*; import static org.junit.Assert.*;
/** @RunWith(TeaVMTestRunner.class)
* Tests Matcher methods
*/
@SuppressWarnings("nls") @SuppressWarnings("nls")
public class Matcher2Test { public class Matcher2Test {
@Test @Test

View File

@ -21,9 +21,11 @@ import static org.junit.Assert.*;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@SuppressWarnings("nls") @SuppressWarnings("nls")
@RunWith(TeaVMTestRunner.class)
public class MatcherTest { public class MatcherTest {
String[] testPatterns = { String[] testPatterns = {
"(a|b)*abb", "(a|b)*abb",

View File

@ -21,11 +21,14 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException; import java.util.regex.PatternSyntaxException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* Tests Pattern compilation modes and modes triggered in pattern strings * Tests Pattern compilation modes and modes triggered in pattern strings
*/ */
@SuppressWarnings("nls") @SuppressWarnings("nls")
@RunWith(TeaVMTestRunner.class)
public class ModeTest { public class ModeTest {
@Test @Test
public void testCase() throws PatternSyntaxException { public void testCase() throws PatternSyntaxException {

View File

@ -21,11 +21,14 @@ import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException; import java.util.regex.PatternSyntaxException;
import org.junit.Test; import org.junit.Test;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* Tests simple Pattern compilation and Matcher methods * Tests simple Pattern compilation and Matcher methods
*/ */
@SuppressWarnings("nls") @SuppressWarnings("nls")
@RunWith(TeaVMTestRunner.class)
public class Pattern2Test extends TestCase { public class Pattern2Test extends TestCase {
@Test @Test
public void testSimpleMatch() throws PatternSyntaxException { public void testSimpleMatch() throws PatternSyntaxException {

View File

@ -19,11 +19,14 @@ package org.teavm.classlib.java.util.regex;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* Test boundary and error conditions in java.util.regex.Pattern * Test boundary and error conditions in java.util.regex.Pattern
*/ */
@SuppressWarnings("nls") @SuppressWarnings("nls")
@RunWith(TeaVMTestRunner.class)
public class PatternErrorTest { public class PatternErrorTest {
@Test @Test
public void testCompileErrors() throws Exception { public void testCompileErrors() throws Exception {

View File

@ -20,12 +20,14 @@ import static org.junit.Assert.*;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException; import java.util.regex.PatternSyntaxException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* TODO Type description * TODO Type description
*/ */
@SuppressWarnings("nls") @SuppressWarnings("nls")
@RunWith(TeaVMTestRunner.class)
public class PatternSyntaxExceptionTest { public class PatternSyntaxExceptionTest {
@Test @Test
public void testCase() { public void testCase() {

View File

@ -22,7 +22,10 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException; import java.util.regex.PatternSyntaxException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@RunWith(TeaVMTestRunner.class)
public class PatternTest { public class PatternTest {
String[] testPatterns = { String[] testPatterns = {
"(a|b)*abb", "(a|b)*abb",

View File

@ -21,7 +21,10 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException; import java.util.regex.PatternSyntaxException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@RunWith(TeaVMTestRunner.class)
public class ReplaceTest { public class ReplaceTest {
@Test @Test

View File

@ -22,7 +22,10 @@ import static org.junit.Assert.assertTrue;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException; import java.util.regex.PatternSyntaxException;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
@RunWith(TeaVMTestRunner.class)
public class SplitTest { public class SplitTest {
@Test @Test

View File

@ -20,11 +20,14 @@ import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.util.zip.GZIPInputStream; import java.util.zip.GZIPInputStream;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
*/ */
@RunWith(TeaVMTestRunner.class)
public class GZIPInputStreamTest { public class GZIPInputStreamTest {
@Test @Test
public void gzipInputWorks() throws IOException { public void gzipInputWorks() throws IOException {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2015 Alexey Andreev. * Copyright 2016 Alexey Andreev.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -17,15 +17,14 @@ package org.teavm.jso.test;
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.teavm.jso.JSBody; import org.teavm.jso.JSBody;
import org.teavm.jso.JSMethod; import org.teavm.jso.JSMethod;
import org.teavm.jso.JSObject; import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty; import org.teavm.jso.JSProperty;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class AnnotationsTest { public class AnnotationsTest {
@Test @Test
public void staticBodyWorks() { public void staticBodyWorks() {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2015 Alexey Andreev. * Copyright 2016 Alexey Andreev.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -17,15 +17,14 @@ package org.teavm.jso.test;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.jso.JSBody; import org.teavm.jso.JSBody;
import org.teavm.jso.JSObject; import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty; import org.teavm.jso.JSProperty;
import org.teavm.jso.core.JSString; import org.teavm.jso.core.JSString;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class ConversionTest { public class ConversionTest {
@Test @Test
public void convertsPrimitivesToJavaScript() { public void convertsPrimitivesToJavaScript() {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2015 Alexey Andreev. * Copyright 2016 Alexey Andreev.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -17,14 +17,13 @@ package org.teavm.jso.test;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.jso.JSBody; import org.teavm.jso.JSBody;
import org.teavm.jso.JSFunctor; import org.teavm.jso.JSFunctor;
import org.teavm.jso.JSObject; import org.teavm.jso.JSObject;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class FunctorTest { public class FunctorTest {
@Test @Test
public void functorPassed() { public void functorPassed() {

View File

@ -17,13 +17,16 @@ package org.teavm.jso.test;
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.teavm.jso.JSBody; import org.teavm.jso.JSBody;
import org.teavm.jso.JSObject; import org.teavm.jso.JSObject;
import org.teavm.junit.TeaVMTestRunner;
/** /**
* *
* @author Alexey Andreev * @author Alexey Andreev
*/ */
@RunWith(TeaVMTestRunner.class)
public class ImplementationTest { public class ImplementationTest {
@Test @Test
public void respectsPrecedence() { public void respectsPrecedence() {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2015 Alexey Andreev. * Copyright 2016 Alexey Andreev.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -17,13 +17,12 @@ package org.teavm.jso.test;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.jso.JSBody; import org.teavm.jso.JSBody;
import org.teavm.jso.JSObject; import org.teavm.jso.JSObject;
import org.teavm.junit.TeaVMTestRunner;
/** @RunWith(TeaVMTestRunner.class)
*
* @author Alexey Andreev
*/
public class JavaInvocationTest { public class JavaInvocationTest {
@Test @Test
public void callStaticMethod() { public void callStaticMethod() {

Some files were not shown because too many files have changed in this diff Show More