@NotNull private String normalizeOutput(@NotNull Pair<String, ExitCode> output) { return AbstractCliTest.getNormalizedCompilerOutput( output.getFirst(), output.getSecond(), getTestDataDirectory().getPath(), JvmMetadataVersion.INSTANCE); }
@NotNull private Pair<String, ExitCode> compileKotlin( @NotNull String fileName, @NotNull File output, @NotNull File... classpath) { List<String> args = new ArrayList<String>(); File sourceFile = new File(getTestDataDirectory(), fileName); assert sourceFile.exists() : "Source file does not exist: " + sourceFile.getAbsolutePath(); args.add(sourceFile.getPath()); if (classpath.length > 0) { args.add("-classpath"); args.add(StringsKt.join(Arrays.asList(classpath), File.pathSeparator)); } args.add("-d"); args.add(output.getPath()); return AbstractCliTest.executeCompilerGrabOutput(new K2JVMCompiler(), args); }