Revision 6e3dec6dfffaf1020282dabfa98c45ab1b66d51a authored by Diane Gallois-Wong on 14 March 2024, 16:53:36 UTC, committed by Diane Gallois-Wong on 14 March 2024, 17:02:06 UTC
when the injection returns an unexpected error, but immediately fails with that error
1 parent a0a9801
carn_and_cdrn.tz
# Same as ../opcodes/comb-get.tz but using the CAR n and CDR n macros instead of GET
parameter (pair nat nat nat unit);
storage unit;
code {
CAR ;
# Checking the first element
DUP ; CAR ;
PUSH nat 1 ; ASSERT_CMPEQ ;
DUP ; CAR 0 ;
PUSH nat 1 ; ASSERT_CMPEQ ;
# Checking the second element
DUP ; CAR 1 ;
PUSH nat 4 ; ASSERT_CMPEQ ;
# Checking the third element
DUP ; CAR 2 ;
PUSH nat 2 ; ASSERT_CMPEQ ;
# Checking the last (fourth) element
DUP ; CDR 3 ;
UNIT ; ASSERT_CMPEQ ;
DROP ; UNIT ; NIL operation ; PAIR
}
Computing file changes ...