From 5362714a63cd27f0b6913ba0a1d2a89b2fc03e07 Mon Sep 17 00:00:00 2001 From: microproofs Date: Thu, 22 Jun 2023 18:04:38 -0400 Subject: [PATCH] chore: update tests --- examples/acceptance_tests/083/lib/tests.ak | 90 +++++++++++----------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/examples/acceptance_tests/083/lib/tests.ak b/examples/acceptance_tests/083/lib/tests.ak index 78c0ed60..50b2dab9 100644 --- a/examples/acceptance_tests/083/lib/tests.ak +++ b/examples/acceptance_tests/083/lib/tests.ak @@ -55,58 +55,58 @@ test dict_test1() { ) } -// test dict_test2() { -// let offer_input_ref = OutputReference(TransactionId("00"), 0) -// let ask_input_ref = OutputReference(TransactionId("00"), 1) -// let pairings = -// [(ask_input_ref, offer_input_ref)] +test dict_test2() { + let offer_input_ref = OutputReference(TransactionId("00"), 0) + let ask_input_ref = OutputReference(TransactionId("00"), 1) + let pairings = + [(ask_input_ref, offer_input_ref)] -// let foo = -// fn(pair: (OutputReference, OutputReference), acc: Dict) { -// let new_pay_map = -// dict.insert( -// acc, -// value.zero(), -// Address(VerificationKeyCredential("00"), None), -// compare_value("", "", _, _), -// ) + let foo = + fn(pair: (OutputReference, OutputReference), acc: Dict) { + let new_pay_map = + dict.insert( + acc, + value.zero(), + Address(VerificationKeyCredential("00"), None), + compare_value("", "", _, _), + ) -// new_pay_map -// } + new_pay_map + } -// let pay_map = list.foldl(pairings, dict.new(), foo) + let pay_map = list.foldl(pairings, dict.new(), foo) -// pay_map == dict.new() -// } + pay_map != dict.new() +} -// test dict_test3() { -// let offer_input_ref = OutputReference(TransactionId("00"), 0) -// let ask_input_ref = OutputReference(TransactionId("00"), 1) -// let pairings = -// [(ask_input_ref, offer_input_ref)] +test dict_test3() { + let offer_input_ref = OutputReference(TransactionId("00"), 0) + let ask_input_ref = OutputReference(TransactionId("00"), 1) + let pairings = + [(ask_input_ref, offer_input_ref)] -// let (ask_map, asize, offer_map, osize) = -// ( -// dict.from_list([(ask_input_ref, transaction.NoDatum)], compare_out_ref), -// 1, -// dict.from_list([(offer_input_ref, transaction.NoDatum)], compare_out_ref), -// 1, -// ) + let (ask_map, asize, offer_map, osize) = + ( + dict.from_list([(ask_input_ref, transaction.NoDatum)], compare_out_ref), + 1, + dict.from_list([(offer_input_ref, transaction.NoDatum)], compare_out_ref), + 1, + ) -// let foo = -// fn(pair: (OutputReference, OutputReference), acc: Dict) { -// let new_pay_map = -// dict.insert( -// acc, -// value.zero(), -// Address(VerificationKeyCredential("00"), None), -// compare_value("", "", _, _), -// ) + let foo = + fn(pair: (OutputReference, OutputReference), acc: Dict) { + let new_pay_map = + dict.insert( + acc, + value.zero(), + Address(VerificationKeyCredential("00"), None), + compare_value("", "", _, _), + ) -// new_pay_map -// } + new_pay_map + } -// let pay_map = list.foldl(pairings, dict.new(), foo) + let pay_map = list.foldl(pairings, dict.new(), foo) -// pay_map == dict.new() -// } + pay_map != dict.new() +}