Cleanup warnings in scripting code

This commit is contained in:
Ilya Chernikov
2020-04-06 13:12:56 +02:00
parent d863dc04e6
commit 195a90d333
20 changed files with 134 additions and 119 deletions
@@ -5,12 +5,12 @@
package org.jetbrains.kotlin.mainKts.test
import junit.framework.Assert
import org.jetbrains.kotlin.mainKts.COMPILED_SCRIPTS_CACHE_DIR_ENV_VAR
import org.jetbrains.kotlin.mainKts.COMPILED_SCRIPTS_CACHE_DIR_PROPERTY
import org.jetbrains.kotlin.scripting.compiler.plugin.runWithK2JVMCompiler
import org.jetbrains.kotlin.scripting.compiler.plugin.runWithKotlinLauncherScript
import org.jetbrains.kotlin.scripting.compiler.plugin.runWithKotlinc
import org.junit.Assert
import org.junit.Ignore
import org.junit.Test
import java.io.File
@@ -141,6 +141,7 @@ class MainKtsTest {
DataInputStream(ByteArrayInputStream(scriptClassResource.readBytes())).use { stream ->
val header = stream.readInt()
if (0xCAFEBABE.toInt() != header) throw IOException("Invalid header class header: $header")
@Suppress("UNUSED_VARIABLE")
val minor = stream.readUnsignedShort()
val major = stream.readUnsignedShort()
Assert.assertTrue(major == 50)