Commit Graph

266 Commits

Author SHA1 Message Date
Yoichi Hirai
8dc306d62b
test: add a test case about inheriting multiple events of the same name 2017-01-23 15:25:13 +01:00
Yoichi Hirai
567139486f
test: somehow log counting system has changed 2017-01-23 15:25:13 +01:00
Yoichi Hirai
4c09e81c3e
test: check the results of function calls in the test for multiple events of the same name 2017-01-23 15:25:13 +01:00
Yoichi Hirai
133d1c05e1
test: fixing inconsistent usage of end-to-end test framework 2017-01-23 15:25:13 +01:00
Yoichi Hirai
0e85e35a7f
test: Add an end-to-end test about multiple events of the same name
See #1215
2017-01-23 15:25:13 +01:00
chriseth
df4ef74199 Add tests for internal constructor. 2017-01-20 19:22:39 +01:00
chriseth
d3a391c136 Provide fallback for linking. 2017-01-18 17:41:36 +01:00
Rhett Aultman
1f30982ab5 Use fully-qualified names for linking, too
Using libraries leaves behind a library link reference in the binary
which the linker must later resolve.  These link references were still
being generated by name and not by fully-qualified name.  This would
lead to a link-time collision between two libraries having the same
name but in different source units.

This change changes linker symbols over to fully-qualified names,
which resolves that issue.  This does potentially introduce a new
problem, which is that linker symbols appear to be limited to 36
characters and are truncated.  Storing paths extends the average
symbol size, and it would be great if truncation was from the tail
rather than the head.
2017-01-16 12:32:57 -05:00
Yoichi Hirai
42b6726173
analysis: allow some shadowings explicitly 2017-01-11 18:28:11 +01:00
Yoichi Hirai
96ca706353
test: add a test case for #1286 2017-01-02 17:58:33 +01:00
chriseth
08a11e309f Fix tests. 2016-12-13 17:02:28 +01:00
Yoichi Hirai
932e7887bd
test: add tests that tries different types on <<= 2016-12-13 16:35:42 +01:00
chriseth
2fac1d23a7 Tests for bytes. 2016-12-12 11:12:12 +01:00
chriseth
7bc2ecf30a Correct test expectations. 2016-12-12 11:12:12 +01:00
chriseth
2738045030 Cleaner shift handling and type conversion for binary operations. 2016-12-12 11:12:12 +01:00
chriseth
2df60bec92 Type after shift should be type of left operand. 2016-12-12 11:12:12 +01:00
Alex Beregszaszi
b8b4f5e9f9 Support bitshifting in variables 2016-12-12 11:12:10 +01:00
chriseth
84443eb560 Merge pull request #1351 from ethereum/truncate_bit
Truncate a boolean from calldata into one bit
2016-12-08 16:15:35 +01:00
Alex Beregszaszi
c88f34c781 Remove unneeded optimised test from EndToEndTest 2016-12-01 16:04:00 +01:00
chriseth
1e35526eb6 Fix tests. 2016-12-01 16:03:59 +01:00
chriseth
9db14ce673 Merge pull request #1458 from federicobond/r-literals
Use more R string literals in tests
2016-12-01 15:03:27 +01:00
Federico Bond
6ce41b566d Use more R string literals in tests 2016-12-01 00:50:15 -03:00
Alex Beregszaszi
610027cd26 Test that contracts separated by comments are compiled 2016-11-30 23:54:02 +00:00
Yoichi Hirai
b16cdbb57e
test: add a test that witnesses #1318 2016-11-30 17:40:34 +01:00
Alex Beregszaszi
25c5dd48de Rename testSolidityAgainstCpp* to testContractAgainstCpp* 2016-11-29 21:54:28 +00:00
Alex Beregszaszi
d83dd59178 Move ExecutionFramework to the dev::test namespace 2016-11-29 21:54:27 +00:00
Alex Beregszaszi
a226db7338 Split out Solidity-specific part of ExecutionFramework 2016-11-29 21:54:27 +00:00
Yoichi Hirai
feb10d015f
test: add a test that stores an invalid enum value 2016-11-24 11:31:45 +01:00
Yoichi Hirai
d4173cd54a
test: add a test about trying to log an event with too big enum values 2016-11-24 11:31:45 +01:00
Yoichi Hirai
d49904c92a
test: add a test that compares overflown enums 2016-11-24 11:31:45 +01:00
VoR0220
3f9f725737 Fix licensing headers
Signed-off-by: VoR0220 <rj@erisindustries.com>
2016-11-23 12:22:33 +01:00
Alex Beregszaszi
a35ca910c7 Rename test contract names to capitalised 2016-11-17 17:23:35 +00:00
Alex Beregszaszi
7af360882e Add missing payable constructors 2016-11-17 17:23:35 +00:00
chriseth
ec31d08775 Change encoding to address-funid and add "function" as ABI type. 2016-11-16 14:37:19 +01:00
chriseth
e51f852504 Converted sub assembly to smart pointer. 2016-11-16 14:37:18 +01:00
chriseth
e543bd34c0 Stored combined creation and runtime tags.
Includes a change to Assembly to allow tags from sub-assemblies to be
used.

Sorry, this get a bit bigger than I thought.
2016-11-16 14:37:18 +01:00
chriseth
ee3efa67a8 Fix tests. 2016-11-16 14:37:18 +01:00
chriseth
08763a206d Test passing functions as arrays to other contracts. 2016-11-16 14:37:18 +01:00
chriseth
e1df3bd77f Fix tests. 2016-11-16 14:37:18 +01:00
chriseth
f21f794f3c delete for function types 2016-11-16 14:37:18 +01:00
chriseth
47794c1da4 Implement uninitialized storage functions. 2016-11-16 14:37:18 +01:00
chriseth
b6992d740a Tests for uninitialized storage functions. 2016-11-16 14:37:18 +01:00
Yoichi Hirai
3158a8ea7b test: add a test for storing an internal function in the constructor and then using the stored function in runtime 2016-11-16 14:37:18 +01:00
chriseth
87b148494b Tests. 2016-11-16 14:37:18 +01:00
Yoichi Hirai
6172590b87 Add a test around storing functions in an array 2016-11-16 14:37:17 +01:00
Yoichi Hirai
ab3d1b024d Add tests around calling functions returning functions returning functions 2016-11-16 14:37:17 +01:00
chriseth
95d7555e3c External functions in storage. 2016-11-16 14:37:17 +01:00
chriseth
6f19559de0 Fix some type checks and tests for internal / external function parameters. 2016-11-16 14:37:17 +01:00
chriseth
97a3588701 Function type state variables. 2016-11-16 14:37:17 +01:00
chriseth
dd173f83e3 Code generator for function types. 2016-11-16 14:37:17 +01:00
chriseth
cc8583ec7d Function types. 2016-11-16 14:37:17 +01:00
Alex Beregszaszi
ae8403ed08 Rename ErrorTag to invalidJumpLabel in inline assembly 2016-11-15 10:30:33 +00:00
Alex Beregszaszi
bee926bf3f Add tests for the ErrorTag 2016-11-15 10:30:33 +00:00
Yoichi Hirai
e6247195dd
test: add a testcase about using an invalid enum value as an external call argument 2016-11-14 20:46:30 +01:00
Yoichi Hirai
454e7618c8
test: add tests about returning invalid enum values from interface functions 2016-11-14 16:44:04 +01:00
Yoichi Hirai
457daecba1
test: add a test converting -1 as a literal into an enum
This shows #1334 fixes #1344
2016-11-11 17:48:03 +01:00
Yoichi Hirai
08a889a908
test: add a test case for #1343
The test witnesses that #1334 fixes #1343.
2016-11-11 17:48:03 +01:00
Yoichi Hirai
8856adce8f
test: add tests that witness issue #1311 2016-11-11 17:47:48 +01:00
Yoichi Hirai
33590d513e
test: add a test for #621 2016-11-11 15:51:54 +01:00
Rhett Aultman
4524ad0870 Add support for do/while loops
This commit adds support for a standard do <statement> while <expr>;
form of statement.  While loops were already being supported; supporting
a do/while loop mostly involves reusing code from while loops but putting
the conditional checking last.
2016-11-10 07:07:25 -08:00
chriseth
681b130dc8 Test case for overflow in storage. 2016-10-31 16:40:19 +01:00
Yoichi Hirai
58477c233d
test: add more tests about state variable access under base contract names 2016-10-24 19:31:51 +02:00
Yoichi Hirai
922e4b3ce7
test: add tests from #988 2016-10-24 16:34:52 +02:00
Yoichi Hirai
47b11ef2b8
test: add a test case for accessing a state variable under the contract's name
The test comes from the description of #988
2016-10-24 16:28:14 +02:00
Yoichi Hirai
df900c5583
test: add a test about using an inherited enum definition as an expression,
with an explicit mention of the base contract.  The test is about #1131.
2016-10-24 15:28:23 +02:00
Yoichi Hirai
f967623a5b
test: add tests for #1131
The tests are about enum inheritance.
2016-10-21 13:01:45 +02:00
Alex Beregszaszi
13b2101ea7 Add tests for inline assembly in modifiers 2016-10-20 23:57:14 +01:00
Alex Beregszaszi
59603f7b8e Add tests for constant shifts 2016-10-20 00:03:09 +01:00
Yoichi Hirai
0542df25df
Add a test for #1242
This is about `super` as an expression.
2016-10-18 13:25:00 +02:00
chriseth
c4f4d6b971 Fix build error. 2016-10-10 22:14:46 +02:00
chriseth
0b1d449057 Merge pull request #1168 from ethereum/rename-dev-sha3
Rename dev::sha3 to dev::keccak256
2016-10-10 21:23:27 +02:00
Alex Beregszaszi
34df80c502 Add alias keccak256() for sha3() 2016-10-06 16:34:41 +02:00
Alex Beregszaszi
aefb6e5fcf Rename dev::sha3 to dev::keccak256 2016-10-06 14:53:40 +01:00
chriseth
212e016091 Merge pull request #1104 from ethereum/fixmemcosts
Fix memory resize costs during call
2016-09-17 12:30:41 +02:00
chriseth
5a45990458 Access output memory area so that we do not pay for resize during call. 2016-09-17 11:29:54 +02:00
chriseth
dd2f878e59 Test case. 2016-09-17 11:29:54 +02:00
chriseth
727c6fac85 Allow value transfer to library functions. 2016-09-17 11:29:27 +02:00
chriseth
6a55405160 Fix problem with release version string. 2016-09-08 17:56:28 +02:00
chriseth
9ca7472089 Provide gas stipend manually for send(0). 2016-09-06 12:37:01 +02:00
chriseth
ff11aa1927 Change placeholder style. 2016-09-05 21:32:27 +02:00
chriseth
9c64edf110 Change function type to include and propagate payable and constant modifier. 2016-09-05 21:28:28 +02:00
Alex Beregszaszi
962531af96 Merged in changes from chriseth/payable 2016-09-05 21:28:28 +02:00
Alex Beregszaszi
680b83b2a4 Mark every other test payable where neccesary in EndToEndTest 2016-09-05 21:28:28 +02:00
Alex Beregszaszi
34a6afbd77 Include EndToEnd test for payable keyword 2016-09-05 21:28:18 +02:00
chriseth
02984b8de1 Require ";" after "_" 2016-09-05 14:54:50 +02:00
chriseth
18abafe029 Merge pull request #960 from Denton-L/change-else-style
Change else style
2016-08-31 22:34:44 +02:00
chriseth
546aca2a3e Test cases. 2016-08-30 15:31:50 +02:00
chriseth
4bfe09897e Make fallback function throw by default. 2016-08-30 15:31:50 +02:00
Denton Liu
ff756bc94d Make tests more consistent in style 2016-08-26 13:33:42 -04:00
chriseth
fb7836d87b Merge pull request #897 from Denton-L/remove-standard
BREAKING: Remove standard contracts
2016-08-26 19:32:18 +02:00
chriseth
ce42114c41 Fix tests. 2016-08-26 01:00:39 +02:00
chriseth
d5e4b7492e Merge pull request #928 from winsvega/solremove
remove sha256 and rmd160 hash
2016-08-24 19:41:12 +02:00
Dimitry
23acb383d5 remove sha256 and rmd160 hash 2016-08-24 19:52:49 +04:00
Denton Liu
e00f802f72 Remove standard contracts 2016-08-19 10:34:50 -04:00
chriseth
b2507e9f10 Merge pull request #839 from chriseth/checkcode
BREAKING: Make function calls throw if target does not have code.
2016-08-17 16:44:15 +02:00
chriseth
d6579a0a5f Merge pull request #888 from chriseth/throwOnDivZero
Throw on division by zero.
2016-08-17 16:43:13 +02:00
chriseth
774bb8ab3b Make function calls throw if target does not have code.
Low-level calls still just execute and will actually report "success".
This allows `x.call.value(y)()` for x being a non-contract account.
2016-08-17 11:30:40 +02:00
chriseth
9c83109549 BREAKING: return only exits current function/modifier 2016-08-17 11:29:31 +02:00
chriseth
e7683f4722 Merge pull request #836 from chriseth/unusedunderscore
BREAKING: Require modifiers to contain "_".
2016-08-17 11:28:02 +02:00
chriseth
e7084d9e16 Throw on division by zero. 2016-08-17 11:27:15 +02:00