mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-21 03:06:17 +00:00
Re-enable large contracts for WASM builds (#492)
The issue can not be reproduced. Enable test to track regressions #149
This commit is contained in:
1 parent
61ac247135
commit
8d60b6f2ad
1 file changed
+36
-41
@@ -31,50 +31,45 @@ describe('Compile Function Tests', function () {
|
||||
).to.have.property('bytecode')
|
||||
})
|
||||
|
||||
if (typeof globalThis.Bun == 'undefined') {
|
||||
// Running this test with Bun on a Linux host causes:
|
||||
// RuntimeError: Out of bounds memory access (evaluating 'getWasmTableEntry(index)(a1, a2, a3, a4, a5)')
|
||||
// Once this issue is resolved, the test will be re-enabled.
|
||||
it('should successfully compile large Solidity code', async function () {
|
||||
const standardInput = loadFixture('token.json')
|
||||
it('should successfully compile large Solidity code', async function () {
|
||||
const standardInput = loadFixture('token.json')
|
||||
|
||||
const result = await compile(standardInput)
|
||||
expect(result).to.be.a('string')
|
||||
const output = JSON.parse(result)
|
||||
expect(output).to.have.property('contracts')
|
||||
expect(output.contracts['fixtures/token.sol']).to.have.property('MyToken')
|
||||
expect(output.contracts['fixtures/token.sol'].MyToken).to.have.property(
|
||||
'abi'
|
||||
)
|
||||
expect(output.contracts['fixtures/token.sol'].MyToken).to.have.property(
|
||||
'evm'
|
||||
)
|
||||
expect(
|
||||
output.contracts['fixtures/token.sol'].MyToken.evm
|
||||
).to.have.property('bytecode')
|
||||
})
|
||||
const result = await compile(standardInput)
|
||||
expect(result).to.be.a('string')
|
||||
const output = JSON.parse(result)
|
||||
expect(output).to.have.property('contracts')
|
||||
expect(output.contracts['fixtures/token.sol']).to.have.property('MyToken')
|
||||
expect(output.contracts['fixtures/token.sol'].MyToken).to.have.property(
|
||||
'abi'
|
||||
)
|
||||
expect(output.contracts['fixtures/token.sol'].MyToken).to.have.property(
|
||||
'evm'
|
||||
)
|
||||
expect(
|
||||
output.contracts['fixtures/token.sol'].MyToken.evm
|
||||
).to.have.property('bytecode')
|
||||
})
|
||||
|
||||
it('should successfully compile a valid Solidity contract that instantiates the token contracts', async function () {
|
||||
const standardInput = loadFixture('instantiate_tokens.json')
|
||||
it('should successfully compile a valid Solidity contract that instantiates the token contracts', async function () {
|
||||
const standardInput = loadFixture('instantiate_tokens.json')
|
||||
|
||||
const result = await compile(standardInput)
|
||||
expect(result).to.be.a('string')
|
||||
const output = JSON.parse(result)
|
||||
expect(output).to.have.property('contracts')
|
||||
expect(
|
||||
output.contracts['fixtures/instantiate_tokens.sol']
|
||||
).to.have.property('TokensFactory')
|
||||
expect(
|
||||
output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory
|
||||
).to.have.property('abi')
|
||||
expect(
|
||||
output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory
|
||||
).to.have.property('evm')
|
||||
expect(
|
||||
output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory.evm
|
||||
).to.have.property('bytecode')
|
||||
})
|
||||
}
|
||||
const result = await compile(standardInput)
|
||||
expect(result).to.be.a('string')
|
||||
const output = JSON.parse(result)
|
||||
expect(output).to.have.property('contracts')
|
||||
expect(
|
||||
output.contracts['fixtures/instantiate_tokens.sol']
|
||||
).to.have.property('TokensFactory')
|
||||
expect(
|
||||
output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory
|
||||
).to.have.property('abi')
|
||||
expect(
|
||||
output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory
|
||||
).to.have.property('evm')
|
||||
expect(
|
||||
output.contracts['fixtures/instantiate_tokens.sol'].TokensFactory.evm
|
||||
).to.have.property('bytecode')
|
||||
})
|
||||
|
||||
it('should throw an error for invalid Solidity code', async function () {
|
||||
const standardInput = loadFixture('invalid_contract_content.json')
|
||||
|
||||
Reference in new issue
Block a user