Skip to content

Commit

Permalink
update comments in e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangsu committed Nov 9, 2021
1 parent fac68f3 commit 78ed7ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/scripts/e2e_subs/e2e-app-abi-add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ printf '#pragma version 2\nint 1' > "${TEMPDIR}/simple.teal"
PROGRAM=($(${gcmd} clerk compile "${TEMPDIR}/simple.teal"))
APPID=$(${gcmd} app create --creator ${ACCOUNT} --approval-prog ${DIR}/tealprogs/app-abi-add-example.teal --clear-prog ${TEMPDIR}/simple.teal --global-byteslices 0 --global-ints ${GLOBAL_INTS} --local-byteslices 0 --local-ints 0 | grep Created | awk '{ print $6 }')

# Should succeed to opt in with first arg hello
# Should succeed to opt in
${gcmd} app optin --app-id $APPID --from $ACCOUNT

# Write should now succeed
# Call should now succeed
RES=$(${gcmd} app method --method "add(uint64,uint64)uint64" --arg 1 --arg 2 --app-id $APPID --from $ACCOUNT 2>&1 || true)
EXPECTED="method add(uint64,uint64)uint64 output: 3"
if [[ $RES != *"${EXPECTED}"* ]]; then
Expand All @@ -35,5 +35,5 @@ fi
# Delete application should still succeed
${gcmd} app delete --app-id $APPID --from $ACCOUNT

# Clear should still succeed with arbitrary args
# Clear should still succeed
${gcmd} app clear --app-id $APPID --from $ACCOUNT
6 changes: 3 additions & 3 deletions test/scripts/e2e_subs/e2e-app-abi-arg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ printf '#pragma version 2\nint 1' > "${TEMPDIR}/simple.teal"
PROGRAM=($(${gcmd} clerk compile "${TEMPDIR}/simple.teal"))
APPID=$(${gcmd} app create --creator ${ACCOUNT} --approval-prog ${DIR}/tealprogs/app-abi-arg.teal --clear-prog ${TEMPDIR}/simple.teal --global-byteslices 0 --global-ints ${GLOBAL_INTS} --local-byteslices 0 --local-ints 0 | grep Created | awk '{ print $6 }')

# Should succeed to opt in with first arg hello
# Should succeed to opt in with string "optin"
${gcmd} app optin --app-id $APPID --from $ACCOUNT --app-arg 'abi:string:"optin"'

# Write should now succeed
# Call should now succeed
${gcmd} app call --app-id $APPID --from $ACCOUNT --app-arg 'abi:uint64:0'
${gcmd} app call --app-id $APPID --from $ACCOUNT --app-arg 'abi:byte[3]:"AAEC"'
${gcmd} app call --app-id $APPID --from $ACCOUNT --app-arg 'abi:(string,(byte[3],ufixed64x3)):["uwu",["AAEC",12.34]]'
Expand All @@ -33,5 +33,5 @@ ${gcmd} app call --app-id $APPID --from $ACCOUNT --app-arg 'abi:(uint64,string,b
# Delete application should still succeed
${gcmd} app delete --app-id $APPID --from $ACCOUNT

# Clear should still succeed with arbitrary args
# Clear should still succeed
${gcmd} app clear --app-id $APPID --from $ACCOUNT

0 comments on commit 78ed7ac

Please sign in to comment.