Update tests for entrypoints

This commit is contained in:
Ulf Norell
2019-06-27 14:16:33 +02:00
parent 85408a12a2
commit 6a59e455ce
51 changed files with 465 additions and 446 deletions
+11 -10
View File
@@ -1,16 +1,17 @@
contract NameClash =
function double_proto : () => int
function double_proto : () => int
entrypoint double_proto : () => int
entrypoint double_proto : () => int
function proto_and_def : int => int
function proto_and_def(n) = n + 1
entrypoint proto_and_def : int => int
entrypoint proto_and_def(n) = n + 1
function double_def(x) = x
function double_def(y) = 0
entrypoint double_def(x) = x
entrypoint double_def(y) = 0
// abort, put and state are builtin
function abort() : int = 0
function put(x) = x
function state(x, y) = x + y
// abort, require, put and state are builtin
entrypoint abort() : int = 0
entrypoint require(b, err) = if(b) abort(err)
entrypoint put(x) = x
entrypoint state(x, y) = x + y