Add tests
This commit is contained in:
parent
b493852464
commit
70bf1c6201
@ -218,6 +218,7 @@ compilable_contracts() ->
|
|||||||
"using_namespace",
|
"using_namespace",
|
||||||
"assign_patterns",
|
"assign_patterns",
|
||||||
"patterns_guards",
|
"patterns_guards",
|
||||||
|
"pipe_operator",
|
||||||
"test" % Custom general-purpose test file. Keep it last on the list.
|
"test" % Custom general-purpose test file. Keep it last on the list.
|
||||||
].
|
].
|
||||||
|
|
||||||
|
18
test/contracts/pipe_operator.aes
Normal file
18
test/contracts/pipe_operator.aes
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
contract Main =
|
||||||
|
function is_negative(x : int) =
|
||||||
|
if (x < 0)
|
||||||
|
true
|
||||||
|
else
|
||||||
|
false
|
||||||
|
|
||||||
|
function inc_by_one(x : int) = x + 1
|
||||||
|
function inc_by_two(x : int) = x + 2
|
||||||
|
|
||||||
|
type state = bool
|
||||||
|
|
||||||
|
entrypoint init(x : int) = x
|
||||||
|
|> inc_by_one
|
||||||
|
|> inc_by_one
|
||||||
|
|> inc_by_two
|
||||||
|
|> ((x) => x * 5)
|
||||||
|
|> is_negative
|
Loading…
x
Reference in New Issue
Block a user