From 4f476c2f9dd30f33913d574797ea859945dfde86 Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Sat, 25 Nov 2023 11:57:36 -0500 Subject: [PATCH] Restore test --- .../dagger/InjectConstructorFactoryGeneratorTest.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/src/test/java/com/squareup/anvil/compiler/dagger/InjectConstructorFactoryGeneratorTest.kt b/compiler/src/test/java/com/squareup/anvil/compiler/dagger/InjectConstructorFactoryGeneratorTest.kt index ebcea2a3a..cd5c8fc04 100644 --- a/compiler/src/test/java/com/squareup/anvil/compiler/dagger/InjectConstructorFactoryGeneratorTest.kt +++ b/compiler/src/test/java/com/squareup/anvil/compiler/dagger/InjectConstructorFactoryGeneratorTest.kt @@ -1,6 +1,7 @@ package com.squareup.anvil.compiler.dagger import com.google.common.truth.Truth.assertThat +import com.squareup.anvil.compiler.compilationErrorLine import com.squareup.anvil.compiler.injectClass import com.squareup.anvil.compiler.internal.testing.AnvilCompilationMode import com.squareup.anvil.compiler.internal.testing.compileAnvil @@ -2551,9 +2552,12 @@ public class InjectClass_Factory>( """, ) { assertThat(exitCode).isError() - assertThat(messages).contains( + assertThat( + compilationErrorLine() + .removeParametersAndSort(), + ).contains( "Type com.squareup.test.InjectClass may only contain one injected constructor. " + - "Found: [@Inject com.squareup.test.InjectClass(), @Inject com.squareup.test.InjectClass(String)]", + "Found: [@Inject com.squareup.test.InjectClass, @Inject com.squareup.test.InjectClass]", ) } }