Skip to content

Commit

Permalink
Restore test
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Nov 25, 2023
1 parent 7b2ddf4 commit 4f476c2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -2551,9 +2552,12 @@ public class InjectClass_Factory<T : List<String>>(
""",
) {
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]",
)
}
}
Expand Down

0 comments on commit 4f476c2

Please sign in to comment.