Refactor multiplatform test cases in MultiModuleHighlightingTest

Groupt multiplatform test cases in a nested class, get rid of duplicated
code, rename "header" -> "common" where it relates to the common module
This commit is contained in:
Alexander Udalov
2017-04-13 16:29:09 +03:00
parent c41818b6a7
commit 722687acd6
14 changed files with 36 additions and 66 deletions
@@ -0,0 +1,23 @@
header class <error>My</error> {
fun foo(): Int
fun bar(arg: Int): Boolean
}
header class <error>Your</error> {
fun foo(): Int
fun bar(arg: Int): Boolean
}
header class His {
fun foo(): Int
fun bar(arg: Int): Boolean
}
@@ -0,0 +1,20 @@
<error descr="[IMPLEMENTATION_WITHOUT_HEADER] Modifier 'impl' is only applicable to members that are initially declared in platform-independent code">impl</error> class My {
<error descr="[IMPLEMENTATION_WITHOUT_HEADER] Modifier 'impl' is only applicable to members that are initially declared in platform-independent code">impl</error> fun foo() = 42
}
<error descr="[IMPLEMENTATION_WITHOUT_HEADER] Modifier 'impl' is only applicable to members that are initially declared in platform-independent code">impl</error> class Your {
<error descr="[IMPLEMENTATION_WITHOUT_HEADER] Modifier 'impl' is only applicable to members that are initially declared in platform-independent code">impl</error> fun foo() = 13
<error descr="[IMPLEMENTATION_WITHOUT_HEADER] Modifier 'impl' is only applicable to members that are initially declared in platform-independent code">impl</error> fun bar(arg: Int) = arg
}
impl class His {
impl fun foo() = 7
impl fun bar(arg: Int) = arg == foo()
}