Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing Test annotations #4699

Merged
merged 1 commit into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -50,6 +50,7 @@ class DetektJvmSpec {
assertThat(argumentString).contains("--classpath")
}

@Test
fun `configures detekt type resolution task test`() {
val project = gradleRunner.buildProject()

Expand Down Expand Up @@ -132,6 +133,7 @@ class DetektJvmSpec {
it.setupProject()
}

@Test
fun `logs a warning`() {
gradleRunner.runTasksAndCheckResult(":detektMain") { buildResult ->
assertThat(buildResult.output).doesNotContain("report location set on detekt {} extension will be ignored")
Expand Down
Expand Up @@ -141,6 +141,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(3, 5)
}

@Test
fun `detects var declaration with MutableState via factory function, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand All @@ -162,6 +163,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(4, 5)
}

@Test
fun `detects var declaration with MutableState via calculation lambda, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand Down Expand Up @@ -450,6 +452,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(2, 1)
}

@Test
fun `detects var declaration with MutableState via factory function, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand All @@ -469,6 +472,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(3, 1)
}

@Test
fun `detects var declaration with MutableState via calculation lambda, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand Down Expand Up @@ -749,6 +753,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(3, 5)
}

@Test
fun `detects var declaration with MutableState via factory function, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand All @@ -770,6 +775,7 @@ class DoubleMutabilityForCollectionSpec(private val env: KotlinCoreEnvironment)
assertThat(result).hasSourceLocation(4, 5)
}

@Test
fun `detects var declaration with MutableState via calculation lambda, when configured`() {
val rule = DoubleMutabilityForCollection(
TestConfig(
Expand Down