Alex Beregszaszi
7d52884247
Add more test cases for shifts with constants
2019-02-25 14:44:30 +00:00
Leonardo Alt
2405b2151a
EVMVersion in langutil namespace instead of solidity
2019-02-25 15:29:57 +01:00
chriseth
8ace2c5b11
Special treatment for differences between ABI encoders.
2019-02-21 11:11:29 +00:00
chriseth
b14d22d11e
Tests for events with structs in libraries.
2019-02-20 14:35:02 +01:00
chriseth
05541e5adb
Fixed internal error related to ecrecover and ABIEncoderV2.
2019-02-19 14:17:03 +01:00
chriseth
d5791fef41
Fix combination of delegatecall and ABIEncoderV2.
...
We can set the flag to false for bare delegatecall, because we always
send a memory string and never a storage reference.
2019-02-19 13:57:03 +01:00
chriseth
c690f679cb
Allow cleanup for mappings (do nothing).
2019-02-18 18:50:22 +01:00
chriseth
9ab72f0188
Merge pull request #5971 from ethereum/overloadedEvents
...
More tests for overloaded events.
2019-02-12 12:00:02 +01:00
chriseth
091bbdb459
More tests for overloaded events.
2019-02-12 10:54:58 +01:00
Daniel Kirchner
9e32aa7510
Disallow calldata arrays with dynamically encoded base types in TypeChecker.
2019-02-11 17:13:12 +01:00
Daniel Kirchner
0e4912a203
ABIEncoderV2: Implement calldata structs without dynamically encoded members.
2019-02-11 15:46:58 +01:00
Mathias Baumann
fe2429de9f
Packed Encoding: Disallow types in v2 that aren't allowed in v1
2019-02-11 11:37:48 +01:00
chriseth
7684d886ae
Semantic tests.
2019-02-11 11:37:47 +01:00
chriseth
35483422f3
Pad code to multiple of 32 bytes.
2019-01-30 11:31:28 +01:00
chriseth
2a0d4f358c
Add test for content of creationCode and runtimeCode.
2019-01-17 20:36:48 +01:00
chriseth
44237211d1
Tests.
2019-01-17 20:36:48 +01:00
chriseth
17bf164afe
Merge pull request #4951 from ethereum/alethUpdates
...
Use current aleth release for testing.
2018-12-12 18:41:35 +01:00
Daniel Kirchner
6d82ad1338
Test updates for recent versions of aleth.
2018-12-11 04:47:05 +01:00
chriseth
d80d324de7
Tests for gas costs.
2018-12-10 18:06:07 +01:00
chriseth
73a64da041
Fix bug related to state variables of function type accessed via base contract.
2018-11-29 19:30:27 +01:00
chriseth
240ad0e34e
Merge pull request #5382 from ethereum/libraryMappingPublic
...
Allow mapping arguments for public and external library functions.
2018-11-26 19:47:32 +01:00
Daniel Kirchner
30e6f8d3fb
Allow mapping arguments for public and external library functions.
2018-11-26 16:31:46 +01:00
Daniel Kirchner
597174119a
Tests.
2018-11-26 14:30:32 +01:00
chriseth
ac5803bf3e
Changelog entry and tests.
2018-11-26 12:41:26 +01:00
Leonardo Alt
06189ae57f
Add assert and tests for bound functions
2018-11-22 14:41:39 +01:00
Christian Parpart
87821c53c3
Isolating files shared between Yul- and Solidity language frontend.
2018-11-21 18:58:12 +00:00
Christian Parpart
ab0de38f16
Eliminate byte
-typedef and use uint8_t
in all their places instead.
...
This change is made to (easily) be forward compatible with future C++
standards, in order to allow compiling the code with newer standards at
some point in the future.
* Removed the `using byte = uint8_t;` line from Common.h
* Mechanically change all uses of `byte` to `uint8_t`.
Tested with GCC 7.3 in C++11/14/17 modes :-)
2018-11-07 12:17:57 +01:00
chriseth
c13b5280c1
Merge pull request #5256 from ethereum/lvalueCleanup
...
Lvalue cleanup
2018-10-19 11:20:12 +02:00
chriseth
56425bb2b1
Add a test for delete x.length
2018-10-17 22:07:05 +02:00
mordax
134f5cb798
Added test for flipping signs on signed type edge case
2018-10-15 16:08:43 -04:00
Erik Kundt
4beabf6686
Documents library view functions and adds unit test.
2018-10-10 12:28:24 +02:00
Daniel Kirchner
3e55aa3fa2
Disable blockhash test for constantinople due to changes between aleth versions.
2018-09-13 17:18:42 +02:00
Daniel Kirchner
879251a78b
Update test suite to use address payable.
2018-09-12 16:21:43 +02:00
chriseth
7118f53974
Tests.
2018-09-10 12:47:46 +02:00
chriseth
a996ea266c
Merge pull request #4590 from ethereum/msgValueModifier
...
Warn if modifier uses msg.value in non-payable function
2018-09-05 10:32:10 +02:00
Daniel Kirchner
e3097b30da
Add another end-to-end test.
2018-09-04 15:34:21 +02:00
Daniel Kirchner
82f512a7d4
Add return data to bare calls.
2018-09-04 13:31:10 +02:00
Leonardo Alt
b7c6e53d3d
Fix endToEnd test
2018-09-03 18:35:57 +02:00
chriseth
cc6fa6d61f
Merge pull request #4822 from ethereum/addressStaticCall
...
Add ``staticcall`` to ``address``.
2018-08-16 00:13:21 +02:00
Leonardo Alt
c3d3ae80fa
Add end to end tests
2018-08-15 17:11:18 +02:00
Daniel Kirchner
7ca0aaaf6f
Add `staticcall
to
address
`.
2018-08-15 16:06:48 +02:00
chriseth
9328ea4c3c
Add abi.decode(bytes data, (...))
2018-08-15 10:45:16 +02:00
Chase McDermott
b000a022f2
Update tests
2018-08-14 18:53:06 +02:00
Christian Parpart
81faafe7f2
Adds support for structs in interfaces.
...
Closes #4733 .
2018-08-14 15:36:03 +02:00
Daniel Kirchner
b325a70d59
Fix tests for constantinople (expect zero for the time being).
2018-08-14 11:42:34 +02:00
Daniel Kirchner
06b7edfdcf
Add missing tests for `gasleft()
,
blockhash()
tx.gasprice
and
block.gaslimit
`.
2018-08-14 11:42:34 +02:00
chriseth
3dd31b704a
Merge pull request #4798 from ethereum/mappingArgumentsAndReturns
...
Mapping arguments and returns
2018-08-13 17:27:29 +02:00
Daniel Kirchner
341128962f
Allow mappings of arrays as arguments and return values of internal functions.
2018-08-13 16:33:37 +02:00
Daniel Kirchner
a9f31da411
Allow mapping arguments and return values in all internal functions.
2018-08-13 15:50:22 +02:00
Daniel Kirchner
57ada1d69e
Allow mapping arguments and return values in internal library functions.
2018-08-13 14:31:10 +02:00
Daniel Kirchner
7d7abeb149
Disallow ambiguous conversions between number literals and bytesXX types.
2018-08-13 14:27:01 +02:00
chriseth
d634d20b5b
Merge pull request #4684 from ethereum/underscores_in_numeric_literals
...
[BREAKING] Underscores in numeric literals
2018-08-08 21:36:57 +02:00
Alex Beregszaszi
1bfb841771
Remove experimental 0.5.0 pragma
2018-08-08 14:05:36 +01:00
Christian Parpart
b9222808f6
Cleanup & polish numbers-with-underscores parsing, also improving tests.
2018-08-08 13:38:46 +02:00
Balajiganapathi S
09a36cba02
Add stricter hex underscore rules
2018-08-08 12:05:51 +02:00
chriseth
d7756322c0
Merge pull request #4731 from ethereum/interface-enum
...
Allow enums in interfaces
2018-08-07 17:20:05 +02:00
Alex Beregszaszi
34a711a14d
Add endToEnd test for referencing enums
2018-08-07 15:04:17 +02:00
Alex Beregszaszi
5298d818c4
Add test for abi.encode (negative) literals
2018-08-07 13:44:24 +01:00
chriseth
3b5eee4998
Tests for deriving types for empty string.
2018-08-06 17:10:23 +02:00
chriseth
9d03de1f25
Merge pull request #4671 from ethereum/mappingTupleAssignment
...
Disallow assignments to mappings within tuple assignments; allow for local variables.
2018-08-06 12:59:16 +02:00
Daniel Kirchner
cbae02b514
Additional semantics test cases.
2018-08-03 17:38:30 +02:00
Daniel Kirchner
1e4b5886d6
Allow assignments to local variables of mapping types.
2018-08-03 16:22:03 +02:00
Christian Parpart
43c01361f3
Drops tests for inline assembly jumps and function access as both isn't possible anymore.
2018-08-02 13:37:22 +01:00
Christian Parpart
a4ab305347
Drop swap_peephole_optimization test from EndToEndTests
...
Already covered by libevmasm/Optimiser: peephole_noncommutative_swap1, peephole_commutative_swap1 and peephole_swap_comparison
2018-08-02 13:37:22 +01:00
Christian Parpart
9b8a05ebfb
Update tests to remove support for loose assembly
2018-08-02 13:37:13 +01:00
chriseth
b800bfb021
Fix tests regarding contract type conversion.
2018-08-01 11:04:35 +01:00
chriseth
c8232d9759
Disallow conversion between unrelated contract types.
2018-08-01 11:04:35 +01:00
Alex Beregszaszi
de90290c28
Merge pull request #4527 from ethereum/mappingEnforceStorage
...
Enforces explicit data location for mappings
2018-07-23 20:43:38 +01:00
Erik Kundt
c622a1e56c
Enforces data location of local mappings to storage.
2018-07-23 19:30:07 +02:00
chriseth
e3c2f20f6e
Merge pull request #4439 from ethereum/address_members
...
[BREAKING] Enforce address members not accessible by contract instance
2018-07-19 09:24:27 +02:00
Erik Kundt
75bba5c9f0
Adjusts tests to expect type errors on default visibility.
2018-07-17 18:03:35 +02:00
Leonardo Alt
0075f4239a
Address members not accessible by contract instance
2018-07-17 13:33:23 +01:00
chriseth
29dae15c50
Merge pull request #4481 from ethereum/disallow-throw
...
[BREAKING] Deprecate the throw statement
2018-07-16 16:25:22 +02:00
Alex Beregszaszi
aa08460d94
Replace throw with revert() in end-to-end tests
2018-07-16 15:33:20 +02:00
Erik Kundt
ed2aa3b869
Fixes end-to-end tests.
2018-07-16 14:51:46 +02:00
Erik Kundt
893f4cf092
Specifies visibility in unit tests.
2018-07-16 14:49:55 +02:00
chriseth
931794001e
Merge pull request #4500 from ethereum/v050-interface-functions-must-be-external
...
[BREAKING] interface functions must be external
2018-07-16 14:43:56 +02:00
Chase McDermott
f48d01d066
Added default data locations to parameters for end to end tests.
2018-07-16 14:18:16 +02:00
Christian Parpart
396bf11858
enforce interface-functions to be external-declared
...
- libsolidity: Enforce interface-functions must be external-declared.
- Changelog adapted to reflect changes wrt. functions in interfaces.
- test: Adjustments according to prior interface-function changes.
- tests: Adapting SolidityEndToEndTest to interface-function change.
- docs: Adapted documentation to interface-function change.
2018-07-16 12:15:36 +02:00
Daniel Kirchner
62645d5302
Update tests.
2018-07-12 20:33:52 +02:00
chriseth
81271801b4
Merge pull request #4478 from ethereum/requireStorageLocation
...
Turn missing storage locations into an error.
2018-07-12 18:00:05 +02:00
chriseth
fa8102880f
Merge pull request #4428 from ethereum/enforce_staticcall_view
...
[BREAKING] Enforce STATICCALL for view and pure
2018-07-12 13:14:02 +02:00
chriseth
576f3ef18c
Merge pull request #4083 from ethereum/variable_stack_slot
...
[BREAKING] Allocate local variables according to their scope
2018-07-12 13:01:15 +02:00
Daniel Kirchner
8b4b8bdbae
Update test wrt requiring storage locations.
2018-07-12 12:54:42 +02:00
Leonardo Alt
38026d3114
Use STATICCALL for view and pure
2018-07-11 14:45:22 +02:00
chriseth
238dbe1b99
Merge pull request #4388 from ethereum/noPackedLiterals
...
Disallow packed encoding of literals.
2018-07-11 14:28:20 +02:00
Cryptomental
4116704442
test: Fix typos.
...
Fix typos using codespell.
Refs: #4442
2018-07-10 22:57:59 +02:00
chriseth
6567cd3e51
Merge pull request #4466 from ethereum/tupleNotEmpty
...
Disallow empty tuple components.
2018-07-10 21:03:30 +02:00
Leonardo Alt
a18a475b1a
Change test from public to external
2018-07-10 19:08:05 +02:00
Leonardo Alt
0c5e0e0d59
Added assertion and tests suggestions
2018-07-10 18:39:38 +02:00
Leonardo Alt
b750ca9741
Add more tests and assertions
2018-07-10 18:39:38 +02:00
Leonardo Alt
9d895e002d
Added tests and review suggestions
2018-07-10 18:39:38 +02:00
Daniel Kirchner
6d28278b3f
Update end-to-end tests.
2018-07-10 15:53:48 +02:00
chriseth
7650905567
Merge pull request #4415 from ethereum/uninitializedStoragePointer
...
[BREAKING] Turn uninitialized storage variables into error.
2018-07-10 15:24:01 +02:00
Daniel Kirchner
afa5f528f5
Update tests.
2018-07-10 12:17:01 +02:00
Daniel Kirchner
46d6454b1f
Update tests.
2018-07-10 11:38:32 +02:00
chriseth
c8ac861832
Fix allocation of byte arrays.
2018-07-05 14:18:14 +02:00
Erik Kundt
87ab7d1821
Fixes compilation errors.
2018-07-04 15:45:42 +02:00
Erik Kundt
cbfe3766db
Fixes defects in end-to-end tests.
2018-07-04 15:45:42 +02:00
Erik Kundt
b42929975f
Updates end-to-end tests to specify default visibility.
2018-07-04 15:32:49 +02:00
Leonardo Alt
8202d512e0
Enforcing error on msg.gas and block.blockhash()
2018-07-04 11:42:05 +02:00
chriseth
533d5d4b1c
Merge pull request #4379 from ethereum/constructorArgsTwice
...
Disallow constructor arguments given multiple times.
2018-07-03 22:49:02 +02:00
chriseth
f7a9c4203e
Disallow packed encoding of literals.
2018-07-03 01:02:00 +02:00
chriseth
0f3872694b
Merge pull request #4374 from ethereum/v050-var-keyword-removal-preps-end2end-tests
...
V050 var keyword removal preparations (End-to-End tests)
2018-07-02 18:26:46 +02:00
Christian Parpart
e251cdcf47
test: ensure compiled tests do not use var-keyword in preparation of var-keyword removal
2018-07-02 14:32:05 +02:00
Daniel Kirchner
334c023c72
Determine transaction status in RPC sessions.
2018-07-02 12:56:33 +02:00
chriseth
8747079746
Fix tests.
2018-06-29 16:24:14 +02:00
Erik Kundt
12c4eb7697
Updates compiled unit tests to new constructor syntax.
2018-06-29 11:27:01 +02:00
chriseth
eeef82b2d7
Fallback function has to be external: backwards-compatible changes.
2018-06-29 00:23:52 +02:00
chriseth
4a842ecc82
Merge pull request #4097 from ethereum/noPackedExceptForPacked
...
[BREAKING] call only takes a single argument and does not pad
2018-06-27 18:29:01 +02:00
chriseth
4e8883b63d
Add emit keyword to tests.
2018-06-27 10:49:16 +02:00
chriseth
86a720b96a
Adjust tests.
2018-06-25 17:17:18 +02:00
chriseth
312f422e10
Forwarding length check.
2018-06-25 17:01:45 +02:00
Jason Cobb
98c9ca2575
Update tests for strict address literals
2018-06-25 16:17:50 +02:00
Leonardo Alt
8862b3092b
C99 scoping rules by default
2018-06-20 12:53:38 +02:00
Alex Beregszaszi
a17059573f
Disallow raw callcode (was deprecated in 0.4.12)
2018-06-19 19:31:07 +02:00
Christian Parpart
a211b89118
Enforce disallowing empty structs
...
This patch enfoces an error when it encounters an empty struct,
effectively eliminating the deprecation warning.
Also adjust 419_interface_structs to explicitely test for (non-empty) structs,
as this behaviour "may" change in the future.
2018-06-14 00:24:43 +01:00
chriseth
1dc28c065d
Properly pad data from calldata.
2018-06-12 18:51:40 +01:00
Alex Beregszaszi
9de45383d8
Disallow sha3/suicide aliases
2018-06-12 18:16:18 +01:00
Daniel Kirchner
510f227bd7
Additional test and more explanation.
2018-06-12 15:53:15 +02:00
Daniel Kirchner
f33dc92cbd
Use proper SAR for signed right shifts and emulate on pre-constantinople.
2018-06-12 09:32:19 +01:00
chriseth
c59a06bb97
Merge pull request #4213 from ethereum/fixpop
...
Fix bug related to byte array pop.
2018-06-04 16:10:56 +02:00
Jason Cobb
7de0d56aae
Remove sha3/suicide from assembly tests
2018-06-04 01:04:49 +01:00
chriseth
4b7e58f22f
Add test for pop on the stack.
2018-05-31 15:01:45 +02:00
Erik Kundt
fea0d116f7
Fixes assembly bug and adds tests to cover it.
2018-05-30 17:46:43 +02:00
Erik Kundt
34b5eca1f8
Improves assembly and adds more tests.
2018-05-30 17:40:33 +02:00
Erik Kundt
7156a01acc
Implements pop() for byte arrays.
2018-05-29 12:53:02 +02:00
bitshift
e9dcfb0b62
Implements pop() for value type arrays.
2018-05-29 12:53:02 +02:00
chriseth
5ee2ce353e
Merge pull request #4067 from ethereum/050
...
[BREAKING] Version 0.5.0
2018-05-23 18:11:20 +02:00
Daniel Kirchner
f627dc77d0
Fix continue inside do-while.
2018-05-16 18:32:48 +02:00
Daniel Kirchner
f5a49f679a
Adjust tests.
2018-05-16 18:32:47 +02:00
Alex Beregszaszi
adce9ca812
Tidy up tests to always have closing braces on the proper line
2018-05-16 15:52:24 +02:00
chriseth
8b98ff470c
Add test for forwarding length check.
2018-05-16 09:48:03 +02:00
chriseth
c781baf733
Add tests for multi variable declaration statement.
2018-05-16 03:52:24 +02:00
chriseth
dce6224052
Merge pull request #4062 from ethereum/revert-variable
...
Fix revert with reason coming from a string variable
2018-05-15 14:44:39 +02:00
Daniel Kirchner
9b7ded2f78
Remove "view"'s in end-to-end tests that will result in errors in 0.5.0.
2018-05-11 11:01:06 +02:00
Alex Beregszaszi
c03a29dea8
Fix revert with reason coming from a string variable
2018-05-09 17:53:17 +02:00
Daniel Kirchner
bc47265b3f
Replace constant with view in the tests.
2018-05-09 15:07:47 +02:00
Daniel Kirchner
3e6a8d7c2a
Add more tests for right shifts.
2018-05-09 12:50:56 +02:00
Alex Beregszaszi
38460d8b47
Remove unnecessary masking of the result of known short instructions
2018-04-19 23:59:06 +01:00
chriseth
3d04d83297
Merge pull request #3868 from ethereum/bytescleanup
...
Properly force-clean for shortening bytesXX conversions.
2018-04-16 15:23:36 +02:00
chriseth
bf57500e25
Tests for bytes cleanup.
2018-04-16 12:47:38 +02:00
Erik Kundt
33fbf88707
Limits rational numbers to 4096 bits.
2018-04-16 11:45:55 +02:00
chriseth
7054defdd6
Merge pull request #3364 from ethereum/revertWithReason
...
Revert with reason
2018-04-12 21:01:08 +02:00
chriseth
44416d1ac6
Merge pull request #2980 from ethereum/abi-api
...
Add abi.encode and abi.encodePacked
2018-04-12 20:55:03 +02:00
chriseth
75b8828666
Allow struct encoding with new encoder.
2018-04-12 16:37:16 +02:00
chriseth
4faa839813
Use error signature for revert data.
2018-04-12 13:09:38 +02:00
chriseth
e133b1a0cd
Adjust expectations in case of homestead VM.
2018-04-12 13:09:38 +02:00
chriseth
aa715f8759
Tests about error bubbling for create and transfer.
2018-04-12 13:09:38 +02:00
chriseth
7a9ee69e98
Bubble up error messages.
2018-04-12 13:09:38 +02:00