mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 17:31:02 +00:00
feat: use PolkaVM disassembler (#6)
Integrate the PolkaVM disassembler to fix `--asm` output Co-authored-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -14,19 +14,23 @@ describe("Run with --asm by default", () => {
|
||||
});
|
||||
|
||||
it("--asm output is presented", () => {
|
||||
expect(result.output).toMatch(/(__entry:)/i);
|
||||
const expectedPatterns = [/(deploy)/i, /(call)/i, /(seal_return)/i];
|
||||
|
||||
for (const pattern of expectedPatterns) {
|
||||
expect(result.output).toMatch(pattern);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
it("solc exit code == zksolc exit code", () => {
|
||||
const command = `solc ${paths.pathToBasicSolContract} --asm`;
|
||||
const solcResult = executeCommand(command);
|
||||
expect(solcResult.exitCode).toBe(result.exitCode);
|
||||
const command = `solc ${paths.pathToBasicSolContract} --asm`;
|
||||
const solcResult = executeCommand(command);
|
||||
expect(solcResult.exitCode).toBe(result.exitCode);
|
||||
});
|
||||
|
||||
it("run invalid: zksolc --asm", () => {
|
||||
expect(resultInvalid.output).toMatch(/(No input sources specified|Compilation aborted)/i);
|
||||
});
|
||||
|
||||
it("Invalid command exit code = 1", () => {
|
||||
expect(resultInvalid.exitCode).toBe(1);
|
||||
});
|
||||
@@ -36,4 +40,4 @@ describe("Run with --asm by default", () => {
|
||||
const solcResult = executeCommand(command);
|
||||
expect(solcResult.exitCode).toBe(resultInvalid.exitCode);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -3,6 +3,5 @@
|
||||
"target": "ES6",
|
||||
"module": "CommonJS",
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user