From 4a55f5a65ee98ad0664e7391adf086762ae74ed8 Mon Sep 17 00:00:00 2001 From: Erokhin Stanislav Date: Thu, 17 Oct 2013 21:25:51 +0400 Subject: [PATCH] JS backend: add simple enum test --- .../test/org/jetbrains/k2js/test/semantics/EnumTest.java | 6 +++++- .../enum/cases/{simple.kt => enumWithInheritance.kt} | 0 js/js.translator/testFiles/enum/cases/simpleEnum.kt | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) rename js/js.translator/testFiles/enum/cases/{simple.kt => enumWithInheritance.kt} (100%) create mode 100644 js/js.translator/testFiles/enum/cases/simpleEnum.kt diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/EnumTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/EnumTest.java index 0114646a432..305918762c9 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/EnumTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/EnumTest.java @@ -23,7 +23,11 @@ public class EnumTest extends SingleFileTranslationTest { super("enum/"); } - public void testSimple() throws Exception { + public void testSimpleEnum() throws Exception { + checkFooBoxIsOk(); + } + + public void testEnumWithInheritance() throws Exception { checkFooBoxIsOk(); } diff --git a/js/js.translator/testFiles/enum/cases/simple.kt b/js/js.translator/testFiles/enum/cases/enumWithInheritance.kt similarity index 100% rename from js/js.translator/testFiles/enum/cases/simple.kt rename to js/js.translator/testFiles/enum/cases/enumWithInheritance.kt diff --git a/js/js.translator/testFiles/enum/cases/simpleEnum.kt b/js/js.translator/testFiles/enum/cases/simpleEnum.kt new file mode 100644 index 00000000000..37b63efc2ef --- /dev/null +++ b/js/js.translator/testFiles/enum/cases/simpleEnum.kt @@ -0,0 +1,9 @@ +package foo + +enum class E { + OK +} + +fun box(): String { + return E.OK.name() +} \ No newline at end of file