Skip to content

Commit

Permalink
Merge pull request #562 from yuk1ty/remove-unused-dependencies
Browse files Browse the repository at this point in the history
Remove unused imports in tests
  • Loading branch information
fwcd authored Mar 8, 2024
2 parents 7dd4680 + f04478e commit 2b678f1
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 25 deletions.
1 change: 0 additions & 1 deletion server/src/test/kotlin/org/javacs/kt/CompiledFileTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.javacs.kt
import org.hamcrest.Matchers.equalTo
import org.javacs.kt.compiler.Compiler
import org.javacs.kt.database.DatabaseService
import org.javacs.kt.ScriptsConfiguration
import org.junit.AfterClass
import org.junit.Assert.assertThat
import org.junit.Test
Expand Down
2 changes: 0 additions & 2 deletions server/src/test/kotlin/org/javacs/kt/CompilerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import org.jetbrains.kotlin.psi.KtReferenceExpression
import org.jetbrains.kotlin.psi.psiUtil.parentsWithSelf
import org.jetbrains.kotlin.resolve.BindingContext
import org.javacs.kt.compiler.Compiler
import org.javacs.kt.ScriptsConfiguration
import org.junit.Assert.assertThat
import org.junit.Test
import org.junit.After
import org.junit.AfterClass
import org.junit.BeforeClass
import java.io.File
Expand Down
1 change: 0 additions & 1 deletion server/src/test/kotlin/org/javacs/kt/CompletionsTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.javacs.kt

import org.eclipse.lsp4j.CompletionList
import org.hamcrest.Matchers.*
import org.junit.Assert.assertThat
import org.junit.Test
Expand Down
1 change: 0 additions & 1 deletion server/src/test/kotlin/org/javacs/kt/DefinitionTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import org.eclipse.lsp4j.Range
import org.hamcrest.Matchers.containsString
import org.hamcrest.Matchers.equalTo
import org.hamcrest.Matchers.hasItem
import org.hamcrest.Matchers.hasProperty
import org.hamcrest.Matchers.hasSize
import org.junit.Assert.assertThat
import org.junit.Test
Expand Down
1 change: 0 additions & 1 deletion server/src/test/kotlin/org/javacs/kt/DiagnosticTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import java.util.concurrent.CancellationException
import org.eclipse.lsp4j.Diagnostic
import org.eclipse.lsp4j.DiagnosticSeverity
import org.eclipse.lsp4j.DocumentSymbolParams
import org.eclipse.lsp4j.PublishDiagnosticsParams
import org.eclipse.lsp4j.TextDocumentIdentifier
import org.hamcrest.Matchers.*
import org.junit.Assert.assertThat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.javacs.kt

import org.eclipse.lsp4j.DocumentHighlight
import org.eclipse.lsp4j.DocumentHighlightKind
import org.eclipse.lsp4j.DocumentHighlightParams
import org.eclipse.lsp4j.TextDocumentIdentifier
Expand Down Expand Up @@ -83,7 +82,7 @@ class DocumentHighlightTest : SingleFileTestFixture("highlight", "DocumentHighli
assertThat(secondHighlight.range, equalTo(range(9, 13, 9, 31)))
assertThat(secondHighlight.kind, equalTo(DocumentHighlightKind.Text))
}

@Test
fun `should highlight shadowed variable correctly, just show the shadowed variable`() {
val fileUri = workspaceRoot.resolve(file).toUri().toString()
Expand Down
2 changes: 0 additions & 2 deletions server/src/test/kotlin/org/javacs/kt/DocumentSymbolsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import org.eclipse.lsp4j.Position
import org.eclipse.lsp4j.Range
import org.eclipse.lsp4j.SymbolKind
import org.eclipse.lsp4j.TextDocumentIdentifier
import org.hamcrest.Matchers.hasItem
import org.hamcrest.Matchers.not
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
Expand Down
1 change: 0 additions & 1 deletion server/src/test/kotlin/org/javacs/kt/FormatTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import org.eclipse.lsp4j.DocumentFormattingParams
import org.eclipse.lsp4j.TextDocumentIdentifier
import org.eclipse.lsp4j.FormattingOptions
import org.junit.Test
import org.junit.Ignore
import org.junit.Assert.assertThat
import org.hamcrest.Matchers.equalTo

Expand Down
2 changes: 0 additions & 2 deletions server/src/test/kotlin/org/javacs/kt/GradleDSLScriptTest.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package org.javacs.kt

import org.junit.Before
import org.junit.Test
import org.junit.Assert.assertThat
import org.hamcrest.Matchers.*
import org.eclipse.lsp4j.MarkupContent

class GradleDSLScriptTest : SingleFileTestFixture("kotlinDSLWorkspace", "build.gradle.kts", Configuration().apply {
scripts.enabled = true
Expand Down
1 change: 0 additions & 1 deletion server/src/test/kotlin/org/javacs/kt/JavaToKotlinTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import org.junit.Test
import org.junit.Assert.assertThat
import org.junit.Ignore
import org.hamcrest.Matchers.equalTo
import java.nio.file.Paths

class JavaToKotlinTest : LanguageServerTestFixture("j2k") {
// TODO: Seems to throw the same exception as
Expand Down
4 changes: 0 additions & 4 deletions server/src/test/kotlin/org/javacs/kt/OverrideMemberTest.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package org.javacs.kt

import com.google.gson.Gson
import org.eclipse.lsp4j.ExecuteCommandParams
import org.eclipse.lsp4j.Position
import org.eclipse.lsp4j.Range
import org.eclipse.lsp4j.TextDocumentIdentifier
import org.eclipse.lsp4j.TextDocumentPositionParams
import org.junit.Test
Expand Down
4 changes: 0 additions & 4 deletions server/src/test/kotlin/org/javacs/kt/RenameTest.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
package org.javacs.kt

import org.eclipse.lsp4j.Position
import org.eclipse.lsp4j.Range
import org.hamcrest.Matchers.containsString
import org.hamcrest.Matchers.equalTo
import org.hamcrest.Matchers.hasItem
import org.hamcrest.Matchers.hasProperty
import org.hamcrest.Matchers.hasSize
import org.junit.Assert.assertThat
import org.junit.Test

Expand Down
2 changes: 0 additions & 2 deletions server/src/test/kotlin/org/javacs/kt/ResolveMainTest.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.javacs.kt

import com.google.gson.Gson
import org.eclipse.lsp4j.ExecuteCommandParams
import org.eclipse.lsp4j.Position
import org.eclipse.lsp4j.Range
import org.eclipse.lsp4j.TextDocumentIdentifier
Expand Down
1 change: 0 additions & 1 deletion server/src/test/kotlin/org/javacs/kt/SimpleScriptTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.javacs.kt

import org.junit.*
import org.junit.Assert.*
import org.hamcrest.Matchers.*
import kotlin.script.experimental.api.*
import kotlin.script.experimental.jvm.jvm
import kotlin.script.experimental.jvm.dependenciesFromCurrentContext
Expand Down

0 comments on commit 2b678f1

Please sign in to comment.