fix warning; fix error in tests
This commit is contained in:
parent
7f94d49243
commit
3c6af09b21
@ -10,5 +10,5 @@
|
|||||||
(preprocess
|
(preprocess
|
||||||
(pps simple-utils.ppx_let_generalized)
|
(pps simple-utils.ppx_let_generalized)
|
||||||
)
|
)
|
||||||
(flags (:standard -open Simple_utils ))
|
(flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils ))
|
||||||
)
|
)
|
||||||
|
@ -70,13 +70,13 @@ let cards_ez owner n =
|
|||||||
@@ List.range n
|
@@ List.range n
|
||||||
|
|
||||||
let (first_owner , first_contract) =
|
let (first_owner , first_contract) =
|
||||||
let open Tezos_utils.Memory_proto_alpha in
|
let open Proto_alpha_utils.Memory_proto_alpha in
|
||||||
let id = List.nth dummy_environment.identities 0 in
|
let id = List.nth dummy_environment.identities 0 in
|
||||||
let kt = id.implicit_contract in
|
let kt = id.implicit_contract in
|
||||||
Alpha_context.Contract.to_b58check kt , kt
|
Alpha_context.Contract.to_b58check kt , kt
|
||||||
|
|
||||||
let second_owner =
|
let second_owner =
|
||||||
let open Tezos_utils.Memory_proto_alpha in
|
let open Proto_alpha_utils.Memory_proto_alpha in
|
||||||
let id = List.nth dummy_environment.identities 1 in
|
let id = List.nth dummy_environment.identities 1 in
|
||||||
let kt = id.implicit_contract in
|
let kt = id.implicit_contract in
|
||||||
Alpha_context.Contract.to_b58check kt
|
Alpha_context.Contract.to_b58check kt
|
||||||
@ -112,13 +112,13 @@ let buy () =
|
|||||||
let%bind amount =
|
let%bind amount =
|
||||||
trace_option (simple_error "getting amount for run") @@
|
trace_option (simple_error "getting amount for run") @@
|
||||||
Memory_proto_alpha.Alpha_context.Tez.of_mutez @@ Int64.of_int 10000000000 in
|
Memory_proto_alpha.Alpha_context.Tez.of_mutez @@ Int64.of_int 10000000000 in
|
||||||
let options = Memory_proto_alpha.make_options ~amount () in
|
let options = Proto_alpha_utils.Memory_proto_alpha.make_options ~amount () in
|
||||||
expect_eq_n_pos_small ~options program "buy_single" make_input make_expected in
|
expect_eq_n_pos_small ~options program "buy_single" make_input make_expected in
|
||||||
let%bind () =
|
let%bind () =
|
||||||
let%bind amount =
|
let%bind amount =
|
||||||
trace_option (simple_error "getting amount for run") @@
|
trace_option (simple_error "getting amount for run") @@
|
||||||
Memory_proto_alpha.Alpha_context.Tez.of_mutez @@ Int64.of_int 0 in
|
Memory_proto_alpha.Alpha_context.Tez.of_mutez @@ Int64.of_int 0 in
|
||||||
let options = Memory_proto_alpha.make_options ~amount () in
|
let options = Proto_alpha_utils.Memory_proto_alpha.make_options ~amount () in
|
||||||
trace_strong (simple_error "could buy without money") @@
|
trace_strong (simple_error "could buy without money") @@
|
||||||
Assert.assert_fail
|
Assert.assert_fail
|
||||||
@@ expect_eq_n_pos_small ~options program "buy_single" make_input make_expected in
|
@@ expect_eq_n_pos_small ~options program "buy_single" make_input make_expected in
|
||||||
@ -151,13 +151,13 @@ let dispatch_buy () =
|
|||||||
let%bind amount =
|
let%bind amount =
|
||||||
trace_option (simple_error "getting amount for run") @@
|
trace_option (simple_error "getting amount for run") @@
|
||||||
Memory_proto_alpha.Alpha_context.Tez.of_mutez @@ Int64.of_int 10000000000 in
|
Memory_proto_alpha.Alpha_context.Tez.of_mutez @@ Int64.of_int 10000000000 in
|
||||||
let options = Memory_proto_alpha.make_options ~amount () in
|
let options = Proto_alpha_utils.Memory_proto_alpha.make_options ~amount () in
|
||||||
expect_eq_n_pos_small ~options program "main" make_input make_expected in
|
expect_eq_n_pos_small ~options program "main" make_input make_expected in
|
||||||
let%bind () =
|
let%bind () =
|
||||||
let%bind amount =
|
let%bind amount =
|
||||||
trace_option (simple_error "getting amount for run") @@
|
trace_option (simple_error "getting amount for run") @@
|
||||||
Memory_proto_alpha.Alpha_context.Tez.of_mutez @@ Int64.of_int 0 in
|
Memory_proto_alpha.Alpha_context.Tez.of_mutez @@ Int64.of_int 0 in
|
||||||
let options = Memory_proto_alpha.make_options ~amount () in
|
let options = Proto_alpha_utils.Memory_proto_alpha.make_options ~amount () in
|
||||||
trace_strong (simple_error "could buy without money") @@
|
trace_strong (simple_error "could buy without money") @@
|
||||||
Assert.assert_fail
|
Assert.assert_fail
|
||||||
@@ expect_eq_n_pos_small ~options program "buy_single" make_input make_expected in
|
@@ expect_eq_n_pos_small ~options program "buy_single" make_input make_expected in
|
||||||
@ -190,7 +190,7 @@ let transfer () =
|
|||||||
let%bind () =
|
let%bind () =
|
||||||
let amount = Memory_proto_alpha.Alpha_context.Tez.zero in
|
let amount = Memory_proto_alpha.Alpha_context.Tez.zero in
|
||||||
let payer = first_contract in
|
let payer = first_contract in
|
||||||
let options = Memory_proto_alpha.make_options ~amount ~payer () in
|
let options = Proto_alpha_utils.Memory_proto_alpha.make_options ~amount ~payer () in
|
||||||
expect_eq_n_strict_pos_small ~options program "transfer_single" make_input make_expected in
|
expect_eq_n_strict_pos_small ~options program "transfer_single" make_input make_expected in
|
||||||
ok ()
|
ok ()
|
||||||
in
|
in
|
||||||
@ -220,7 +220,7 @@ let sell () =
|
|||||||
let%bind () =
|
let%bind () =
|
||||||
let amount = Memory_proto_alpha.Alpha_context.Tez.zero in
|
let amount = Memory_proto_alpha.Alpha_context.Tez.zero in
|
||||||
let payer = first_contract in
|
let payer = first_contract in
|
||||||
let options = Memory_proto_alpha.make_options ~amount ~payer () in
|
let options = Proto_alpha_utils.Memory_proto_alpha.make_options ~amount ~payer () in
|
||||||
expect_n_strict_pos_small ~options program "sell_single" make_input make_expecter in
|
expect_n_strict_pos_small ~options program "sell_single" make_input make_expecter in
|
||||||
ok ()
|
ok ()
|
||||||
in
|
in
|
||||||
|
@ -2,12 +2,11 @@
|
|||||||
(name test)
|
(name test)
|
||||||
(libraries
|
(libraries
|
||||||
simple-utils
|
simple-utils
|
||||||
tezos-utils
|
|
||||||
ligo
|
ligo
|
||||||
alcotest
|
alcotest
|
||||||
)
|
)
|
||||||
(preprocess
|
(preprocess
|
||||||
(pps simple-utils.ppx_let_generalized)
|
(pps simple-utils.ppx_let_generalized)
|
||||||
)
|
)
|
||||||
(flags (:standard -w +1..62-4-9-44-40-42-48@39@33 -open Tezos_utils ))
|
(flags (:standard -w +1..62-4-9-44-40-42-48@39@33 -open Simple_utils ))
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user