diff --git a/engine/runtime/src/test/java/org/enso/interpreter/test/MetaObjectTest.java b/engine/runtime/src/test/java/org/enso/interpreter/test/MetaObjectTest.java index 338df1382d407..8535baba9ab82 100644 --- a/engine/runtime/src/test/java/org/enso/interpreter/test/MetaObjectTest.java +++ b/engine/runtime/src/test/java/org/enso/interpreter/test/MetaObjectTest.java @@ -1,27 +1,21 @@ package org.enso.interpreter.test; -import java.io.ByteArrayOutputStream; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import java.io.PrintWriter; import java.io.StringWriter; import java.net.URI; -import java.nio.file.Paths; import java.util.HashSet; import java.util.LinkedHashSet; -import java.util.Map; import java.util.Set; import org.enso.interpreter.runtime.type.ConstantsGen; -import org.enso.polyglot.RuntimeOptions; import org.graalvm.polyglot.Context; -import org.graalvm.polyglot.Engine; -import org.graalvm.polyglot.Language; import org.graalvm.polyglot.Source; import org.graalvm.polyglot.Value; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/engine/runtime/src/test/java/org/enso/interpreter/test/ValuesGenerator.java b/engine/runtime/src/test/java/org/enso/interpreter/test/ValuesGenerator.java index b8493361eb451..2e47cb65c18e7 100644 --- a/engine/runtime/src/test/java/org/enso/interpreter/test/ValuesGenerator.java +++ b/engine/runtime/src/test/java/org/enso/interpreter/test/ValuesGenerator.java @@ -131,6 +131,12 @@ public Value typeDecimal() { """, "Decimal").type(); } + public Value typeNan() { + return v("typeNan", """ + from Standard.Base import Nothing, Vector, Number, Decimal, Integer, Nan + """, "Nan").type(); + } + public Value typeBoolean() { return v("typeBoolean", """ import Standard.Base.Data.Boolean.Boolean @@ -279,6 +285,7 @@ public List numbers() { collect.add(v(null, "", "123 * 10^40").type()); collect.add(v(null, "", "123 * 10^40 + 0.0").type()); collect.add(v(null, "", "123 * 10^40 + 1.0").type()); + collect.add(v(null, "import Standard.Base.Data.Numbers.Number", "Number.nan").type()); } if (languages.contains(Language.JAVA)) { @@ -288,6 +295,7 @@ public List numbers() { collect.add(ctx.asValue((long) 5435432)); collect.add(ctx.asValue((float) Math.PI)); collect.add(ctx.asValue((double) Math.E)); + collect.add(ctx.asValue(Double.NaN)); } for (var v : collect) {