Commit Graph

205 Commits

Author SHA1 Message Date
chriseth
d6e39054e0 Refactor testing via IPC. 2016-06-28 23:18:54 +02:00
chriseth
1c3a64026b Add a test for a struct accessor. 2016-06-04 21:51:48 +02:00
chriseth
754a992500 Inaccessible dynamic types 2016-06-02 12:52:25 +02:00
chriseth
a09583a2a4 Tests for invalid cleanup and missing bool conversion code. 2016-05-20 16:52:38 +02:00
chriseth
775b757d0e Merge pull request #545 from chriseth/accessFunLabels
Allow access to functions in inline assembly.
2016-05-17 23:59:13 +02:00
chriseth
4b445b898e Merge pull request #546 from chriseth/fixiszero
Correctly use not/bnot/iszero.
2016-05-14 00:58:55 +02:00
chriseth
67ca3bb4b9 Allow access to functions in inline assembly. 2016-05-12 12:30:48 +02:00
chriseth
d4206b7cd0 Remove unused tests and add asserts for not implemented parts in code generation.
quick fix on christian's rational

change so that ubuntu will stop yelling

be more specific with rational declaration for Windows sake

rational in namespace correction for windows
2016-05-10 16:03:33 -05:00
VoR0220
82039b732e added bytes conversion tests, resolved that, converted to binary scaling, refactored the find algo to prevent large numbers and take into account integer bytes
think we're good on solidity type name resolution now

removed couts

updates to documentation and more removed couts along with literal value implementation

forgot semicolons
2016-05-09 11:41:03 -05:00
RJ Catalano
9a075458ad initial work for fixed types...potentially needing a constant literal type for this
notation

Rational implemented...trying to figure out exponential

fix for token bug, also quick fix for the wei and seconds

fixed problem with var...probably a conversion problem for fixed in size capabilities

adding fixed type tests

Removing bitshift and regrouping fixed type tests together

size capabilities functioning properly for fixed types

got exponents up and working with their inverse, changed a few of the tests....something is working that likely shouldn't be

slight changes to how to flip the rational negative around...still trying to figure it out

tests added

updated tests

odd differences in trying soltest from solc binary, let me know if you can replicate

test not working for odd reason

fixed test problem with fixed literals...still need a way to log this error

broken up the tests, added some, changed some things in types and began compiler work

moar tests and prepping for rebuilding much of the types.cpp file

further fixing

initial work for fixed types...potentially needing a constant literal type for this
2016-05-09 11:41:02 -05:00
chriseth
a927efb151 Correctly use not/bnot/iszero.
A long time ago, some opcodes were renamed. Now we should only have
not (bitwise negation) and iszero (logical negation).
2016-05-09 10:52:23 +02:00
chriseth
e6b6e27bd7 Some more tests. 2016-05-03 22:48:53 +02:00
chriseth
7ea3d950d7 Allow calling internal functions of libraries.
Internal functions of libraries can be called as if the library were a
base contract of the calling contract. As the calling convention for
internal functions is to not create a new call context, the code of
these functions will be pulled into the context of the caller,
duplicating their code. This might pull in code of further internal or
even private functions.

The use case for such functions is to allow libraries which can operate
on memory types such that these types can also be modified in place.
2016-05-03 22:41:18 +02:00
chriseth
c126ec84a3 Test for bug in static array constructor argument decoder. 2016-04-15 18:42:44 +02:00
chriseth
82175fbd2b Test for bug when deleting dynamic array of structs. 2016-04-15 16:49:26 +02:00
chriseth
98b686c672 Test to check we correctly clean higher order bits for index access. 2016-03-31 01:25:45 +02:00
chriseth
f049430723 Code generation (missing external access and source locations). 2016-03-30 02:37:00 +02:00
chriseth
1bf87c6c2b Set version to 0.3.0 2016-03-11 17:52:24 +01:00
chriseth
e5514becb8 BREAKING: Implement delegatecall and make default for library calls. 2016-03-11 17:49:32 +01:00
RJ Catalano
7b918a7bc7 changes to redefine the token list, the scanner, and the parser and how they pass around variable types of different sizes
not ready for change to FixedPoint just yet

made this more const correct and added a switch statement for easier reading
2016-02-18 11:22:52 -06:00
chriseth
29faf1b298 Index access for bytesXX. 2016-02-09 17:07:04 +01:00
Lu Guanqun
51caa04238 add more test cases for cond-expr 2016-01-22 17:14:01 +00:00
Lu Guanqun
d36537e737 cond-expr: use the mobile type instead of the original type 2016-01-22 17:14:01 +00:00
Lu Guanqun
c8b0533933 [cond-expr] change the end to end test 2016-01-22 17:14:01 +00:00
Lu Guanqun
ac3019298a [cond-expr] add a test for different types 2016-01-22 17:14:01 +00:00
Lu Guanqun
1cd3288311 [cond-expr] add a test to assign memory to storage 2016-01-22 17:14:01 +00:00
Lu Guanqun
bf7daf0814 [cond-expr] don't allow conditional as left value for the first stage 2016-01-22 17:14:00 +00:00
Lu Guanqun
b003290638 [cond-expr] fixup according to code review 2016-01-22 17:14:00 +00:00
Lu Guanqun
db6ce6d8a1 comment out one un-supported test case 2016-01-22 17:14:00 +00:00
Lu Guanqun
08493589c1 fixup end to end test 2016-01-22 17:14:00 +00:00
Lu Guanqun
0a45fe04f3 [cond-expr] add end to end test 2016-01-22 17:14:00 +00:00
Lu Guanqun
e130bc7e7c check whether break/continue is in the loop 2016-01-15 15:12:23 +08:00
RJ Catalano
c45593a444 clarification on dynamic arrays, switcheroo on typepointer, and a documentation test added 2016-01-11 23:41:20 -06:00
RJ Catalano
c7df6d0310 one last test for long strings 2016-01-11 00:48:02 -06:00
RJ
5a3b40f802 Update SolidityEndToEndTest.cpp 2016-01-10 21:36:47 -06:00
RJ
d751b9085c Update SolidityEndToEndTest.cpp 2016-01-10 01:12:52 -06:00
Lu Guanqun
208429644d add a test case for decayed tuple expression as left value 2016-01-04 16:11:43 +08:00
chriseth
54e3637d23 Add structs and enums to contract types. 2015-12-18 16:50:14 +01:00
chriseth
8342424815 Increment version to 0.2.0 (includes breaking changes). 2015-12-01 16:06:14 +01:00
chriseth
7f415da886 Code generation for calling bound methods. 2015-12-01 12:35:34 +01:00
chriseth
a8736b7b27 Merge pull request #256 from chriseth/selfdestruct
Introduce selfdestruct alias for suicide.
2015-11-30 16:06:18 +01:00
chriseth
6796afc2f8 Bugfix for constructor unpacking with fixed-size arrays. 2015-11-29 01:03:39 +01:00
chriseth
b97bb086de Introduce selfdestruct alias for suicide. 2015-11-29 00:10:07 +01:00
chriseth
879844dd0a Code generation for creating arrays. 2015-11-26 13:10:12 +01:00
chriseth
30b325fdc1 Allow "new expressions" also for general type names.
Breaking change: If you want to send value with a contract creation, you
have to use parentheses now:

`(new ContractName).value(2 ether)(arg1, arg2)`
2015-11-26 13:10:12 +01:00
chriseth
588e4232eb Test for allocation bug. 2015-11-24 14:54:18 +01:00
chriseth
8dfc964e7d Merge pull request #227 from chriseth/addmod
Addmod and mulmod.
2015-11-19 13:16:13 +01:00
Gav Wood
3be0ae6e2c Merge pull request #204 from ethereum/hot_gav
The Big Refactor
2015-11-19 12:20:46 +01:00
chriseth
0cf8d022ae Addmod and mulmod. 2015-11-18 17:12:39 +01:00
chriseth
f4de369bad Merge pull request #218 from chriseth/fix_overwriteMemory
Fix memory overwrite problem for arrays.
2015-11-17 14:46:19 +01:00
chriseth
0c900f9b8a Fix memory overwrite problem for arrays. 2015-11-16 18:32:21 +01:00
chriseth
a35f91816b Fix dynamic indexed event arguments - applies sha3. 2015-11-16 17:09:09 +01:00
Gav Wood
a89fa99994 New vocab. 2015-11-06 13:26:20 +01:00
chriseth
a5c227778d Bugfix: Returning literal strings in tuples. 2015-10-31 23:13:45 +01:00
chriseth
b4f561680a Store docstrings in AST annotations. 2015-10-26 15:24:36 +01:00
chriseth
e3dffb611f File reorganisation. 2015-10-21 00:46:01 +02:00
chriseth
ead0478f26 Fix errors when struct array type is used on its own. 2015-10-16 14:36:30 +02:00
chriseth
029b819489 Wildcards. 2015-10-15 17:38:42 +02:00
chriseth
039b2a764f Destructuring assignments. 2015-10-15 17:38:42 +02:00
chriseth
7ebd536e79 Tuple expressions. 2015-10-15 17:38:42 +02:00
chriseth
7ba42f4707 Merge pull request #130 from LefterisJP/dynamic_array_push
Dynamic array push
2015-10-15 17:37:15 +02:00
Lefteris Karapetsas
a823de2d58 push() for byte arrays also properly implemented 2015-10-15 14:37:11 +02:00
Lefteris Karapetsas
9224c1f712 Working implementation of arraypush
ByteArrayPush() gets a test but is ignored for now, since there are
still some issues with its implementation
2015-10-15 13:54:59 +02:00
Lefteris Karapetsas
a521843f6b Implement Dynamic array push and fix test
Still a work in progress. There is a disturbance in the stack at the
moment and that's why there are some cout statements left for debugging.
2015-10-15 10:52:30 +02:00
Lefteris Karapetsas
763b544822 Add a dynamic array push() test 2015-10-15 10:52:30 +02:00
LianaHus
c3491e4469 errors instead of exceptions
Conflicts:
	libsolidity/CompilerStack.cpp
	libsolidity/NameAndTypeResolver.cpp
	libsolidity/NameAndTypeResolver.h
	libsolidity/TypeChecker.cpp
	test/libsolidity/SolidityNameAndTypeResolution.cpp
2015-10-14 20:37:41 +02:00
chriseth
c54a033bf0 Tests for multi variable declaration. 2015-10-09 16:26:27 +02:00
chriseth
24d04087d2 Resolve binary dependencies properly. 2015-10-07 17:35:07 +02:00
chriseth
68bf6e60c5 Merge pull request #122 from chriseth/anonymousEventsWithFourIndexedParams
Allow four indexed arguments for anynomous events.
2015-10-07 17:01:37 +02:00
chriseth
b6ddde9372 Allow four indexed arguments for anynomous events. 2015-10-07 16:40:54 +02:00
chriseth
0297a213fe Reject ether sent to library. 2015-10-06 22:55:45 +02:00
chriseth
d35a4b849d Merge pull request #117 from chriseth/internalTypesForLibrary
Internal types for library
2015-10-06 18:29:05 +02:00
chriseth
99351aebe0 Compiler version stamp. 2015-10-06 14:20:06 +02:00
chriseth
bf5b387954 Provide access to scoped structs. 2015-10-06 14:20:06 +02:00
chriseth
bc609c55c0 Compute canonical names of types for function signatures. 2015-10-06 14:20:06 +02:00
chriseth
ce25ddfa6a Encode storage items correctly for library calls. 2015-10-06 14:20:06 +02:00
chriseth
d2332769d3 Test for internal types. 2015-10-06 14:19:30 +02:00
chriseth
0950aa99a0 Test long constructor arguments. 2015-10-05 11:09:33 +02:00
chriseth
da408640ca Store small byte arrays and strings in storage in one slot with their
length.
2015-10-02 13:12:23 +02:00
chriseth
6161ec96ff Bugfix in calldata unpacker.
The offset was not specified correctly if memory activity preceded the
unpacker.
2015-10-01 16:50:11 +02:00
LianaHus
c096c3c349 improved the test 2015-09-23 17:31:47 +02:00
LianaHus
9547c4563c fixed-sized arrays as return type
Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
2015-09-23 17:31:37 +02:00
chriseth
efdea76d5e Merge pull request #85 from chriseth/warnings
Support mulitple errors and warnings.
2015-09-23 14:42:54 +02:00
LianaHus
ed76798406 fixed the test 2015-09-22 14:03:09 +02:00
chriseth
34a81fd60e Refactoring: Check types outside of AST and recover from some errors. 2015-09-21 20:03:05 +02:00
LianaHus
e50400082b fixed using string as a type for struct member 2015-09-17 15:15:46 +02:00
LianaHus
e89b8d516b test
Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
2015-09-17 15:15:36 +02:00
LianaHus
279a36b6f8 throw statement implementation 2015-09-16 13:25:32 +02:00
LianaHus
152bc642a6 style fix 2015-09-15 12:10:23 +02:00
LianaHus
dbb36a7a7b fixed rebase 2015-09-15 11:44:04 +02:00
LianaHus
9d44e65932 moved the test
Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
	test/libsolidity/SolidityNameAndTypeResolution.cpp
2015-09-15 11:41:40 +02:00
LianaHus
466f5a4b88 returned test for exceptions in constructor 2015-09-15 11:40:20 +02:00
LianaHus
bc91464131 - changed implementation
- style fixes
2015-09-15 11:40:19 +02:00
LianaHus
7dbff2489f some fixes in tests 2015-09-15 11:40:19 +02:00
LianaHus
e21632555c added compile time check for out of bounds access for ordinary arrays
todo: check for dynamicaly sized arrays

Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
2015-09-15 11:40:14 +02:00
LianaHus
626a57826c test 2015-09-15 11:37:56 +02:00
chriseth
976c380b61 Possibility to call library functions. 2015-09-11 15:21:37 +02:00
chriseth
3fc2561223 Merge pull request #51 from ethereum/revert-25-sol_strings_as_mapping_keys
Revert "added check for string as mapping key for local var."
2015-09-09 16:30:54 +02:00
chriseth
9967ae4038 Stylistic corrections. 2015-09-09 16:15:35 +02:00
chriseth
985eb80695 Fix for constant strings. 2015-09-08 16:51:14 +02:00
chriseth
9fc775269b Revert "added check for string as mapping key for local var." 2015-09-07 22:43:23 +02:00
LianaHus
4c7777128b added check for string as mapping key for local var. 2015-08-24 14:24:10 +02:00
LianaHus
ffcf18406b added test to check string as mapping key 2015-08-24 13:48:20 +02:00
LianaHus
1af8ff0121 add tests for state variables accessors. normal and constant
fixed the issue with accessors for constant state variables
2015-08-21 17:57:57 +02:00
chriseth
e985b285be Move Solidity tests. 2015-08-19 21:54:09 +02:00