From 1a6a6825849f4c648437ad3d8b16733744444825 Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Mon, 27 Jan 2020 11:36:51 +0100 Subject: [PATCH 1/2] fix bad copy paste ? --- src/bin/cli.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/cli.ml b/src/bin/cli.ml index edb571cd0..33e276b97 100644 --- a/src/bin/cli.ml +++ b/src/bin/cli.ml @@ -285,7 +285,7 @@ let compile_storage = let%bind simplified_param = Compile.Of_source.compile_expression v_syntax expression in let%bind (typed_param,_) = Compile.Of_simplified.compile_expression ~env ~state simplified_param in let%bind mini_c_param = Compile.Of_typed.compile_expression typed_param in - let%bind compiled_param = Compile.Of_mini_c.compile_expression mini_c_param in + let%bind compiled_param = Compile.Of_mini_c.aggregate_and_compile_expression mini_c_prg mini_c_param in let%bind () = Compile.Of_typed.assert_equal_contract_type Check_storage entry_point typed_prg typed_param in let%bind () = Compile.Of_michelson.assert_equal_contract_type Check_storage michelson_prg compiled_param in let%bind options = Run.make_dry_run_options {predecessor_timestamp ; amount ; sender ; source } in From 088c5560c4c89b845865e6ea2fd6939627b0e576 Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Mon, 27 Jan 2020 11:42:32 +0100 Subject: [PATCH 2/2] test for compile-storage --- src/bin/expect_tests/contract_tests.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/expect_tests/contract_tests.ml b/src/bin/expect_tests/contract_tests.ml index 443102d80..66a9b140b 100644 --- a/src/bin/expect_tests/contract_tests.ml +++ b/src/bin/expect_tests/contract_tests.ml @@ -1037,4 +1037,9 @@ let%expect_test _ = * Visit our documentation: https://ligolang.org/docs/intro/what-and-why/ * Ask a question on our Discord: https://discord.gg/9rhYaEt * Open a gitlab issue: https://gitlab.com/ligolang/ligo/issues/new - * Check the changelog by running 'ligo changelog' |}] \ No newline at end of file + * Check the changelog by running 'ligo changelog' |}] + +let%expect_test _ = + run_ligo_good [ "compile-storage" ; contract "big_map.ligo" ; "main" ; "(big_map1,unit)" ] ; + [%expect {| + (Pair { Elt 23 0 ; Elt 42 0 } Unit) |}] \ No newline at end of file