From 9b2e28c76e898f7c556876142fa7b4f783f55ae9 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 3 Jul 2012 08:54:25 +0100 Subject: [PATCH] fixed test case --- .../test/semantics/ExtensionFunctionTest.java | 2 +- ...ertyOnClassWithExplicitAndImplicitReceiver.kt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionFunctionTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionFunctionTest.java index 5a4ffb1f522..643c15cb047 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionFunctionTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/ExtensionFunctionTest.java @@ -71,7 +71,7 @@ public final class ExtensionFunctionTest extends SingleFileTranslationTest { fooBoxTest(); } - public void TODO_FIXME_testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception { + public void testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception { fooBoxTest(); } } diff --git a/js/js.translator/testFiles/extensionFunction/cases/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt b/js/js.translator/testFiles/extensionFunction/cases/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt index 7ac6a24099c..b957fb7822d 100644 --- a/js/js.translator/testFiles/extensionFunction/cases/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt +++ b/js/js.translator/testFiles/extensionFunction/cases/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt @@ -2,25 +2,25 @@ package foo class Foo { - fun blah(): Int { - return 6 + fun blah(value: Int): Int { + return value + 1 } } -val Foo.fooImp : String +val Foo.fooImp : Int get() { - return "implProp" + blah() + return blah(5) } -val Foo.fooExp() : String +val Foo.fooExp : Int get() { - return "explProp" + this.blah() + return this.blah(10) } fun box() : Boolean { var a = Foo() - if (a.fooImp != "implProp6") return false - if (a.fooExp != "explProp6") return false + if (a.fooImp != 6) return false + if (a.fooExp != 11) return false return true; } \ No newline at end of file