New J2K: Split old j2k and new j2k tests
This commit is contained in:
committed by
Ilya Kirillov
parent
02a206bf7c
commit
b411e8e18e
-33
@@ -1,33 +0,0 @@
|
||||
// ERROR: Modifier 'protected' is not applicable inside 'object'
|
||||
internal object Outer {
|
||||
fun foo() {
|
||||
val nested1 = Nested1(1)
|
||||
val nested2 = Nested2(2)
|
||||
val nested3 = Nested3(3)
|
||||
val nested4 = Nested4(4)
|
||||
}
|
||||
|
||||
private class Nested1() {
|
||||
constructor(a: Int) : this() {}
|
||||
protected constructor(c: Char) : this() {}
|
||||
private constructor(b: Boolean) : this() {}
|
||||
}
|
||||
|
||||
protected class Nested2() {
|
||||
constructor(a: Int) : this() {}
|
||||
protected constructor(c: Char) : this() {}
|
||||
private constructor(b: Boolean) : this() {}
|
||||
}
|
||||
|
||||
internal class Nested3() {
|
||||
constructor(a: Int) : this() {}
|
||||
protected constructor(c: Char) : this() {}
|
||||
private constructor(b: Boolean) : this() {}
|
||||
}
|
||||
|
||||
class Nested4() {
|
||||
constructor(a: Int) : this() {}
|
||||
protected constructor(c: Char) : this() {}
|
||||
private constructor(b: Boolean) : this() {}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
internal object Test {
|
||||
fun foo(args: Array<String?>): Int {
|
||||
return args.size
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
class TestBoxedEqEqPrimitive {
|
||||
fun test(value: Double): Boolean {
|
||||
return value == 3.14
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package demo
|
||||
|
||||
internal class Test {
|
||||
fun putInt(i: Int) {}
|
||||
|
||||
fun test() {
|
||||
val b: Byte = 10
|
||||
putInt(b.toInt())
|
||||
|
||||
val b2: Byte = 10
|
||||
putInt(b2.toInt())
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package demo
|
||||
|
||||
internal class Test {
|
||||
fun putInt(i: Int) {}
|
||||
|
||||
fun test() {
|
||||
val i = 10
|
||||
putInt(i)
|
||||
}
|
||||
}
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
class Identifier<T> {
|
||||
val name: T
|
||||
private var myHasDollar = false
|
||||
private var myNullable = true
|
||||
|
||||
constructor(name: T) {
|
||||
this.name = name
|
||||
}
|
||||
|
||||
constructor(name: T, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myNullable = isNullable
|
||||
}
|
||||
|
||||
constructor(name: T, hasDollar: Boolean, isNullable: Boolean) {
|
||||
this.name = name
|
||||
myHasDollar = hasDollar
|
||||
myNullable = isNullable
|
||||
}
|
||||
}
|
||||
|
||||
object User {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
val i1: Identifier<*> = Identifier<String?>("name", false, true)
|
||||
val i2 = Identifier("name", false)
|
||||
val i3 = Identifier("name")
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import kotlin.collections.Map.Entry
|
||||
|
||||
class A {
|
||||
internal fun foo(o: Entry<Any?, Any?>?) {}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package demo
|
||||
|
||||
internal class Test {
|
||||
fun getInteger(i: Int): Int {
|
||||
return i
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val i = getInteger(10)
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import java.io.*;
|
||||
import java.io.*;
|
||||
|
||||
class FileRead {
|
||||
public static void main(String args[]) {
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package demo
|
||||
|
||||
internal class Container {
|
||||
var myString = "1"
|
||||
}
|
||||
|
||||
internal object One {
|
||||
var myContainer = Container()
|
||||
}
|
||||
|
||||
internal class StringContainer(s: String?)
|
||||
|
||||
internal class Test {
|
||||
fun putString(s: String) {}
|
||||
fun test() {
|
||||
putString(One.myContainer.myString)
|
||||
StringContainer(One.myContainer.myString)
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package test
|
||||
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* User: ignatov
|
||||
*/
|
||||
object Test {
|
||||
fun isDir(parent: File?): Boolean {
|
||||
if (parent == null || !parent.exists()) {
|
||||
return false
|
||||
}
|
||||
val result = true
|
||||
return if (parent.isDirectory) {
|
||||
true
|
||||
} else
|
||||
false
|
||||
}
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
package demo
|
||||
|
||||
internal class Container {
|
||||
var myBoolean = true
|
||||
}
|
||||
|
||||
internal object One {
|
||||
var myContainer = Container()
|
||||
}
|
||||
|
||||
internal class Test {
|
||||
fun test() {
|
||||
if (One.myContainer.myBoolean) println("Ok")
|
||||
val s = if (One.myContainer.myBoolean) "YES" else "NO"
|
||||
while (One.myContainer.myBoolean) println("Ok")
|
||||
do {
|
||||
println("Ok")
|
||||
} while (One.myContainer.myBoolean)
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.voltvoodoo.saplo4j.model
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Language(protected var code: String?) : Serializable {
|
||||
|
||||
fun equals(other: Language): Boolean {
|
||||
return other.toString() == this.toString()
|
||||
}
|
||||
|
||||
companion object {
|
||||
var ENGLISH: Language? = Language("en")
|
||||
var SWEDISH: Language? = Language("sv")
|
||||
private const val serialVersionUID = -2442762969929206780L
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
internal class Test {
|
||||
fun putInt(i: Int) {}
|
||||
|
||||
fun test() {
|
||||
val b: Byte = 10
|
||||
putInt(b.toInt())
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
internal object Test {
|
||||
fun getInt(i: Int): Int {
|
||||
return when (i) {
|
||||
0 -> 0
|
||||
1 -> 1
|
||||
2 -> 2
|
||||
3 -> 3
|
||||
else -> -1
|
||||
}
|
||||
}
|
||||
}
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
internal class Test {
|
||||
fun printNumbers() {
|
||||
for (i1 in 0..0)
|
||||
println(i1)
|
||||
|
||||
val b: Byte = 1
|
||||
for (i2 in 0 until b)
|
||||
println(i2)
|
||||
|
||||
val s: Short = 1
|
||||
for (i3 in 0 until s)
|
||||
println(i3)
|
||||
|
||||
val l = 1L
|
||||
for (i4 in 0 until l)
|
||||
println(i4)
|
||||
|
||||
val d = 1.0
|
||||
var i5 = 0
|
||||
while (i5 < d) {
|
||||
println(i5)
|
||||
i5++
|
||||
}
|
||||
|
||||
val f = 1.0f
|
||||
var i6 = 0
|
||||
while (i6 < f) {
|
||||
println(i6)
|
||||
i6++
|
||||
}
|
||||
|
||||
val c = 1.toChar()
|
||||
var i7 = 0
|
||||
while (i7 < c.toInt()) {
|
||||
println(i7)
|
||||
i7++
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
-137
@@ -1,137 +0,0 @@
|
||||
internal class A {
|
||||
fun equals() {
|
||||
val i = 1
|
||||
val b: Byte = 1
|
||||
val s: Short = 1
|
||||
val l: Long = 1
|
||||
val d = 1.0
|
||||
val f = 1.0f
|
||||
val c = 1.toChar()
|
||||
|
||||
t(i == i)
|
||||
t(i == b.toInt())
|
||||
t(i == s.toInt())
|
||||
t(i.toLong() == l)
|
||||
t(i.toDouble() == d)
|
||||
t(i.toFloat() == f)
|
||||
t(i == c.toInt())
|
||||
|
||||
t(b.toInt() == i)
|
||||
t(b == b)
|
||||
t(b.toShort() == s)
|
||||
t(b.toLong() == l)
|
||||
t(b.toDouble() == d)
|
||||
t(b.toFloat() == f)
|
||||
t(b == c.toByte())
|
||||
|
||||
t(s.toInt() == i)
|
||||
t(s == b.toShort())
|
||||
t(s == s)
|
||||
t(s.toLong() == l)
|
||||
t(s.toDouble() == d)
|
||||
t(s.toFloat() == f)
|
||||
t(s == c.toShort())
|
||||
|
||||
t(l == i.toLong())
|
||||
t(l == b.toLong())
|
||||
t(l == s.toLong())
|
||||
t(l == l)
|
||||
t(l.toDouble() == d)
|
||||
t(l.toFloat() == f)
|
||||
t(l == c.toLong())
|
||||
|
||||
t(d == i.toDouble())
|
||||
t(d == b.toDouble())
|
||||
t(d == s.toDouble())
|
||||
t(d == l.toDouble())
|
||||
t(d == d)
|
||||
t(d == f.toDouble())
|
||||
t(d == c.toDouble())
|
||||
|
||||
t(f == i.toFloat())
|
||||
t(f == b.toFloat())
|
||||
t(f == s.toFloat())
|
||||
t(f == l.toFloat())
|
||||
t(f.toDouble() == d)
|
||||
t(f == f)
|
||||
t(f == c.toFloat())
|
||||
|
||||
t(c.toInt() == i)
|
||||
t(c.toByte() == b)
|
||||
t(c.toShort() == s)
|
||||
t(c.toLong() == l)
|
||||
t(c.toDouble() == d)
|
||||
t(c.toFloat() == f)
|
||||
t(c == c)
|
||||
|
||||
t(i.toDouble() != d)
|
||||
}
|
||||
|
||||
fun compare() {
|
||||
val i = 1
|
||||
val b: Byte = 1
|
||||
val s: Short = 1
|
||||
val l: Long = 1
|
||||
val d = 1.0
|
||||
val f = 1.0f
|
||||
val c = 1.toChar()
|
||||
|
||||
t(i > i)
|
||||
t(i > b)
|
||||
t(i > s)
|
||||
t(i > l)
|
||||
t(i > d)
|
||||
t(i > f)
|
||||
t(i > c.toInt())
|
||||
|
||||
t(b > i)
|
||||
t(b > b)
|
||||
t(b > s)
|
||||
t(b > l)
|
||||
t(b > d)
|
||||
t(b > f)
|
||||
t(b > c.toByte())
|
||||
|
||||
t(s > i)
|
||||
t(s > b)
|
||||
t(s > s)
|
||||
t(s > l)
|
||||
t(s > d)
|
||||
t(s > f)
|
||||
t(s > c.toShort())
|
||||
|
||||
t(l > i)
|
||||
t(l > b)
|
||||
t(l > s)
|
||||
t(l > l)
|
||||
t(l > d)
|
||||
t(l > f)
|
||||
t(l > c.toLong())
|
||||
|
||||
t(d > i)
|
||||
t(d > b)
|
||||
t(d > s)
|
||||
t(d > l)
|
||||
t(d > d)
|
||||
t(d > f)
|
||||
t(d > c.toDouble())
|
||||
|
||||
t(f > i)
|
||||
t(f > b)
|
||||
t(f > s)
|
||||
t(f > l)
|
||||
t(f > d)
|
||||
t(f > f)
|
||||
t(f > c.toFloat())
|
||||
|
||||
t(c.toInt() > i)
|
||||
t(c.toByte() > b)
|
||||
t(c.toShort() > s)
|
||||
t(c.toLong() > l)
|
||||
t(c.toDouble() > d)
|
||||
t(c.toFloat() > f)
|
||||
t(c > c)
|
||||
}
|
||||
|
||||
private fun t(b: Boolean) {}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
internal class Test {
|
||||
fun operationsWithChar() {
|
||||
val c = 1.toChar()
|
||||
val i = 1
|
||||
|
||||
b(i > c.toInt())
|
||||
b(i >= c.toInt())
|
||||
b(i < c.toInt())
|
||||
b(i <= c.toInt())
|
||||
|
||||
b(c.toInt() > i)
|
||||
b(c.toInt() >= i)
|
||||
b(c.toInt() < i)
|
||||
b(c.toInt() <= i)
|
||||
|
||||
b(c.toInt() == i)
|
||||
b(c.toInt() != i)
|
||||
b(i == c.toInt())
|
||||
b(i != c.toInt())
|
||||
|
||||
i(i + c.toInt())
|
||||
i(i - c.toInt())
|
||||
i(i / c.toInt())
|
||||
i(i * c.toInt())
|
||||
i(i % c.toInt())
|
||||
i(i or c.toInt())
|
||||
i(i and c.toInt())
|
||||
i(i shl c.toInt())
|
||||
i(i shr c.toInt())
|
||||
|
||||
i(c.toInt() + i)
|
||||
i(c.toInt() - i)
|
||||
i(c.toInt() / i)
|
||||
i(c.toInt() * i)
|
||||
i(c.toInt() % i)
|
||||
i(c.toInt() or i)
|
||||
i(c.toInt() and i)
|
||||
i(c.toInt() shl i)
|
||||
i(c.toInt() shr i)
|
||||
}
|
||||
|
||||
fun b(b: Boolean) {}
|
||||
fun i(i: Int) {}
|
||||
}
|
||||
Reference in New Issue
Block a user