Commit Graph

191 Commits

Author SHA1 Message Date
Alex Beregszaszi
16a91ef90a Use declared instead of defined 2017-03-17 17:06:52 +00:00
Alex Beregszaszi
cfab70fd89 Add tests for interfaces 2017-03-17 17:06:49 +00:00
chriseth
0c8a766146 Merge pull request #1698 from ethereum/exp-notation
Fix scientific notation in number literals
2017-03-15 14:55:45 +01:00
Alex Beregszaszi
6014c3fe16 Add tests for scientific notation 2017-03-15 13:06:26 +00:00
chriseth
ab178b8bac Mention 'transfer' in warning about unchecked 'send'. 2017-03-15 11:10:24 +01:00
chriseth
9f328ff749 Turn non-constant constants error into warning. 2017-03-14 19:25:16 +01:00
chriseth
592cec7e90 Disallow constants that are neither value types nor strings. 2017-03-13 13:30:23 +01:00
chriseth
f39763e91c Type checking for pure expressions. 2017-03-13 13:30:21 +01:00
chriseth
bde913f088 Some new tests for constant variables. 2017-03-13 13:29:51 +01:00
Yoichi Hirai
ef8b56a058 Merge pull request #1751 from ethereum/warnLiteralExpBase
Warn if base of exponentiation operation is a literal.
2017-03-10 19:25:47 +01:00
Yoichi Hirai
e364909e06 Merge pull request #1747 from ethereum/fixICEInternalConstructor
Move privateness of constructor into AST itself.
2017-03-08 17:49:14 +01:00
chriseth
276229cc58 Tests for no compound assignment for tuples. 2017-03-08 12:42:07 +01:00
chriseth
774cdb1135 Tests for warning about literal constant base in exponentition. 2017-03-07 13:43:51 +01:00
chriseth
a2ac05e1a2 Merge pull request #1733 from ethereum/selfReferentialConstant
Detect cyclic dependencies between constants.
2017-03-06 17:18:39 +01:00
chriseth
5c5d83fd70 Check for circular references in constant variables. 2017-03-06 15:05:09 +01:00
chriseth
d089a1ef2b Tests for cyclic dependencies between constants. 2017-03-06 15:05:09 +01:00
chriseth
c89a579809 Test for uninitialized mapping. 2017-03-06 14:27:18 +01:00
chriseth
0479f7f16c Test for trying to construct an inconstructible contract before its definition. 2017-03-06 14:12:42 +01:00
chriseth
2600fa0413 Test for declaring variable with empty tuple type. 2017-03-02 14:33:58 +01:00
chriseth
f35b70f3a3 Test case for external function type with calldata argument. 2017-03-01 15:53:24 +01:00
Alex Beregszaszi
ba437ef31a Add type checking test for address methods 2017-02-24 00:18:18 +00:00
chriseth
5cd01ab7d1 Test for unbalanced stack due to loading two values from outside. 2017-02-20 12:33:22 +01:00
chriseth
e629cf5bc3 Test case. 2017-02-16 14:57:00 +01:00
chriseth
e67faa9839 Extract scopes into compiler stack. 2017-02-14 13:23:44 +01:00
chriseth
fc8e50f688 Refactor NameAndTypeResolver and SyntaxChecker to allow other entry points. 2017-02-14 13:23:44 +01:00
Alex Beregszaszi
697db80b48 Disallow arrays with negative length 2017-02-02 00:24:45 +00:00
Alex Beregszaszi
ee147e14d3 Cover both failure cases 2017-02-01 21:35:32 +00:00
Alex Beregszaszi
0b61f13c7f Add more tests for function type conversion 2017-02-01 12:23:47 +00:00
Alex Beregszaszi
ef7add8c2b Add tests for explicity fuction type to address casting 2017-02-01 12:23:47 +00:00
chriseth
a9c6ff4ac8 Refactor json return type generation. 2017-01-26 18:21:19 +01:00
chriseth
1316bb7565 Warn about invalid checksums of addresses. 2017-01-24 23:37:48 +01:00
chriseth
b52a60402d Merge pull request #1245 from ethereum/1215
Allow multiple events of the same name
2017-01-24 11:52:21 +01:00
Yoichi Hirai
3d8b56c2a4
test: add tests about functions and events of the same name 2017-01-23 15:25:13 +01:00
Yoichi Hirai
5a56496db9
test: Add a test for #1215
using the original example from @pipermerriam
2017-01-23 15:25:13 +01:00
chriseth
df4ef74199 Add tests for internal constructor. 2017-01-20 19:22:39 +01:00
Yoichi Hirai
9602318eab
test: allow multiple errors in modifier-function overriding 2017-01-11 18:28:11 +01:00
Yoichi Hirai
42b6726173
analysis: allow some shadowings explicitly 2017-01-11 18:28:11 +01:00
Federico Bond
de720e643d Improve error message when trying to modify constant variables 2016-12-13 00:32:37 -03:00
Federico Bond
05139500fb Warn about using msg.value in non-payable function 2016-12-08 16:22:13 -03:00
chriseth
e7ff4ac810 Merge pull request #1412 from ethereum/disallow-multiple-errors
disallow more than one errors in name and type tests
2016-12-08 16:07:46 +01:00
Yoichi Hirai
94536ccec8
test: check error messages in parser tests 2016-12-06 17:28:49 +01:00
Yoichi Hirai
1f345e527d
test: either fix tests to raise just one error, or mark them as raising multiple errors 2016-12-05 15:41:37 +01:00
Yoichi Hirai
01215694f6
test: disallow more than one errors in name and type tests 2016-12-05 15:41:37 +01:00
Federico Bond
70d246c834 Migrate remaining source code in tests to R literals 2016-12-03 17:52:51 -03:00
chriseth
55a719a79c Merge pull request #1462 from ethereum/fix-incorrect-assertion
codegen: assertion did not assert non-nullness
2016-12-01 15:14:31 +01:00
Yoichi Hirai
422140f603
test: more precise expectation about the error for assigning into storage in inline assembly 2016-12-01 12:27:27 +01:00
Yoichi Hirai
dd0bd57d67
test: change retrieveFunctionBySignature to take a constant reference rather than a pointer
The function `retrieveFunctionBySignature` expected the argument to be a non-null pointer.
This commit makes this assumption more explicit.
2016-12-01 11:53:06 +01:00
Yoichi Hirai
df5d5edd1b
test: add a test about explicitly converting a string literal to string 2016-11-25 13:54:13 +01:00
Yoichi Hirai
e136ec8704
ast: string literals that are not valid UTF are not convertible to strings 2016-11-25 13:36:06 +01:00
Yoichi Hirai
aaf58a8c4e
test: add a test case converting an invalid UTF-8 into a string 2016-11-25 13:13:47 +01:00