RFR: Refactored new ToolInput/Outputs so they reside in own packages and not in original interfaces
Leonid Kuskov
lkuskov at openjdk.org
Tue Jan 10 21:27:37 UTC 2023
On Tue, 3 Jan 2023 15:46:53 GMT, Jiří Vaněk <jvanek at openjdk.org> wrote:
> This PR is refactoring the long interfaces with many inner classes to logical packages.
Hi Jiří,
Just curious, I've written an unit test for the PR [#54](https://github.com/openjdk/asmtools/pull/54) that uses your approach to test output.
int rc = 0;
if (files.isEmpty())
fail(toolName + ": no files");
List<String> toolArgs = new ArrayList<>();
toolArgs.add("-d");
toolArgs.add(destDir.getPath());
toolArgs.addAll(files);
ToolOutput.ByteOutput encodedFiles = new ToolOutput.ByteOutput();
ToolOutput.StringLog encodeLog = new ToolOutput.StringLog();
org.openjdk.asmtools.jasm.Main jasm = new org.openjdk.asmtools.jasm.Main(encodedFiles, encodeLog, toolArgs.toArray(new String[0]));
jasm.setVerboseFlag(true);
jasm.setTraceFlag(true);
rc = jasm.compile();
return new InputOutputTests.LogAndBinResults(encodedFiles, encodeLog, rc);
My jasm file warns:
jasm - WARN: test_1()V - The instruction 'ifge' uses the argument 0x8000 that exceeds allowed signed 16-bit value 0x7FFF
1 warning(s)
I need to parse this output to confirm that jasm works as expected. How can it be done? The encodeLog is empty.
Thanks,
Leonid
PS It would be great if you become a contributor. At least it will allow me assign you a reviewer for Asmtools
-------------
PR: https://git.openjdk.org/asmtools/pull/53
More information about the asmtools-dev
mailing list