From 1a99194d6fdc2cb8c1029d0406c4025edb0eeb84 Mon Sep 17 00:00:00 2001 From: manu Date: Mon, 26 Feb 2024 15:07:41 +0100 Subject: [PATCH] ... --- .../injekt/integrationtests/ResolutionTest.kt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/integration-tests/src/test/kotlin/com/ivianuu/injekt/integrationtests/ResolutionTest.kt b/integration-tests/src/test/kotlin/com/ivianuu/injekt/integrationtests/ResolutionTest.kt index e6ee7a203..e7634ab60 100644 --- a/integration-tests/src/test/kotlin/com/ivianuu/injekt/integrationtests/ResolutionTest.kt +++ b/integration-tests/src/test/kotlin/com/ivianuu/injekt/integrationtests/ResolutionTest.kt @@ -312,29 +312,29 @@ class ResolutionTest { invokeSingleFile() shouldBe "nonnull" } - @Test fun testPrefersUserInjectableErrorOverBuiltInInjectable() = singleAndMultiCodegen( - """ - @Provide fun diyLambda(unit: Unit): () -> T = { TODO() } - """, - """ - fun invoke() = inject<() -> Foo>() - """ - ) { - compilationShouldHaveFailed("no injectable") - } - @Test fun testDoesNotPreferValueArgumentOverAnother() = codegen( """ @Provide class FooModule { @Provide fun foo() = Foo() } - fun createFoo(foo1: Foo = inject, foo2: Foo = inject) = inject() + fun createFoo(@Provide foo1: Foo, @Provide foo2: Foo) = inject() """ ) { compilationShouldHaveFailed("ambiguous") } + @Test fun testPrefersUserInjectableErrorOverBuiltInInjectable() = singleAndMultiCodegen( + """ + @Provide fun diyLambda(unit: Unit): () -> T = { TODO() } + """, + """ + fun invoke() = inject<() -> Foo>() + """ + ) { + compilationShouldHaveFailed("no injectable") + } + @Test fun testCircularDependencyFails() = singleAndMultiCodegen( """ @Provide class A(b: B)