Skip to content

Commit

Permalink
Use Parser.Input#fromString() in RewriteTest
Browse files Browse the repository at this point in the history
The idea is to get the `synthetic` flag to be set to `true`.
  • Loading branch information
knutwannheden committed Aug 29, 2024
1 parent b64e1ed commit ed731fa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ default void rewriteRun(Consumer<RecipeSpec> spec, SourceSpec<?>... sourceSpecs)
for (UncheckedConsumer<SourceSpec<?>> consumer : testClassSpec.allSources) {
consumer.accept(sourceSpec);
}
inputs.put(sourceSpec, new Parser.Input(sourcePath, () -> new ByteArrayInputStream(beforeTrimmed.getBytes(parser.getCharset(ctx)))));
inputs.put(sourceSpec, Parser.Input.fromString(sourcePath, beforeTrimmed, parser.getCharset(ctx)));
}

Path relativeTo = testMethodSpec.relativeTo == null ? testClassSpec.relativeTo : testMethodSpec.relativeTo;
Expand Down

0 comments on commit ed731fa

Please sign in to comment.