Skip to content

Commit

Permalink
test(zencode): 🧪 update deprecated statements in test
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-cristino committed Oct 25, 2023
1 parent 0d3abaa commit 0474cd4
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 39 deletions.
4 changes: 2 additions & 2 deletions test/testgen_sign_verify_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ EOF
Scenario %%ALGOSIGN%%
Given I am known as 'Carl'
When I create the %%ALGOSIGN%% key
and I copy the '%%ALGOSIGN%%' in 'keyring' to '%%ALGOSIGN%% before'
and I copy the '%%ALGOSIGN%%' from 'keyring' to '%%ALGOSIGN%% before'
and I create the %%ALGOSIGN%% public key
and I copy the '%%ALGOSIGN%%' in 'keyring' to '%%ALGOSIGN%% after'
and I copy the '%%ALGOSIGN%%' from 'keyring' to '%%ALGOSIGN%% after'
and I verify '%%ALGOSIGN%% before' is equal to '%%ALGOSIGN%% after'
Then print '%%ALGOSIGN%% before' as 'hex'
and print '%%ALGOSIGN%% after' as 'hex'
Expand Down
10 changes: 5 additions & 5 deletions test/zencode/array.bats
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ EOF
Given I have a 'string array' named 'array'
When I create the size of 'array'
and I create the copy of element 'size' in array 'array'
and I create the copy of element 'size' from array 'array'
Then print the 'copy'
EOF
Expand Down Expand Up @@ -935,11 +935,11 @@ Given I have a 'string array' named 'smallarray'
Given I have a 'string dictionary' named 'smalldict'
Given I have a 'ethereum signature array' named 'smallSignatures'
When I create the copy of last element in 'smallarray'
When I create the copy of last element from 'smallarray'
and I rename 'copy_of_last_element' to 'last array'
When I create the copy of last element in 'smalldict'
When I create the copy of last element from 'smalldict'
and I rename 'copy_of_last_element' to 'last dict'
When I create the copy of last element in 'smallSignatures'
When I create the copy of last element from 'smallSignatures'
and I rename 'copy_of_last_element' to 'last signature'
Then print the 'last array'
Expand Down Expand Up @@ -1014,7 +1014,7 @@ EOF
cat << EOF | zexe copy_from_schema_array.zen copy_from_schema_array.data
Scenario 'ethereum': copy element
Given I have a 'ethereum address signature pair array' named 'addresses_signatures'
When I create the copy of element '1' in array 'addresses_signatures'
When I create the copy of element '1' from array 'addresses_signatures'
Then print the 'copy'
EOF
save_output 'copy_from_schema_array.json'
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/bbs_sha.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ EOF
Scenario bbs
Given I am known as 'Carl'
When I create the bbs key
and I copy the 'bbs' in 'keyring' to 'bbs before'
and I copy the 'bbs' from 'keyring' to 'bbs before'
and I create the bbs public key
and I copy the 'bbs' in 'keyring' to 'bbs after'
and I copy the 'bbs' from 'keyring' to 'bbs after'
and I verify 'bbs before' is equal to 'bbs after'
Then print 'bbs before' as 'hex'
and print 'bbs after' as 'hex'
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/bbs_shake.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ EOF
Scenario bbs
Given I am known as 'Carl'
When I create the bbs key
and I copy the 'bbs' in 'keyring' to 'bbs before'
and I copy the 'bbs' from 'keyring' to 'bbs before'
and I create the bbs public key
and I copy the 'bbs' in 'keyring' to 'bbs after'
and I copy the 'bbs' from 'keyring' to 'bbs after'
and I verify 'bbs before' is equal to 'bbs after'
Then print 'bbs before' as 'hex'
and print 'bbs after' as 'hex'
Expand Down
9 changes: 5 additions & 4 deletions test/zencode/cookbook_dictionaries.bats
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,11 @@ And I rename the 'copy' to 'InitialAmount<<TransactionAmountsA'
When I create the copy of object named by 'objectToBeCopied' from dictionary 'TransactionAmountsA'
And I rename the 'copy' to 'LaterAmount<<TransactionAmountsA'
# And you can also copy an element of a dictionary, that is nested
# into another dictionary, to the root level:
When I create the copy of 'Buyer' in 'Information' in 'TransactionsBatchA'
and I rename the 'copy' to 'Buyer<<Information<<TransactionsBatchA'
# PICKUP
# And you can also pickup an element of a dictionary, that is nested
# into another dictionaries, to the root level:
When I pickup from path 'TransactionsBatchA.Information.Buyer'
and I rename the 'Buyer' to 'Buyer<<Information<<TransactionsBatchA'
# MOVE in Dictionary
# We can use the "move" statement to add an element to a dictionary, as we would do with an array
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/cookbook_when.bats
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ When I copy 'myFirstArray' to 'copyOfMyFirstArray'
# You can copy a certain element from an array, to a new object named "copy", with the
# same encoding of the array, in the root level of the data.
# We are immeediately renaming the outout for your convenience.
When I create the copy of element '3' in array 'myFourthArray'
When I create the copy of element '3' from array 'myFourthArray'
and I rename the 'copy' to 'copyOfElement3OfmyFourthArray'
# SPLIT (leftmost, rightmost)
Expand Down Expand Up @@ -525,7 +525,7 @@ When I create the variance of elements in array 'mySecondNumberArray'
# COPY ELEMENT
# This statement creates a an object named "copy" containing
# the given element of the array
When I create the copy of element '2' in array 'mySecondNumberArray'
When I create the copy of element '2' from array 'mySecondNumberArray'
# REMOVE
# The "remove" statement does the opposite of the one above:
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/dictionary.bats
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ When I create the copy of 'dataTime1' from dictionary 'nested'
and I rename 'copy' to 'dataTime1'
and I create the copy of 'Currency' from dictionary 'dataTime1'
and I rename the 'copy' to 'first method'
When I create the copy of 'Currency' in 'dataTime1' in 'nested'
and I rename the 'copy' to 'second method'
When I pickup from path 'nested.dataTime1.Currency'
and I rename the 'Currency' to 'second method'
Then print the 'first method'
and print the 'second method'
EOF
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/ecdh.bats
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ EOF
Scenario ecdh
Given I am known as 'Carl'
When I create the ecdh key
and I copy the 'ecdh' in 'keyring' to 'ecdh before'
and I copy the 'ecdh' from 'keyring' to 'ecdh before'
and I create the ecdh public key
and I copy the 'ecdh' in 'keyring' to 'ecdh after'
and I copy the 'ecdh' from 'keyring' to 'ecdh after'
and I verify 'ecdh before' is equal to 'ecdh after'
Then print 'ecdh before' as 'hex'
and print 'ecdh after' as 'hex'
Expand Down
16 changes: 8 additions & 8 deletions test/zencode/ethereum.bats
Original file line number Diff line number Diff line change
Expand Up @@ -510,19 +510,19 @@ given I have a 'string' named 'numcid'
given I have a 'integer' named 'bigcid'
When I create the signed ethereum transaction for chain 'fabt'
When I copy the 'v' in 'ethereum_transaction' to 'v0'
When I copy the 'v' from 'ethereum_transaction' to 'v0'
When I remove 'signed ethereum transaction'
When I create the signed ethereum transaction for chain 'strcid'
When I copy the 'v' in 'ethereum_transaction' to 'v1'
When I copy the 'v' from 'ethereum_transaction' to 'v1'
When I remove 'signed ethereum transaction'
When I create the signed ethereum transaction for chain '80'
When I copy the 'v' in 'ethereum_transaction' to 'v2'
When I copy the 'v' from 'ethereum_transaction' to 'v2'
When I remove 'signed ethereum transaction'
When I create the signed ethereum transaction for chain 'numcid'
When I copy the 'v' in 'ethereum_transaction' to 'v3'
When I copy the 'v' from 'ethereum_transaction' to 'v3'
When I remove 'signed ethereum transaction'
When I create the signed ethereum transaction for chain 'bigcid'
When I copy the 'v' in 'ethereum_transaction' to 'v4'
When I copy the 'v' from 'ethereum_transaction' to 'v4'
When I remove 'signed ethereum transaction'
then print the 'v0' as 'hex'
Expand Down Expand Up @@ -874,11 +874,11 @@ Given I have a 'hex' named 'encoded data'
Given I have a 'string array' named 'typeSpec'
When I create the ethereum abi decoding of 'encoded data' using 'typeSpec'
When I create the copy of element '1' in array 'ethereum abi decoding'
When I create the copy of element '1' from array 'ethereum abi decoding'
When I rename 'copy' to 'request_id'
When I create the copy of element '2' in array 'ethereum abi decoding'
When I create the copy of element '2' from array 'ethereum abi decoding'
When I rename 'copy' to 'data'
When I create the copy of element '3' in array 'ethereum abi decoding'
When I create the copy of element '3' from array 'ethereum abi decoding'
When I rename 'copy' to 'dao_vote_id'
Then print the 'request_id' as 'integer'
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/generic_bbs.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ EOF
Scenario bbs
Given I am known as 'Carl'
When I create the bbs key
and I copy the 'bbs' in 'keyring' to 'bbs before'
and I copy the 'bbs' from 'keyring' to 'bbs before'
and I create the bbs public key
and I copy the 'bbs' in 'keyring' to 'bbs after'
and I copy the 'bbs' from 'keyring' to 'bbs after'
and I verify 'bbs before' is equal to 'bbs after'
Then print 'bbs before' as 'hex'
and print 'bbs after' as 'hex'
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/generic_dilithium.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ EOF
Scenario qp
Given I am known as 'Carl'
When I create the dilithium key
and I copy the 'dilithium' in 'keyring' to 'dilithium before'
and I copy the 'dilithium' from 'keyring' to 'dilithium before'
and I create the dilithium public key
and I copy the 'dilithium' in 'keyring' to 'dilithium after'
and I copy the 'dilithium' from 'keyring' to 'dilithium after'
and I verify 'dilithium before' is equal to 'dilithium after'
Then print 'dilithium before' as 'hex'
and print 'dilithium after' as 'hex'
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/generic_ecdh.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ EOF
Scenario ecdh
Given I am known as 'Carl'
When I create the ecdh key
and I copy the 'ecdh' in 'keyring' to 'ecdh before'
and I copy the 'ecdh' from 'keyring' to 'ecdh before'
and I create the ecdh public key
and I copy the 'ecdh' in 'keyring' to 'ecdh after'
and I copy the 'ecdh' from 'keyring' to 'ecdh after'
and I verify 'ecdh before' is equal to 'ecdh after'
Then print 'ecdh before' as 'hex'
and print 'ecdh after' as 'hex'
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/generic_eddsa.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ EOF
Scenario eddsa
Given I am known as 'Carl'
When I create the eddsa key
and I copy the 'eddsa' in 'keyring' to 'eddsa before'
and I copy the 'eddsa' from 'keyring' to 'eddsa before'
and I create the eddsa public key
and I copy the 'eddsa' in 'keyring' to 'eddsa after'
and I copy the 'eddsa' from 'keyring' to 'eddsa after'
and I verify 'eddsa before' is equal to 'eddsa after'
Then print 'eddsa before' as 'hex'
and print 'eddsa after' as 'hex'
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/generic_schnorr.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ EOF
Scenario schnorr
Given I am known as 'Carl'
When I create the schnorr key
and I copy the 'schnorr' in 'keyring' to 'schnorr before'
and I copy the 'schnorr' from 'keyring' to 'schnorr before'
and I create the schnorr public key
and I copy the 'schnorr' in 'keyring' to 'schnorr after'
and I copy the 'schnorr' from 'keyring' to 'schnorr after'
and I verify 'schnorr before' is equal to 'schnorr after'
Then print 'schnorr before' as 'hex'
and print 'schnorr after' as 'hex'
Expand Down

0 comments on commit 0474cd4

Please sign in to comment.