Skip to content

Commit

Permalink
test(zerncode): 🧪 fix some outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-cristino committed Dec 1, 2023
1 parent 1ab1ab7 commit 7c4c470
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/zencode/dictionary.bats
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ When I copy contents of 'blockchains' in 'TransactionsBatchA'
Then print 'TransactionsBatchA'
EOF
save_output 'copy_contents_in.json'
assert_output '{"TransactionsBatchA":{"ABC-Transactions1Data":{"PricePerKG":"100","ProductPurchasePrice":"50","TransactionValue":"1500","TransferredProductAmount":"15","UndeliveredProductAmount":"7","timestamp":"1.597573e+09"},"ABC-Transactions2Data":{"PricePerKG":"80","TransactionValue":"1600","TransferredProductAmount":"20","timestamp":"1.597573e+09"},"ABC-Transactions3Data":{"PricePerKG":"70","TransactionValue":"700","TransferredProductAmount":"10","timestamp":"1.597573e+09"},"Information":{"Buyer":"John Doe","Metadata":"TransactionsBatchB6789"},"MetaData":"This var is Not a Table","b1":{"endpoint":"http://pesce.com/","last-transaction":"123"},"b2":{"endpoint":"http://fresco.com/","last-transaction":"234"},"number":1234}}'
assert_output '{"TransactionsBatchA":{"ABC-Transactions1Data":{"PricePerKG":"100","ProductPurchasePrice":"50","TransactionValue":"1500","TransferredProductAmount":"15","UndeliveredProductAmount":"7","timestamp":"1.597573e+09"},"ABC-Transactions2Data":{"PricePerKG":"80","TransactionValue":"1600","TransferredProductAmount":"20","timestamp":"1.597573e+09"},"ABC-Transactions3Data":{"PricePerKG":"70","TransactionValue":"700","TransferredProductAmount":"10","timestamp":"1.597573e+09"},"Information":{"Buyer":"John Doe","Metadata":"TransactionsBatchB6789"},"MetaData":"This var is Not a Table","b1":{"endpoint":"http://pesce.com/","last-transaction":"123"},"b2":{"endpoint":"http://fresco.com/","last-transaction":"234"},"number":"1234"}}'
}

@test "Dictionary named by" {
Expand Down
4 changes: 2 additions & 2 deletions test/zencode/output.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ SUBDOC=output
Given nothing
When I create the array of '64' random numbers modulo '100'
and I create the aggregation of array 'array'
Then print the 'array' as 'number'
and print the 'aggregation' as 'number'
Then print the 'array'
and print the 'aggregation'
EOF
save_output 'random_array.out'
assert_output '{"aggregation":"3174","array":["37","87","51","22","91","18","70","7","58","38","0","11","92","29","86","46","72","69","10","79","98","83","77","98","27","12","84","6","66","47","75","59","12","38","17","45","79","44","55","93","9","14","19","20","53","86","74","17","39","20","52","50","1","37","53","28","78","53","87","49","32","86","54","75"]}'
Expand Down
2 changes: 1 addition & 1 deletion test/zencode/then.bats
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,5 @@ EOF
Then print the 'b64' as 'number'
EOF
run $ZENROOM_EXECUTABLE -z -a float_from_base64_fail.data float_from_base64_fail.zen
assert_line '[W] Could not read the float number'
assert_line --partial 'Could not read the float number'
}

0 comments on commit 7c4c470

Please sign in to comment.