mirror of
https://github.com/enso-org/enso.git
synced 2024-12-24 04:24:01 +03:00
Reorganise tests and benchmarks (#185)
This commit is contained in:
parent
457a8128e8
commit
4b6b69498d
@ -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;
|
||||||
|
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -1,4 +1,4 @@
|
|||||||
package org.enso.interpreter
|
package org.enso.interpreter.bench
|
||||||
|
|
||||||
import org.scalatest.{FlatSpec, Matchers}
|
import org.scalatest.{FlatSpec, Matchers}
|
||||||
|
|
@ -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
|
@ -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
|
@ -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
|
@ -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;
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
@ -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) {
|
@ -1,4 +1,4 @@
|
|||||||
package org.enso.interpreter
|
package org.enso.interpreter.test.semantic
|
||||||
|
|
||||||
import org.graalvm.polyglot.PolyglotException
|
import org.graalvm.polyglot.PolyglotException
|
||||||
|
|
@ -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 {
|
@ -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 {
|
@ -1,4 +1,4 @@
|
|||||||
package org.enso.interpreter
|
package org.enso.interpreter.test.semantic
|
||||||
|
|
||||||
import org.graalvm.polyglot.PolyglotException
|
import org.graalvm.polyglot.PolyglotException
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.enso.interpreter
|
package org.enso.interpreter.test.semantic
|
||||||
|
|
||||||
import org.graalvm.polyglot.PolyglotException
|
import org.graalvm.polyglot.PolyglotException
|
||||||
|
|
@ -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 {
|
@ -1,4 +1,4 @@
|
|||||||
package org.enso.interpreter
|
package org.enso.interpreter.test.semantic
|
||||||
|
|
||||||
import org.graalvm.polyglot.PolyglotException
|
import org.graalvm.polyglot.PolyglotException
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.enso.interpreter
|
package org.enso.interpreter.test.semantic
|
||||||
|
|
||||||
import org.graalvm.polyglot.PolyglotException
|
import org.graalvm.polyglot.PolyglotException
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.enso.interpreter
|
package org.enso.interpreter.test.semantic
|
||||||
|
|
||||||
import org.graalvm.polyglot.PolyglotException
|
import org.graalvm.polyglot.PolyglotException
|
||||||
|
|
@ -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 {
|
||||||
|
|
@ -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 {
|
Loading…
Reference in New Issue
Block a user