Skip to content

Commit

Permalink
KT-1973 added tests.
Browse files Browse the repository at this point in the history
 #KT-1973 Fixed
  • Loading branch information
Evgeny Gerashchenko authored and Evgeny Gerashchenko committed Oct 3, 2012
1 parent f33669b commit 22e62c5
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/testData/loadKotlin/class/NamedObject.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package test

public object Obj {
public val v: String = "val"
public fun f(): String = "fun"
}
8 changes: 8 additions & 0 deletions compiler/testData/loadKotlin/class/NamedObject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace test

public final object test.Obj : jet.Any {
private final /*constructor*/ fun <init>(): test.Obj
public final fun f(): jet.String
public final val v: jet.String
}
public final val Obj: test.Obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package test

public object Obj {
public val v: String = "val"
public fun f(): String = "fun"
}

val x = 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace test

public final object test.Obj : jet.Any {
private final /*constructor*/ fun <init>(): test.Obj
public final fun f(): jet.String
public final val v: jet.String
}
public final val Obj: test.Obj
internal final val x: jet.Int
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ public void testInnerClassExtendInnerClass() throws Exception {
doTest("compiler/testData/loadKotlin/class/InnerClassExtendInnerClass.kt");
}

@TestMetadata("NamedObject.kt")
public void testNamedObject() throws Exception {
doTest("compiler/testData/loadKotlin/class/NamedObject.kt");
}

@TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt")
public void testNamedObjectWithAnotherTopLevelProperty() throws Exception {
doTest("compiler/testData/loadKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt");
}

@TestMetadata("Trait.kt")
public void testTrait() throws Exception {
doTest("compiler/testData/loadKotlin/class/Trait.kt");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ public void testInnerClassExtendInnerClass() throws Exception {
doTestSinglePackage("compiler/testData/loadKotlin/class/InnerClassExtendInnerClass.kt");
}

@TestMetadata("NamedObject.kt")
public void testNamedObject() throws Exception {
doTestSinglePackage("compiler/testData/loadKotlin/class/NamedObject.kt");
}

@TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt")
public void testNamedObjectWithAnotherTopLevelProperty() throws Exception {
doTestSinglePackage("compiler/testData/loadKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt");
}

@TestMetadata("Trait.kt")
public void testTrait() throws Exception {
doTestSinglePackage("compiler/testData/loadKotlin/class/Trait.kt");
Expand Down

0 comments on commit 22e62c5

Please sign in to comment.