Fixed a type error and test, definitely WIP
This commit is contained in:
parent
2d3e6ab6e0
commit
5455d0fcd7
@ -383,7 +383,7 @@ do_decode_args(As) ->
|
||||
Das = [ do_decode_arg(A) || A <- As ],
|
||||
[$(,lists:join(", ", Das),$)].
|
||||
|
||||
do_decode_arg(#{<<"type">> := [T]}) -> do_decode_type(T).
|
||||
do_decode_arg(#{<<"type">> := T}) -> do_decode_type(T).
|
||||
|
||||
do_decode_types(Ets) ->
|
||||
[ do_decode_type(Et) || Et <- Ets ].
|
||||
|
@ -24,7 +24,7 @@ test_cases(1) ->
|
||||
[#{<<"name">> => <<"a">>,
|
||||
<<"arguments">> =>
|
||||
[#{<<"name">> => <<"i">>,
|
||||
<<"type">> => [<<"int">>]}],
|
||||
<<"type">> => <<"int">>}],
|
||||
<<"returns">> => <<"int">>,
|
||||
<<"stateful">> => false}]}},
|
||||
DecACI = <<"contract C =\n"
|
||||
@ -44,7 +44,7 @@ test_cases(2) ->
|
||||
<<"functions">> =>
|
||||
[#{<<"arguments">> =>
|
||||
[#{<<"name">> => <<"i">>,
|
||||
<<"type">> => [<<"int">>]}],
|
||||
<<"type">> => <<"int">>}],
|
||||
<<"name">> => <<"a">>,
|
||||
<<"returns">> => <<"int">>,
|
||||
<<"stateful">> => false}]}},
|
||||
@ -60,7 +60,7 @@ test_cases(3) ->
|
||||
[#{<<"arguments">> =>
|
||||
[#{<<"name">> => <<"i">>,
|
||||
<<"type">> =>
|
||||
[#{<<"C.bert">> => [<<"string">>]}]}],
|
||||
#{<<"C.bert">> => [<<"string">>]}}],
|
||||
<<"name">> => <<"a">>,<<"returns">> => <<"int">>,
|
||||
<<"stateful">> => false}],
|
||||
<<"name">> => <<"C">>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user