From 3b0ae66699b3fb4eb19e875caf70b56976d5e1c2 Mon Sep 17 00:00:00 2001 From: Joel Wilcox Date: Wed, 30 Aug 2023 18:08:52 -0700 Subject: [PATCH] Minor test updates --- .../ContributesMultibindingGeneratorTest.kt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/compiler/src/test/java/com/squareup/anvil/compiler/codegen/ContributesMultibindingGeneratorTest.kt b/compiler/src/test/java/com/squareup/anvil/compiler/codegen/ContributesMultibindingGeneratorTest.kt index a078acd46..514e87004 100644 --- a/compiler/src/test/java/com/squareup/anvil/compiler/codegen/ContributesMultibindingGeneratorTest.kt +++ b/compiler/src/test/java/com/squareup/anvil/compiler/codegen/ContributesMultibindingGeneratorTest.kt @@ -368,12 +368,9 @@ class ContributesMultibindingGeneratorTest( package com.squareup.test import com.squareup.anvil.annotations.ContributesMultibinding - import dagger.MapKey - import javax.inject.Singleton - @ContributesMultibinding(Any::class) - @BindingKey("abc") - @Singleton + @ContributesMultibinding(scope = Any::class) + @BindingKey(value = "abc") interface ContributingInterface : ParentInterface """.trimIndent() @@ -388,7 +385,7 @@ class ContributesMultibindingGeneratorTest( } is AnvilCompilationMode.Ksp -> { val processor = simpleSymbolProcessor { resolver -> - resolver.getSymbolsWithAnnotation(MergeComponent::class.qualifiedName!!) + resolver.getSymbolsWithAnnotation(MergeComponent::class.qualifiedName!!, inDepth = true) .map { stubContentToGenerate } .toList() } @@ -408,7 +405,7 @@ class ContributesMultibindingGeneratorTest( interface ParentInterface - @MergeComponent(Any::class) + @MergeComponent(scope = Any::class) interface ComponentInterface """, mode = localMode @@ -426,16 +423,14 @@ class ContributesMultibindingGeneratorTest( import com.squareup.anvil.annotations.ContributesMultibinding import dagger.MapKey - import javax.inject.Singleton interface ParentInterface @MapKey annotation class BindingKey1(val value: String) - @ContributesMultibinding(Any::class) - @BindingKey1("abc") - @Singleton + @ContributesMultibinding(scope = Any::class) + @BindingKey1(value = "abc") interface ContributingInterface : ParentInterface """.trimIndent() @@ -452,7 +447,7 @@ class ContributesMultibindingGeneratorTest( } is AnvilCompilationMode.Ksp -> { val processor = simpleSymbolProcessor { resolver -> - resolver.getSymbolsWithAnnotation(MergeComponent::class.qualifiedName!!) + resolver.getSymbolsWithAnnotation(MergeComponent::class.qualifiedName!!, inDepth = true) .map { stubContentToGenerate } .toList() }