Skip to content

Commit

Permalink
Add a test for all roots (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolberg authored Oct 3, 2024
1 parent 63efbb0 commit b1e66ab
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ class ExpediterCliCommandIntegrationTest {
fun `run on self with descriptors`() {
val output = dir.resolve("expediter.json")

println(System.getProperty("android-descriptors"))

ExpediterCliCommand().main(
System.getProperty("libraries").split(File.pathSeparatorChar).flatMap {
listOf("--libraries", it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,28 @@ class ExpediterPluginIntegrationTest {
)
}

@ParameterizedWithGradleVersions
fun `cross library all roots`(project: TestProject) {
project.buildAndFail("check")

val report = IssueReport.fromJson(project.dir.resolve("build/expediter.json").readText())

expectThat(report.issues).contains(
Issue.MissingMember(
"com/fasterxml/jackson/databind/deser/BeanDeserializer",
MemberAccess.MethodAccess(
"com/fasterxml/jackson/core/JsonParser",
null,
MemberSymbolicReference(
"streamReadConstraints",
"()Lcom/fasterxml/jackson/core/StreamReadConstraints;"
),
MethodAccessType.VIRTUAL
)
)
)
}

@ParameterizedWithGradleVersions
fun `android lib`(project: TestProject) {
project.buildAndFail("check")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
plugins {
java
id("com.toasttab.expediter") version "@VERSION@"
id("com.toasttab.testkit.coverage") version "@TESTKIT_PLUGIN_VERSION@"
}

repositories {
mavenCentral()
}

dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.2")
implementation("com.fasterxml.jackson.core:jackson-core") {
version {
strictly("2.13.5")
}
}
}

expediter {
failOnIssues = true

application {
roots {
all()
}
}

platform {
jvmVersion = 8
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "test"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import java.lang.String;

class Caller {
String x;
}

0 comments on commit b1e66ab

Please sign in to comment.