New J2K: Split old j2k and new j2k tests

This commit is contained in:
Ilya Kirillov
2019-03-28 14:20:17 +03:00
committed by Ilya Kirillov
parent 02a206bf7c
commit b411e8e18e
1631 changed files with 14067 additions and 1513 deletions
-29
View File
@@ -1,29 +0,0 @@
// ERROR: Class 'A' is not abstract and does not implement abstract member public abstract fun run(): Unit defined in java.lang.Runnable
package foo
// we use package 'foo'
// imports:
import java.util.ArrayList
// we need ArrayList
// let's declare a class:
internal class A /* just a sample name*/ : Runnable /* let's implement Runnable */ {
fun foo /* again a sample name */(p: Int /* parameter p */, c: Char /* parameter c */) {
// let's print something:
println("1") // print 1
println("2") // print 2
println("3") // print 3
// end of printing
if (p > 0) { // do this only when p > 0
// we print 4 and return
println("3")
return // do not continue
}
// some code to be added
}
} // end of class A
-33
View File
@@ -1,33 +0,0 @@
// ERROR: A 'return' expression required in a function with a block body ('{...}')
// ERROR: A 'return' expression required in a function with a block body ('{...}')
package foo
internal class A {
private/*it's private*/ val field = 0
fun /* nothing to return */ foo(/* no parameters at all */) {
// let declare a variable
// with 2 comments before
val /*int*/ a /* it's a */ = 2 /* it's 2 */ + 1 /* it's 1 */ // variable a declared
} // end of foo
fun /* we return int*/ foo( /*int*/ p: Int/* parameter p */): Int { /* body is empty */
}
/*it's public*/ fun foo(s: String?): Char {}
protected/*it's protected*/ fun foo(c: Char) {}
/**
* Method description.
* Multi-line method description.
*
*
* @param param1 param1 description
* @param param2 param2 description
*
* @param param3 param3 description
*/
fun foo(param1: String?, param2: String?, param3: String?) {}
companion object {
/*it's public*/const /*and static*/ val/*and final*/ C = 1
}
}