Skip to content

Commit

Permalink
Revert "Preserve support for patch-specific expectedOutcomes"
Browse files Browse the repository at this point in the history
This reverts commit fa12a9a.
  • Loading branch information
gabrielfeo committed Jan 6, 2025
1 parent 36fd1dd commit 7027534
Show file tree
Hide file tree
Showing 16 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,11 @@ class CrossVersionOutcomeAndRelocationTest extends AbstractTest {

private static ExpectedResults expectedResults(VersionNumber androidVersion, VersionNumber kotlinVersion) {
def builder = new ExpectedOutcomeBuilder()
def candidates = [
"expectedOutcomes/${androidVersion}_outcomes.json",
"expectedOutcomes/${androidVersion.major}.${androidVersion.minor}.x_outcomes.json",
]
def loader = CrossVersionOutcomeAndRelocationTest.classLoader
def outcomesResource = candidates.findResult { loader.getResource(it) }
def path = "expectedOutcomes/${androidVersion.major}.${androidVersion.minor}_outcomes.json"
def outcomesResource = CrossVersionOutcomeAndRelocationTest.classLoader.getResource(path)

if (outcomesResource == null) {
throw new IllegalStateException("No compatible expectedOutcomes file found: [${candidates.join(', ')}]")
throw new IllegalStateException("Could not find expectedOutcomes/${androidVersion}_outcomes.json - make sure an outcomes file exists for this version!")
}

Map<String, String> json = new JsonSlurper().parse(outcomesResource) as Map
Expand Down

0 comments on commit 7027534

Please sign in to comment.