Reorganise tests and benchmarks (#185)

This commit is contained in:
Ara Adkins 2019-09-13 17:17:58 +01:00 committed by GitHub
parent 457a8128e8
commit 4b6b69498d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 40 additions and 43 deletions

View File

@ -1,4 +1,4 @@
package org.enso.interpreter; package org.enso.interpreter.bench;
import org.openjdk.jmh.results.Result; import org.openjdk.jmh.results.Result;

View File

@ -1,4 +1,4 @@
package org.enso.interpreter; package org.enso.interpreter.bench;
import org.openjdk.jmh.results.Result; import org.openjdk.jmh.results.Result;
import org.openjdk.jmh.results.RunResult; import org.openjdk.jmh.results.RunResult;

View File

@ -1,4 +1,4 @@
package org.enso.interpreter; package org.enso.interpreter.bench;
import org.openjdk.jmh.results.RunResult; import org.openjdk.jmh.results.RunResult;
import org.openjdk.jmh.runner.BenchmarkList; import org.openjdk.jmh.runner.BenchmarkList;

View File

@ -1,4 +1,4 @@
package org.enso.interpreter; package org.enso.interpreter.bench;
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException; import javax.xml.bind.JAXBException;

View File

@ -1,4 +1,4 @@
package org.enso.interpreter; package org.enso.interpreter.bench;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlElementWrapper;

View File

@ -1,6 +1,6 @@
package org.enso.interpreter.benchmarks; package org.enso.interpreter.bench.benchmarks.semantic;
import org.enso.interpreter.fixtures.AtomFixtures; import org.enso.interpreter.bench.fixtures.semantic.AtomFixtures;
import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.annotations.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;

View File

@ -1,6 +1,6 @@
package org.enso.interpreter.benchmarks; package org.enso.interpreter.bench.benchmarks.semantic;
import org.enso.interpreter.fixtures.NamedDefaultedArgumentFixtures; import org.enso.interpreter.bench.fixtures.semantic.NamedDefaultedArgumentFixtures;
import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.annotations.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;

View File

@ -1,6 +1,6 @@
package org.enso.interpreter.benchmarks; package org.enso.interpreter.bench.benchmarks.semantic;
import org.enso.interpreter.fixtures.RecursionFixtures; import org.enso.interpreter.bench.fixtures.semantic.RecursionFixtures;
import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.annotations.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.bench
import org.scalatest.{FlatSpec, Matchers} import org.scalatest.{FlatSpec, Matchers}

View File

@ -1,6 +1,6 @@
package org.enso.interpreter.fixtures package org.enso.interpreter.bench.fixtures.semantic
import org.enso.interpreter.LanguageRunner import org.enso.interpreter.test.semantic.LanguageRunner
class AtomFixtures extends LanguageRunner { class AtomFixtures extends LanguageRunner {
val million: Long = 1000000 val million: Long = 1000000

View File

@ -1,6 +1,6 @@
package org.enso.interpreter.fixtures package org.enso.interpreter.bench.fixtures.semantic
import org.enso.interpreter.LanguageRunner import org.enso.interpreter.test.semantic.LanguageRunner
class NamedDefaultedArgumentFixtures extends LanguageRunner { class NamedDefaultedArgumentFixtures extends LanguageRunner {
val hundredMillion: Long = 100000000 val hundredMillion: Long = 100000000

View File

@ -1,7 +1,7 @@
package org.enso.interpreter.fixtures package org.enso.interpreter.bench.fixtures.semantic
import org.enso.interpreter.Constants import org.enso.interpreter.Constants
import org.enso.interpreter.LanguageRunner import org.enso.interpreter.test.semantic.LanguageRunner
class RecursionFixtures extends LanguageRunner { class RecursionFixtures extends LanguageRunner {
val hundredMillion: Long = 100000000 val hundredMillion: Long = 100000000

View File

@ -5,7 +5,7 @@ import org.enso.interpreter.node.BaseNode;
import org.enso.interpreter.node.callable.InvokeCallableNode; import org.enso.interpreter.node.callable.InvokeCallableNode;
import org.enso.interpreter.node.callable.InvokeCallableNodeGen; import org.enso.interpreter.node.callable.InvokeCallableNodeGen;
import org.enso.interpreter.node.callable.dispatch.CallOptimiserNode; import org.enso.interpreter.node.callable.dispatch.CallOptimiserNode;
import org.enso.interpreter.optimiser.tco.TailCallException; import org.enso.interpreter.runtime.control.TailCallException;
import org.enso.interpreter.runtime.callable.argument.CallArgumentInfo; import org.enso.interpreter.runtime.callable.argument.CallArgumentInfo;
import org.enso.interpreter.runtime.callable.argument.CallArgumentInfo.ArgumentMapping; import org.enso.interpreter.runtime.callable.argument.CallArgumentInfo.ArgumentMapping;
import org.enso.interpreter.runtime.callable.argument.CallArgumentInfo.ArgumentMappingBuilder; import org.enso.interpreter.runtime.callable.argument.CallArgumentInfo.ArgumentMappingBuilder;

View File

@ -7,7 +7,7 @@ import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RepeatingNode;
import org.enso.interpreter.node.callable.ExecuteCallNode; import org.enso.interpreter.node.callable.ExecuteCallNode;
import org.enso.interpreter.node.callable.ExecuteCallNodeGen; import org.enso.interpreter.node.callable.ExecuteCallNodeGen;
import org.enso.interpreter.optimiser.tco.TailCallException; import org.enso.interpreter.runtime.control.TailCallException;
/** /**
* A version of {@link CallOptimiserNode} that is fully prepared to handle tail calls. Tail calls * A version of {@link CallOptimiserNode} that is fully prepared to handle tail calls. Tail calls

View File

@ -3,7 +3,7 @@ package org.enso.interpreter.node.callable.dispatch;
import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives;
import org.enso.interpreter.node.callable.ExecuteCallNode; import org.enso.interpreter.node.callable.ExecuteCallNode;
import org.enso.interpreter.node.callable.ExecuteCallNodeGen; import org.enso.interpreter.node.callable.ExecuteCallNodeGen;
import org.enso.interpreter.optimiser.tco.TailCallException; import org.enso.interpreter.runtime.control.TailCallException;
/** /**
* Optimistic version of {@link CallOptimiserNode} for the non tail call recursive case. Tries to * Optimistic version of {@link CallOptimiserNode} for the non tail call recursive case. Tries to

View File

@ -1,4 +1,4 @@
package org.enso.interpreter.optimiser.tco; package org.enso.interpreter.runtime.control;
import com.oracle.truffle.api.nodes.ControlFlowException; import com.oracle.truffle.api.nodes.ControlFlowException;
import org.enso.interpreter.runtime.callable.function.Function; import org.enso.interpreter.runtime.callable.function.Function;

View File

@ -1,10 +1,9 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
import org.graalvm.polyglot.Context import org.enso.interpreter.{AstGlobalScope, Constants, EnsoParser}
import org.graalvm.polyglot.Value import org.graalvm.polyglot.{Context, Value}
import org.scalactic.Equality import org.scalactic.Equality
import org.scalatest.FlatSpec import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.Matchers
trait LanguageRunner { trait LanguageRunner {
implicit class RichValue(value: Value) { implicit class RichValue(value: Value) {

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
import org.graalvm.polyglot.PolyglotException import org.graalvm.polyglot.PolyglotException

View File

@ -1,4 +1,4 @@
package org.enso.interpreter; package org.enso.interpreter.test.semantic
class CurryingTest extends LanguageTest { class CurryingTest extends LanguageTest {
"Functions" should "allow partial application" in { "Functions" should "allow partial application" in {

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
class FunctionArgumentsTest extends LanguageTest { class FunctionArgumentsTest extends LanguageTest {
"Functions" should "take arguments and use them in their bodies" in { "Functions" should "take arguments and use them in their bodies" in {

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
import org.graalvm.polyglot.PolyglotException import org.graalvm.polyglot.PolyglotException

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
import org.graalvm.polyglot.PolyglotException import org.graalvm.polyglot.PolyglotException

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
class InteropTest extends LanguageTest { class InteropTest extends LanguageTest {
"Interop library" should "support tail recursive functions" in { "Interop library" should "support tail recursive functions" in {

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
import org.graalvm.polyglot.PolyglotException import org.graalvm.polyglot.PolyglotException

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
import org.graalvm.polyglot.PolyglotException import org.graalvm.polyglot.PolyglotException

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
import org.graalvm.polyglot.PolyglotException import org.graalvm.polyglot.PolyglotException

View File

@ -1,14 +1,12 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
import java.io.File import java.io.File
import org.enso.interpreter.Constants
import org.enso.interpreter.runtime.RuntimeOptions import org.enso.interpreter.runtime.RuntimeOptions
import org.graalvm.polyglot.Context
import org.graalvm.polyglot.Source
import org.graalvm.polyglot.Value
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.enso.pkg.Package import org.enso.pkg.Package
import org.graalvm.polyglot.{Context, Source, Value}
import org.scalatest.{FlatSpec, Matchers}
trait PackageTest extends FlatSpec with Matchers with ValueEquality { trait PackageTest extends FlatSpec with Matchers with ValueEquality {

View File

@ -1,4 +1,4 @@
package org.enso.interpreter package org.enso.interpreter.test.semantic
class SimpleArithmeticTest extends LanguageTest { class SimpleArithmeticTest extends LanguageTest {
"1 + 1" should "equal 2" in { "1 + 1" should "equal 2" in {