nishant-sachdeva
7cc7a0f183
Added sameType check for fromType and toType in YulUtilFunctions.cpp and relevant tests in semanticTests
2021-12-16 21:51:09 +05:30
nishant-sachdeva
19a74506e3
trial test cases extracted from SoliidityEndToEndTest.cpp into .sol files.
...
removed libevmone.so files from the directory
trial test cases extracted from SoliidityEndToEndTest.cpp into .sol files. Corresponding code in the .cpp file has been commented instead of begin removed pending preliminary reviews
removed libevmone files
Added testcase packed_storage_structs_delete
added test case invalid_enum_logged
added test case enum_referencing
added test case memory_types_initialisation
added test case return string
added test case constant_string_literal.sol
removed extractable keyword from solidityEndtoEnd.cpp, moved copying_bytes_multiassigned.sol to array/copying folder, added recv() function to copying_bytes_multiassigned.sol but this test case is failing now
change typo error in the name of test case library_staticcall_delegatecal.sol to library_staticcall_delegatecall.sol
Added compileToEwasm:false to call_forward_bytes.sol test case and moved it to semanticTests/fallback
added compileToEwasm:false line to library_call_in_homestead
added compileToEwasm: false line to copying_bytes_multiassign, copy_from_calldata_removes_bytes, enum_referencing, library_call_in_homestead, struct_referencing
Added test case internal_types_in_library
Added test case mapping_arguments_in_library
Added test case mapping_returns_in_library
Added test case mapping_returns_in_library_named
Added test case using_library_mappings_public
Added test case library_function_external
Added test case library_stray_values
added test case using_library_mappings_return
added test case using_library_structs
Added test case using_for_function_on_struct and corrections to using_library_structs, using_library_mpapings_return, library_stray_values
Added test case using_for_overload
added test case using_for_by_name
added test case bound_function_in_function
added test case bound_function_in_var
added test case bound_function_to_string
added test case payable_function_calls_library
added function call corrections to copying_bytes_multiassign and call_forward_bytes
Made changes to the test cases as per comments on PR #12289
mentioned in Changelog.md : Extraced some test cases from SolEndToEnd.cpp
2021-12-16 16:56:38 +05:30
nishant-sachdeva
9b55d4788e
Added sameType check for fromType and toType in YulUtilFunctions.cpp and relevant tests in semanticTests
2021-12-15 23:50:25 +05:30
nishant-sachdeva
49d9f334aa
Extracted some test cases from SolidityEndToEnd.cpp
2021-11-29 21:27:43 +05:30
chriseth
defc74c8a2
Merge pull request #12282 from ethereum/fix-gas-test-enforcement
...
Fix gas cost enforcement for constructors and make `--enforce-gas-cost-min-value` actually work
2021-11-22 12:39:07 +01:00
Kamil Śliwak
90fdea95e7
TestFunctionCall::formatRawParameters(): Ensure that uint8_t overload of toHex() is called
...
- Wrong overload results in isoltest padding each char to 32 bytes
2021-11-15 20:52:25 +01:00
Kamil Śliwak
27dc77be5d
Fix typo in test name: ihneritance -> inheritance
2021-11-15 16:32:45 +01:00
Kamil Śliwak
032f2d8f9f
Update gas expectations
2021-11-15 16:32:45 +01:00
chriseth
080c7245ae
Update tests.
2021-11-08 14:59:00 +01:00
chriseth
31c504c5ba
Add test for extcodesize check.
2021-11-08 14:58:09 +01:00
chriseth
a1aa9d2d90
Skip extcodesize check if return data is expected.
2021-11-08 14:58:09 +01:00
Daniel Kirchner
1a0605c594
Update tests.
2021-11-03 12:39:55 +01:00
chriseth
5eb97fa6ee
Merge pull request #12219 from ethereum/precompile-extcodesize-check-test
...
Semantic test for high level call to precompiles.
2021-11-01 15:08:52 +01:00
hrkrshnn
7683442ce2
Semantic test for high level call to precompiles.
...
Because of the extcodesize check, the high level call will fail. Even though the low level call can
succeed and return data.
2021-11-01 14:22:48 +01:00
chriseth
8e208f23cb
Fix assignment of return variables from modifiers.
2021-11-01 14:14:50 +01:00
Kamil Śliwak
464ac18a1f
Rename negation_bug.yul to negation_bug.sol
2021-10-29 00:19:43 +02:00
chriseth
e6e30f82ca
Merge pull request #12139 from ethereum/nonamedlabelsifnotunique
...
Do not use named function labels if function names are not unique.
2021-10-25 17:50:29 +02:00
soroosh-sdi
816d8021e4
Remove linking to unqualified library name
...
- SemanticTests accepts fully qualified library name and also unqualifed library name when
the library is defined in the same file for convenience.
- commandline tests are added!
Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
2021-10-20 18:11:58 +03:30
chriseth
9f48b7419c
Do not use named function labels if function names are not unique.
2021-10-19 18:33:00 +02:00
Marenz
4368da0201
Fix ICE when printing an error message related to mappings
2021-10-06 17:02:36 +02:00
Marenz
98dd78362e
Add `.address
and
.selector
` in inside assembly for external function pointers
2021-10-04 18:05:57 +02:00
hrkrshnn
14a678eb67
Fix gas stats
2021-09-29 13:50:51 +02:00
chriseth
e347c983b5
Update gas costs.
2021-09-29 13:25:37 +02:00
chriseth
78a1c1ca6d
Add one more test case.
2021-09-29 13:22:13 +02:00
chriseth
df9721f869
Merge pull request #12047 from ethereum/fixFixedBytesCompilerUtils
...
Properly handle fixed-byte-like types.
2021-09-29 12:23:15 +02:00
chriseth
13354c0b9a
Merge pull request #12050 from ethereum/signedImmutablesBug
...
Fix signed immutables bug.
2021-09-29 11:46:58 +02:00
chriseth
090a46c2a5
New tests.
2021-09-29 11:44:17 +02:00
hrkrshnn
7b7e38768c
Update tests.
2021-09-29 11:44:13 +02:00
hrkrshnn
6109b5c3a1
UserDefinedValueType.storageBytes() is correctly set
...
Previously it returned 32 bytes for all types, which was wasteful. This commit changes it to return
the storage bytes of the underlying type.
2021-09-29 11:41:47 +02:00
chriseth
90f4ca1048
Do not store immutables packed.
2021-09-29 10:12:05 +02:00
chriseth
bb4e3e191d
Fix array copying check.
2021-09-29 10:00:14 +02:00
hrkrshnn
41f9aab219
Tests for assembly access of user defined value types.
2021-09-28 14:50:08 +02:00
hrkrshnn
e24083a298
UserDefinedValueType: test for reading from dirty storage slots
2021-09-28 11:27:43 +02:00
chriseth
91ef1ceb51
Merge pull request #11954 from ethereum/userdefinedvaluetype-multisource-test
...
Added a multisource test for UserDefinedValueTypes and imports
2021-09-16 13:59:22 +02:00
hrkrshnn
15fb427a99
Added a multisource test for UserDefinedValueTypes and imports
...
Testing if `import {MyType} from "source";` works
2021-09-15 17:48:53 +02:00
Daniel Kirchner
d1c0b428fc
Improve abi decoding functions for arrays.
2021-09-15 13:50:19 +02:00
Daniel Kirchner
0fa24c786b
Merge pull request #11956 from ethereum/userDefinedTypesContractAccess
...
Allow accessing user defined value type members via contract name.
2021-09-14 17:14:04 +02:00
Daniel Kirchner
be29ef70a7
Allow accessing user defined value type members via contract name.
2021-09-14 16:24:14 +02:00
chriseth
8735d3fb6c
Merge pull request #11930 from ethereum/calldataStructInlineAssembly
...
Fix inline assembly assignments to calldata structs and statically-sized calldata arrays.
2021-09-14 16:16:48 +02:00
chriseth
cb218fe018
Merge pull request #11947 from ethereum/abicodec-test-userdefined
...
Added an abi function test for UserDefinedValueType
2021-09-14 13:49:45 +02:00
Harikrishnan Mulackal
c8c6d30808
Merge pull request #11946 from ethereum/tests-userdefinedvaluetypes
...
UserDefinedValueType: test to validate zero-cost-abstraction claim.
2021-09-13 18:54:36 +02:00
hrkrshnn
4871017aae
Added an abi function test for UserDefinedValueType
...
A test to see if `abi.encode*(..., (CustomType))` and `abi.decode(..., (CustomType))` works as
intended.
2021-09-13 18:12:42 +02:00
hrkrshnn
00bfed4d8b
UserDefinedValueType: test to validate zero-cost-abstraction claim.
...
Seems that the optimizer can indeed make it a zero-cost-abstraction!
2021-09-13 16:49:52 +02:00
Daniel Kirchner
fc37b18e88
Fix inline assembly assignments to calldata structs and statically-sized arrays.
2021-09-13 15:22:46 +02:00
Harikrishnan Mulackal
8fafdeacac
Merge pull request #11939 from ethereum/userdefined-types-mapping-key
...
Allow Mapping keys to have type UserDefinedValueType.
2021-09-13 15:06:14 +02:00
hrkrshnn
a1d4d0125d
Allow UserDefinedValueType.uwrap (and wrap) as RHS of constant decl
...
Needed to make `MyType.unwrap` and `MyType.unwrap` as pure in the process. This change affected some
existing tests ("statement has no effect").
2021-09-13 11:53:05 +02:00
hrkrshnn
1fa6c71bd0
Allow Mapping keys to have type UserDefinedValueType.
...
Also added syntax and semantic test.
2021-09-13 10:03:49 +02:00
hrkrshnn
952540c3b5
User defined value type: changes in documentation and test case
...
Changed the name of a function from `truncate` to `floor`, since that is more appropriate; updated
the inaccurate description on the rounding behaviour. Also modified the respective semantic test.
2021-09-09 16:57:03 +02:00
chriseth
3e2e3d1baa
Merge pull request #11915 from ethereum/fix-out-of-sync-gas-costs
...
Fix breakage on `develop` caused by gas costs that went out of sync
2021-09-09 15:42:08 +02:00
Kamil Śliwak
f6eecb8c6f
Fix gas costs that went out of sync in some tests due to a recent merge
2021-09-09 13:26:45 +02:00
hrkrshnn
a03fbf7061
User defined value types: moved a syntax test to semantic test.
2021-09-09 12:07:51 +02:00
Harikrishnan Mulackal
8a37f56e98
Merge pull request #11806 from ethereum/user-defined-types
...
User defined value types
2021-09-09 10:28:35 +02:00
hrkrshnn
5f393d1694
Semantic tests for User Defined Value types
2021-09-08 21:19:30 +02:00
chriseth
4b0cd6cc8c
Update gas costs.
2021-09-08 12:25:56 +02:00
Marenz
2b28f87abf
Add type().min/max for enums
2021-09-01 15:02:02 +02:00
chriseth
45a910c2ca
Merge pull request #11750 from ethereum/immutables-10463
...
Allow reading of immutables during construction time
2021-08-19 14:39:03 +02:00
Marenz
121fd40f74
Allow reading of immutables during construction time
2021-08-19 13:59:05 +02:00
chriseth
2165c0d3d9
Update gas costs.
2021-08-19 13:26:52 +02:00
chriseth
704820cc6e
Update tests.
2021-08-16 22:24:06 +02:00
chriseth
a4c94a1b5b
Fixed inline assembly external identifier access.
2021-08-11 18:18:29 +02:00
hrkrshnn
892700d769
Tests for basefee as identifier in inline assembly
...
Also added basefee to `EVMVersion::hasOpcode(...)`
2021-08-11 10:46:40 +02:00
hrkrshnn
43605d9299
Tests and Changelog for basefee.
2021-08-11 09:51:12 +02:00
chriseth
db85849648
Merge pull request #11737 from ethereum/fix_shift_cleanup
...
Yul: Fix cleanup for left shift of bytes types.
2021-08-05 12:55:42 +02:00
chriseth
6b888b531b
Refactor conversion function.
2021-08-05 11:48:35 +02:00
chriseth
0112fed73b
Yul: Fix cleanup for left shift of bytes types.
2021-08-05 10:54:48 +02:00
Daniel Kirchner
0a6fc89da2
Fix negation function name collision.
2021-07-08 10:47:29 +02:00
Kamil Śliwak
105b4b4c8b
Update tests
2021-07-05 13:46:53 +02:00
hrkrshnn
b628b115ae
Manually enabled gas statistics for erc20 token test.
2021-06-30 16:35:53 +02:00
chriseth
54b1c667f1
Merge pull request #11595 from ethereum/issue-11526
...
Fix yul codegen bug when using binary negation.
2021-06-30 11:55:42 +02:00
Mathias Baumann
c47d02066c
Fix yul codegen bug when using binary negatition.
2021-06-29 17:41:03 +02:00
chriseth
eaac16c779
Merge pull request #11590 from ethereum/disallow-non-hex-zero-and-fix-bytes32-literals-in-bytes-concat
...
Disallow non-hex zero literals and fix 32-byte hex literals in `bytes.concat()`
2021-06-29 16:34:26 +02:00
Kamil Śliwak
6a50d088a0
Fix ICE for 32-byte hex literals and zero literals in bytes.concat() by disallowing them
2021-06-29 14:48:42 +02:00
Kamil Śliwak
fa3696878b
Fix crash when passing empty strings to bytes.concat()
2021-06-29 13:52:01 +02:00
Kamil Śliwak
19fada966f
Do not use \b, \v and \f escapes in string literals in generated Yul code
2021-06-28 14:13:47 +02:00
Kamil Śliwak
ca0b1bf3f3
Fix crash when passing zero to bytes.concat()
2021-06-25 21:26:28 +02:00
Alexander Arlt
8accf420ea
[yul] Functions: Remove dependency on AST ID.
2021-06-23 16:15:25 +02:00
Kamil Śliwak
98e83303b1
Remove assertions preventing calldata->calldata conversion when cleanup is needed
2021-06-22 16:10:16 +02:00
hrkrshnn
eb04dfcd3e
Updated expectation of FixedFeeRegistrar.sol
2021-06-17 10:09:47 +02:00
chriseth
614683019b
Merge pull request #11426 from ethereum/test-fixedfee
...
Move contracts/FixedFeeRegistrar to semanticTests/externalContracts
2021-06-16 18:34:10 +02:00
a3d4
f59145f21f
Fix shadowing struct types by struct member names
2021-06-09 12:37:11 +02:00
chriseth
c55d173a28
Merge pull request #11479 from ethereum/fix-ice-when-assigning-implicitly-convertible-function-array-to-storage
...
Fix ICE when assigning implicitly convertible function array to storage
2021-06-03 10:52:21 +02:00
chriseth
93936129f1
Merge pull request #11476 from ethereum/fix-ice-on-library-bound-to-literal
...
Fix ICE in IR when a library is bound to a literal
2021-06-03 08:58:00 +02:00
Kamil Śliwak
ccf658b0e8
Fix assertion preventing assignment of arrays of implicitly convertible function types
2021-06-03 08:56:02 +02:00
Kamil Śliwak
d96cc3469a
FunctionDefinition.resolveVirtual(): Skip unimplemented functions when lookup happens via super
2021-06-02 16:16:15 +02:00
Kamil Śliwak
3c7112ed2b
Remove the assertion against functions bound to types for which should not be possible
...
- The list was wrong - we do support string and int literals
- The assertion was meant to guard against silently skipping over types for which there is no special handling. The current code handles everything in a generic way though and likely will not have to be adjusted for newly added types so the risk of that happening is low.
2021-06-02 13:59:42 +02:00
Harikrishnan Mulackal
8ecf79474b
Merge pull request #11458 from ethereum/event_indexed_mixed
...
Add test with event where indexed parameters are not the first.
2021-05-31 16:19:52 +02:00
chriseth
3dfa68a574
Merge pull request #11456 from ethereum/ice-abstract-contract-mapping-constructor
...
Fix ICE related to mapping types in abstract contract constructor
2021-05-31 15:35:26 +02:00
chriseth
28aad7e0b4
Add test with event where indexed parameters are not the first.
2021-05-31 15:19:56 +02:00
hrkrshnn
138873d918
Fix ICE related to mapping types in abstract contract constructor
2021-05-31 14:56:49 +02:00
chriseth
c09dc6144c
Merge pull request #11050 from ethereum/isoltest-effects-events
...
[isoltest] Add support for events using call side-effects.
2021-05-31 14:38:14 +02:00
Alexander Arlt
85e3fcb1bf
[isoltest] Extract event specific end-to-end tests.
2021-05-27 23:21:55 -05:00
Alexander Arlt
ec86e3e9ae
[isoltest] Add support for events using call side-effects.
2021-05-27 23:21:55 -05:00
Alex Beregszaszi
47167a42a7
Update tests
2021-05-27 18:31:54 +01:00
chriseth
caa833909d
Merge pull request #11244 from ethereum/berlin-gas-update
...
Change default EVM version to Berlin and update Gas costs.
2021-05-26 13:34:04 +02:00
hrkrshnn
97c9d21376
Force two tests to go out of gas.
2021-05-26 12:23:06 +02:00
hrkrshnn
4d6c951396
Isoltest gas update after Berlin gas cost changes
2021-05-26 12:23:06 +02:00
Alexander Arlt
e9ee571b35
[isoltest] Add support for call side-effects.
2021-05-22 00:12:07 -05:00
Alex Beregszaszi
cb2c246a7b
Move contracts/FixedFeeRegistrar to semanticTests/externalContracts
2021-05-21 13:51:19 +01:00
Alexander Arlt
799106acfe
[isoltest] Add account builtin.
...
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2021-05-21 12:38:05 +01:00
Alex Beregszaszi
3e8e5f3bf9
Fix v1/v2 tests to behave like they did pre-0.8.0
2021-05-17 12:37:10 +01:00
Alex Beregszaszi
299873182b
Cleanup ABICoder V1 tests
...
Include the pragma explicitly, rename the file to have a _v1 suffix, and also add V2 counterparts where missing.
2021-05-17 12:37:10 +01:00
Harikrishnan Mulackal
e76a8cbc31
Merge pull request #11395 from ethereum/prbmath
...
Fix prbmath.exp tests
2021-05-17 11:28:15 +02:00
Alex Beregszaszi
e73ee468a8
Update tests
2021-05-14 19:56:26 +01:00
Alex Beregszaszi
7dc514847a
Fix prbmath.exp tests
2021-05-14 15:29:12 +01:00
Djordje Mijovic
53e3081e81
Update gas costs in tests.
2021-05-05 11:33:09 +02:00
Djordje Mijovic
f0c5cdca9f
[Sol->Yul] Adding util function to copy literal to storage.
...
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
Co-authored-by: chriseth <chris@ethereum.org>
2021-05-05 11:33:03 +02:00
Djordje Mijovic
8f6d94dbd2
Update gas expectations in semantic tests.
2021-05-05 08:53:40 +02:00
chriseth
aded56b5b9
Update tests
2021-05-03 18:28:43 +02:00
chriseth
996f3d31d5
Merge pull request #11321 from ethereum/test-prbmath
...
Add semantictest using prbmath
2021-05-03 10:36:30 +02:00
chriseth
fcc98d12b8
Gas updates.
2021-04-29 16:45:05 +02:00
chriseth
f30ef06d62
Update tests.
2021-04-29 15:08:54 +02:00
Alexander Arlt
19ad9fac99
[isoltest] Add support to query balance.
2021-04-28 16:19:05 +02:00
Alexander Arlt
1f2711b0aa
[isoltest] Replace storage command with 'storage_empty' builtin.
2021-04-27 16:28:37 -05:00
Alex Beregszaszi
0b3f3dff60
Add ramanujan's pi approximation as a semantic test
2021-04-27 20:47:42 +01:00
Alex Beregszaszi
484a4398a7
Add semantic tests using prb-math
2021-04-27 20:23:13 +01:00
Alex Beregszaszi
ada046ba9a
Import prb-math for testing
...
From 62021c1abc
2021-04-27 20:08:33 +01:00
Alex Beregszaszi
5331bc679a
Fix some issues regarding checked arithmethics in stringutils
2021-04-27 17:05:40 +01:00
Alex Beregszaszi
6b3357be50
Add semantic tests using stringutils
2021-04-27 17:02:54 +01:00
Alex Beregszaszi
1a556aaa7f
Move compilationTests/stringutils to semanticTests/externalContracts
2021-04-27 11:21:14 +01:00
Alexander Arlt
481971cbcf
[isoltest] Add support for external sources.
2021-04-26 08:27:30 -05:00
Alexander Arlt
8239eaa1b8
Fix test builtins & add simple smoke test.
2021-04-26 07:51:43 -05:00
chriseth
659da4bdc7
Merge pull request #11047 from ethereum/bytesToBytesNNConversion
...
Bytes to bytesNN conversion
2021-04-26 11:51:41 +02:00
Alex Beregszaszi
f952f851b7
Enable more semantic tests for Ewasm
2021-04-23 17:00:01 +01:00
Djordje Mijovic
eb457064b1
Adding semantic tests for bytes to bytesNN conversion.
2021-04-23 13:30:19 +02:00
hrkrshnn
3d29ae73e7
Isoltest: updated the gas tests.
2021-04-22 18:19:47 +02:00
hrkrshnn
221292c278
Tests and changelog
2021-04-22 18:19:47 +02:00
chriseth
00fb2d390b
Do not replace zeros by return variable.
2021-04-22 16:54:02 +02:00
Đorđe Mijović
8840fb6ffd
Merge pull request #11270 from ethereum/addingBoundsByteArraySolYul
2021-04-22 15:41:32 +02:00
Djordje Mijovic
3a4233f3ad
[Sol->Yul] Adding bounds check when increasing size of byte array.
2021-04-22 11:42:46 +02:00
chriseth
35b651103d
Adjust cost of literal zero.
2021-04-22 11:42:42 +02:00
Djordje Mijovic
9fcf16900d
Update gas costs in smeantic tests.
2021-04-21 11:01:22 +02:00
Alex Beregszaszi
4177270562
Trivial isoltest updates: comments always on the same line
2021-04-20 17:38:29 +02:00
Alex Beregszaszi
84c05d35f3
Trivial isoltest updates: normalized whitespace
2021-04-20 17:38:29 +02:00
Alex Beregszaszi
45c6bbe02b
Trivial isoltest updates: directives sorted alphabetically
2021-04-20 17:21:56 +02:00
Djordje Mijovic
ea5cda08c8
Adding tests for bytes.concat with fixed bytes arguments.
2021-04-14 11:21:24 +02:00
chriseth
72d0a56a72
Fix array decoding offset overflow.
2021-04-12 13:43:51 +02:00
chriseth
32b8332867
Refactor array decoding.
2021-04-12 13:43:51 +02:00
chriseth
0cc0cabd30
Merge pull request #11224 from ethereum/lastAllocationUnbounded
...
Use unbounded allocation before returning.
2021-04-08 19:32:40 +02:00
Daniel Kirchner
96c8123b6b
Use unbounded allocation before returning.
2021-04-08 18:37:24 +02:00
Daniel Kirchner
6fc4b04d1d
Update test expectations.
2021-04-06 13:41:26 +02:00
chriseth
d5669696d5
Code generation for errors.
2021-03-30 21:15:46 +02:00
chriseth
fb67051467
Revert statement.
2021-03-30 21:15:46 +02:00
chriseth
b04b189959
Syntax for custom errors.
2021-03-30 21:15:18 +02:00
hrkrshnn
0100f48e05
FunctionSpecializer: skip specializing recursive functions
...
This avoids potential pathological behaviour, like in Ackermann function.
2021-03-29 11:02:31 +02:00
hrkrshnn
2c75d1dfe4
Isoltest gas update for FunctionSpecializer
2021-03-29 11:02:31 +02:00
Daniel Kirchner
8b3095920a
Inline ordinary jumps to small blocks and jumps to terminating control flow.
2021-03-24 13:50:24 +01:00
Djordje Mijovic
d0a854b312
Adding semantic tests for bytes.concat.
2021-03-24 11:49:21 +01:00
hrkrshnn
30e08ee3a5
Changelog and test for the KeccakCaching bug
2021-03-23 11:09:00 +01:00
chriseth
7aa51bcb40
Test updates.
2021-03-18 08:42:49 +01:00
Djordje Mijovic
b73e9f3eef
Update tests.
2021-03-10 14:22:30 +01:00