Tests: a few more michelson tests

This commit is contained in:
Benjamin Canou 2018-06-29 15:37:16 +02:00
parent e81b045d42
commit ac58132588

View File

@ -212,12 +212,18 @@ assert_storage $contract_dir/exec_concat.tz '"?"' '"test"' '"test_abc"'
# Get current steps to quota
assert_storage $contract_dir/steps_to_quota.tz 111 Unit 399813
# Gas bounds checks
assert_fails $client -l originate contract first_explosion for bootstrap1 \
# Typing gas bounds checks
assert_fails $client originate contract first_explosion for bootstrap1 \
transferring 0 from bootstrap1 \
running '{parameter unit;\
storage unit;\
code{DROP;PUSH nat 0;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;}}' -G 8000
running '{parameter unit;storage unit;code{DROP;PUSH nat 0;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;}}' -G 8000
# Serialization gas bounds checks
assert_success $client run script '{parameter (list int);storage (list (list (list int)));code{CAR;DIP{NIL (list int)};DUP;ITER{DROP;DUP;DIP{CONS}};DROP;DIP{NIL (list (list int))};DUP;ITER{DROP;DUP;DIP{CONS}};DROP;NIL operation;PAIR}}' \
on storage '{}' \
and input '{1;2;3;4;5;6;7;8;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1}'
assert_fails $client run script '{parameter (list int);storage (list (list (list int)));code{CAR;DIP{NIL (list int)};DUP;ITER{DROP;DUP;DIP{CONS}};DROP;DIP{NIL (list (list int))};DUP;ITER{DROP;DUP;DIP{CONS}};DROP;NIL operation;PAIR}}' \
on storage '{}' \
and input '{1;2;3;4;5;6;7;8;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1}'
# Get the current balance of the contract
assert_storage $contract_dir/balance.tz '111' Unit '4000000000000'