From 9f9ef74602a52dbd8d5b3f53f871f307262d7045 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 27 Mar 2023 15:32:11 +0200 Subject: [PATCH 1/3] [test_tez_repr.ml]: remove duplicated test --- .../lib_protocol/test/unit/test_tez_repr.ml | 4 ---- .../lib_protocol/test/unit/test_tez_repr.ml | 4 ---- src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml | 4 ---- 3 files changed, 12 deletions(-) diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_tez_repr.ml b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_tez_repr.ml index 6d94465845d6..0173290bb65f 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_tez_repr.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_tez_repr.ml @@ -175,10 +175,6 @@ let tests = tztest "Tez.div: basic case" `Quick Test_tez_repr.test_div; tztest "Tez.div: division by zero" `Quick Test_tez_repr.test_div_by_zero; tztest "Tez.to_mutez: basic assertion" `Quick Test_tez_repr.test_to_mutez; - tztest - "Tez.of_mutez: of non-negative ints" - `Quick - Test_tez_repr.test_of_mutez_non_negative; tztest "Tez.of_mutez: of non-negative ints" `Quick diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tez_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tez_repr.ml index 9367d4a9a088..8a9f65d675d3 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tez_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tez_repr.ml @@ -175,10 +175,6 @@ let tests = tztest "Tez.div: basic case" `Quick Test_tez_repr.test_div; tztest "Tez.div: division by zero" `Quick Test_tez_repr.test_div_by_zero; tztest "Tez.to_mutez: basic assertion" `Quick Test_tez_repr.test_to_mutez; - tztest - "Tez.of_mutez: of non-negative ints" - `Quick - Test_tez_repr.test_of_mutez_non_negative; tztest "Tez.of_mutez: of non-negative ints" `Quick diff --git a/src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml index 9367d4a9a088..8a9f65d675d3 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml @@ -175,10 +175,6 @@ let tests = tztest "Tez.div: basic case" `Quick Test_tez_repr.test_div; tztest "Tez.div: division by zero" `Quick Test_tez_repr.test_div_by_zero; tztest "Tez.to_mutez: basic assertion" `Quick Test_tez_repr.test_to_mutez; - tztest - "Tez.of_mutez: of non-negative ints" - `Quick - Test_tez_repr.test_of_mutez_non_negative; tztest "Tez.of_mutez: of non-negative ints" `Quick -- GitLab From f0e6b3ecadc9ee1663a3620f24da28a36f15d788 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 27 Mar 2023 15:33:33 +0200 Subject: [PATCH 2/3] Tests: deduplicate test titles --- src/lib_benchmark/test/test_costlang.ml | 4 ++-- .../test/chunked_byte_vector_tests.ml | 2 +- src/lib_proxy/test/test_fuzzing_light.ml | 1 - .../test/integration/consensus/test_delegation.ml | 4 ++-- .../test/integration/michelson/test_interpretation.ml | 2 +- .../test/integration/michelson/test_ticket_balance.ml | 5 ++++- .../test/integration/michelson/test_typechecking.ml | 2 +- .../test/integration/operations/test_tx_rollup.ml | 3 +-- .../lib_protocol/test/pbt/test_carbonated_map.ml | 2 +- .../lib_protocol/test/unit/test_destination_repr.ml | 2 +- .../lib_protocol/test/unit/test_gas_monad.ml | 7 +++++-- .../lib_protocol/test/unit/test_tx_rollup_l2.ml | 9 +++++---- .../test/integration/consensus/test_delegation.ml | 4 ++-- .../test/integration/michelson/test_interpretation.ml | 2 +- .../test/integration/michelson/test_ticket_balance.ml | 5 ++++- .../test/integration/operations/test_sc_rollup.ml | 2 +- .../lib_protocol/test/pbt/test_carbonated_map.ml | 2 +- .../lib_protocol/test/unit/test_destination_repr.ml | 6 +++--- .../lib_protocol/test/unit/test_gas_monad.ml | 7 +++++-- .../lib_protocol/test/unit/test_tx_rollup_l2.ml | 9 +++++---- .../test/integration/consensus/test_delegation.ml | 4 ++-- .../test/integration/michelson/test_interpretation.ml | 2 +- .../test/integration/michelson/test_ticket_balance.ml | 5 ++++- .../test/integration/operations/test_sc_rollup.ml | 2 +- .../lib_protocol/test/pbt/test_carbonated_map.ml | 2 +- .../lib_protocol/test/unit/test_destination_repr.ml | 2 +- src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml | 7 +++++-- 27 files changed, 61 insertions(+), 43 deletions(-) diff --git a/src/lib_benchmark/test/test_costlang.ml b/src/lib_benchmark/test/test_costlang.ml index b4d9c34e809e..bbab7ded3ba2 100644 --- a/src/lib_benchmark/test/test_costlang.ml +++ b/src/lib_benchmark/test/test_costlang.ml @@ -145,8 +145,8 @@ let tests = Test.tztest_assert "pp1" `Quick test_pp_1; Test.tztest_assert "pp2" `Quick test_pp_2; Test.tztest_assert "pp3" `Quick test_pp_3; - Test.tztest_assert "eval" `Quick test_eval1; - Test.tztest_assert "eval" `Quick test_eval2; + Test.tztest_assert "eval1" `Quick test_eval1; + Test.tztest_assert "eval2" `Quick test_eval2; Test.tztest_assert "eval_to_linear_comb" `Quick test_eval_to_lincomb; Test.tztest_assert "eval_to_linear_comb_fail" diff --git a/src/lib_lazy_containers/test/chunked_byte_vector_tests.ml b/src/lib_lazy_containers/test/chunked_byte_vector_tests.ml index a6c240324794..fe052b6e0572 100644 --- a/src/lib_lazy_containers/test/chunked_byte_vector_tests.ml +++ b/src/lib_lazy_containers/test/chunked_byte_vector_tests.ml @@ -238,7 +238,7 @@ module Tests (CBV : S) = struct check int64 name 1L (Chunk.num_needed (Int64.pred Chunk.size)) ; check int64 name 2L (Chunk.num_needed (Int64.succ Chunk.size)) in - ("Chunk: num_pages edge case", `Quick, test) + (to_name "Chunk: num_pages edge case", `Quick, test) let all_tests = internal_num_pages_edge_case diff --git a/src/lib_proxy/test/test_fuzzing_light.ml b/src/lib_proxy/test/test_fuzzing_light.ml index 53f3b4db93ef..25774a48d8ab 100644 --- a/src/lib_proxy/test/test_fuzzing_light.ml +++ b/src/lib_proxy/test/test_fuzzing_light.ml @@ -248,7 +248,6 @@ let () = (0.6, 4, 1, true); (0.6, 5, 1, true); (0.5, 2, 2, true); - (0.01, 1, 2, true); ] ); ("Consensus consistency", qcheck_wrap [test_consensus_spec]); ] diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_delegation.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_delegation.ml index c032c40e1ce7..7ce61e494700 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_delegation.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_delegation.ml @@ -354,12 +354,12 @@ let tests_bootstrap_contracts = `Quick (bootstrap_delegate_cannot_be_removed ~fee:max_tez); Tztest.tztest - "contracts not registered as delegate can remove their delegation (small \ + "contracts not registered as delegate can change their delegation (small \ fee)" `Quick (delegate_can_be_changed_from_unregistered_contract ~fee:Tez.one_mutez); Tztest.tztest - "contracts not registered as delegate can remove their delegation (max \ + "contracts not registered as delegate can change their delegation (max \ fee)" `Quick (delegate_can_be_changed_from_unregistered_contract ~fee:max_tez); diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_interpretation.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_interpretation.ml index 9f6a1e07fd8d..ffdbd7e56871 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_interpretation.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_interpretation.ml @@ -421,7 +421,7 @@ let tests = ~param_2:"5" ~expected_storage_str_2:"Left 120"); Tztest.tztest - "test lambda_rec instruction storage" + "test lambda_rec instruction storage apply store" `Quick (test_store_and_reload (path // "contracts/rec_fact_apply_store.tz") diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_ticket_balance.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_ticket_balance.ml index 7ec43b1c12d8..c4478cb32cd5 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_ticket_balance.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_ticket_balance.ml @@ -1698,7 +1698,10 @@ let tests = test_send_tickets_in_big_map; Tztest.tztest "Test modify big-map" `Quick test_modify_big_map; Tztest.tztest "Test send drop" `Quick test_send_tickets_in_big_map_and_drop; - Tztest.tztest "Test send drop" `Quick test_create_contract_with_ticket; + Tztest.tztest + "Test create contract with ticket" + `Quick + test_create_contract_with_ticket; Tztest.tztest "Test join" `Quick test_join_tickets; Tztest.tztest "Test wallet" `Quick test_ticket_wallet; Tztest.tztest "Test ticket storage" `Quick test_ticket_storage; diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_typechecking.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_typechecking.ml index 16be354b0231..667e56cd70c4 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_typechecking.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_typechecking.ml @@ -978,7 +978,7 @@ let tests = `Quick test_parse_contract_data_for_rollup_with_entrypoints; Tztest.tztest - "test parse contract data for rollup with entrypoint" + "test parse contract data for rollup with invalid type" `Quick test_parse_contract_data_for_rollup_with_invalid_type; Tztest.tztest diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/test_tx_rollup.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/test_tx_rollup.ml index 346ab605e951..f9aa90c3b9ac 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/test_tx_rollup.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/test_tx_rollup.ml @@ -5641,8 +5641,7 @@ module Withdraw = struct `Quick test_multiple_withdrawals_multiple_batches; Tztest.tztest - "Test multiple withdrawals from the same batch and from different \ - batches" + "Test deposit, followed by withdrawal, followed by deposit" `Quick test_forge_deposit_withdraw_deposit; ] diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_carbonated_map.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_carbonated_map.ml index 13aa26770ed4..bc574fd09beb 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_carbonated_map.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_carbonated_map.ml @@ -166,7 +166,7 @@ let test_update_replace = (** Test merging when ignoring new overlapping keys. *) let test_merge_overlaps_left = let open Result_syntax in - unit_test "Merge overlap keep existing" @@ fun () -> + unit_test "Merge overlaps left" @@ fun () -> let ctxt = unsafe_new_context () in let* map, ctxt = CM.of_list diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_destination_repr.ml b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_destination_repr.ml index 830251241aec..87f6d6716373 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_destination_repr.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_destination_repr.ml @@ -209,7 +209,7 @@ let tests = tztest "Binary Destination_repr to Contract_repr (null address)" `Quick @@ test_encode_destination_decode_contract null_address; tztest - "Binary Contract_repr to Destination_repr (liquidity baking dex)" + "Binary Destination_repr to Contract_repr (liquidity baking dex)" `Quick @@ test_encode_destination_decode_contract liquidity_baking_dex; tztest diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_gas_monad.ml b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_gas_monad.ml index 1ef3b1b84067..33b47e66c4fb 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_gas_monad.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_gas_monad.ml @@ -202,10 +202,13 @@ let tests = `Quick test_gas_exhaustion_before_error; Tztest.tztest - "Test successful result" + "Test successful result with remaining gas" `Quick test_successful_with_remaining_gas; - Tztest.tztest "Test successful result" `Quick test_successful_with_spare_gas; + Tztest.tztest + "Test successful result with spare gas" + `Quick + test_successful_with_spare_gas; Tztest.tztest "Test inner error" `Quick test_inner_error; Tztest.tztest "Test unlimited" `Quick test_unlimited; Tztest.tztest "Test syntax module" `Quick test_syntax_module; diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_tx_rollup_l2.ml b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_tx_rollup_l2.ml index abb579eb887b..368ce15c3a47 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_tx_rollup_l2.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_tx_rollup_l2.ml @@ -289,10 +289,11 @@ module Test_index (Index : S) = struct let tests = wrap_tztest_tests [ - ("test set and get", test_set_and_get); - ("test associate fresh index", test_associate_fresh_index); - ("test associate same value twice", test_associate_value_twice); - ("test the limit of indexes", test_reach_too_many_l2); + (Index.name ^ ", test set and get", test_set_and_get); + (Index.name ^ ", test associate fresh index", test_associate_fresh_index); + ( Index.name ^ ", test associate same value twice", + test_associate_value_twice ); + (Index.name ^ ", test the limit of indexes", test_reach_too_many_l2); ] end diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_delegation.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_delegation.ml index 527ad98cd70d..0beb7bde67db 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_delegation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_delegation.ml @@ -350,12 +350,12 @@ let tests_bootstrap_contracts = `Quick (bootstrap_delegate_cannot_be_removed ~fee:max_tez); Tztest.tztest - "contracts not registered as delegate can remove their delegation (small \ + "contracts not registered as delegate can change their delegation (small \ fee)" `Quick (delegate_can_be_changed_from_unregistered_contract ~fee:Tez.one_mutez); Tztest.tztest - "contracts not registered as delegate can remove their delegation (max \ + "contracts not registered as delegate can change their delegation (max \ fee)" `Quick (delegate_can_be_changed_from_unregistered_contract ~fee:max_tez); diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_interpretation.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_interpretation.ml index c0bddf058042..388a6c590acd 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_interpretation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_interpretation.ml @@ -425,7 +425,7 @@ let tests = ~param_2:"5" ~expected_storage_str_2:"Left 120"); Tztest.tztest - "test lambda_rec instruction storage" + "test lambda_rec instruction storage apply store" `Quick (test_store_and_reload (path // "contracts/rec_fact_apply_store.tz") diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance.ml index 16981f82e3df..91cab7fa7419 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance.ml @@ -1751,7 +1751,10 @@ let tests = test_send_tickets_in_big_map; Tztest.tztest "Test modify big-map" `Quick test_modify_big_map; Tztest.tztest "Test send drop" `Quick test_send_tickets_in_big_map_and_drop; - Tztest.tztest "Test send drop" `Quick test_create_contract_with_ticket; + Tztest.tztest + "Test create contract with ticket" + `Quick + test_create_contract_with_ticket; Tztest.tztest "Test join" `Quick test_join_tickets; Tztest.tztest "Test wallet" `Quick test_ticket_wallet; Tztest.tztest "Test ticket storage" `Quick test_ticket_storage; diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup.ml index edb20463f550..bf95b64b115a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup.ml @@ -3275,7 +3275,7 @@ let tests = test_offline_staker_does_not_prevent_cementation; Tztest.tztest "win refutation game by forfeit" `Quick test_winner_by_forfeit; Tztest.tztest - "win refutation game by forfeit" + "win refutation game by forfeit with draw" `Quick test_winner_by_forfeit_with_draw; Tztest.tztest diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_carbonated_map.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_carbonated_map.ml index 23fe8dca9309..158b1279ecff 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_carbonated_map.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_carbonated_map.ml @@ -166,7 +166,7 @@ let test_update_replace = (** Test merging when ignoring new overlapping keys. *) let test_merge_overlaps_left = let open Result_syntax in - unit_test "Merge overlap keep existing" @@ fun () -> + unit_test "Merge overlaps left" @@ fun () -> let ctxt = unsafe_new_context () in let* map, ctxt = CM.of_list diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_destination_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_destination_repr.ml index f4cb1a04fcf6..8c82e43a8b12 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_destination_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_destination_repr.ml @@ -208,16 +208,16 @@ let tests = tztest "Binary Destination_repr to Contract_repr (null address)" `Quick @@ test_encode_destination_decode_contract null_address; tztest - "Binary Contract_repr to Destination_repr (liquidity baking dex)" + "Binary Destination_repr to Contract_repr (liquidity baking dex)" `Quick @@ test_encode_destination_decode_contract liquidity_baking_dex; tztest - "Json encoding compatibility Contract_repr to Destination_repr with \ + "Json encoding compatibility Contract_repr to Destination_repr with \ dummy contracts" `Quick @@ test_encoding_json_compat; tztest - "Binary encoding compatibility Contract_repr to Destination_repr with \ + "Binary encoding compatibility Contract_repr to Destination_repr with \ dummy contracts" `Quick @@ test_encoding_json_compat; diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_gas_monad.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_gas_monad.ml index 1ef3b1b84067..33b47e66c4fb 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_gas_monad.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_gas_monad.ml @@ -202,10 +202,13 @@ let tests = `Quick test_gas_exhaustion_before_error; Tztest.tztest - "Test successful result" + "Test successful result with remaining gas" `Quick test_successful_with_remaining_gas; - Tztest.tztest "Test successful result" `Quick test_successful_with_spare_gas; + Tztest.tztest + "Test successful result with spare gas" + `Quick + test_successful_with_spare_gas; Tztest.tztest "Test inner error" `Quick test_inner_error; Tztest.tztest "Test unlimited" `Quick test_unlimited; Tztest.tztest "Test syntax module" `Quick test_syntax_module; diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2.ml index a9ac5e8e606e..22c4c7735641 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2.ml @@ -289,10 +289,11 @@ module Test_index (Index : S) = struct let tests = wrap_tztest_tests [ - ("test set and get", test_set_and_get); - ("test associate fresh index", test_associate_fresh_index); - ("test associate same value twice", test_associate_value_twice); - ("test the limit of indexes", test_reach_too_many_l2); + (Index.name ^ ", test set and get", test_set_and_get); + (Index.name ^ ", test associate fresh index", test_associate_fresh_index); + ( Index.name ^ ", test associate same value twice", + test_associate_value_twice ); + (Index.name ^ ", test the limit of indexes", test_reach_too_many_l2); ] end diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml index 995ff2d40c9d..898aec642f72 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml @@ -350,12 +350,12 @@ let tests_bootstrap_contracts = `Quick (bootstrap_delegate_cannot_be_removed ~fee:max_tez); Tztest.tztest - "contracts not registered as delegate can remove their delegation (small \ + "contracts not registered as delegate can change their delegation (small \ fee)" `Quick (delegate_can_be_changed_from_unregistered_contract ~fee:Tez.one_mutez); Tztest.tztest - "contracts not registered as delegate can remove their delegation (max \ + "contracts not registered as delegate can change their delegation (max \ fee)" `Quick (delegate_can_be_changed_from_unregistered_contract ~fee:max_tez); diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_interpretation.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_interpretation.ml index 8d28d1b12692..82110bd3afdd 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_interpretation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_interpretation.ml @@ -422,7 +422,7 @@ let tests = ~param_2:"5" ~expected_storage_str_2:"Left 120"); Tztest.tztest - "test lambda_rec instruction storage" + "test lambda_rec instruction storage apply store" `Quick (test_store_and_reload (path // "contracts/rec_fact_apply_store.tz") diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance.ml index 2af075e802a8..c8a342b0fa71 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance.ml @@ -1775,7 +1775,10 @@ let tests = test_send_tickets_in_big_map; Tztest.tztest "Test modify big-map" `Quick test_modify_big_map; Tztest.tztest "Test send drop" `Quick test_send_tickets_in_big_map_and_drop; - Tztest.tztest "Test send drop" `Quick test_create_contract_with_ticket; + Tztest.tztest + "Test create contract with ticket" + `Quick + test_create_contract_with_ticket; Tztest.tztest "Test join" `Quick test_join_tickets; Tztest.tztest "Test wallet" `Quick test_ticket_wallet; Tztest.tztest "Test ticket storage" `Quick test_ticket_storage; diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup.ml index 9506db9435c3..3576fabe002b 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup.ml @@ -3535,7 +3535,7 @@ let tests = test_offline_staker_does_not_prevent_cementation; Tztest.tztest "win refutation game by forfeit" `Quick test_winner_by_forfeit; Tztest.tztest - "win refutation game by forfeit" + "win refutation game by forfeit with draw" `Quick test_winner_by_forfeit_with_draw; Tztest.tztest diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.ml b/src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.ml index 46d9ab5ee632..376d8803e518 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.ml @@ -162,7 +162,7 @@ let test_update_replace = (** Test merging when ignoring new overlapping keys. *) let test_merge_overlaps_left = let open Result_syntax in - unit_test "Merge overlap keep existing" @@ fun () -> + unit_test "Merge overlaps left" @@ fun () -> let ctxt = unsafe_new_context () in let* map, ctxt = CM.of_list diff --git a/src/proto_alpha/lib_protocol/test/unit/test_destination_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_destination_repr.ml index f4cb1a04fcf6..b2cd843ba0d3 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_destination_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_destination_repr.ml @@ -208,7 +208,7 @@ let tests = tztest "Binary Destination_repr to Contract_repr (null address)" `Quick @@ test_encode_destination_decode_contract null_address; tztest - "Binary Contract_repr to Destination_repr (liquidity baking dex)" + "Binary Destination_repr to Contract_repr (liquidity baking dex)" `Quick @@ test_encode_destination_decode_contract liquidity_baking_dex; tztest diff --git a/src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml b/src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml index 1ef3b1b84067..33b47e66c4fb 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml @@ -202,10 +202,13 @@ let tests = `Quick test_gas_exhaustion_before_error; Tztest.tztest - "Test successful result" + "Test successful result with remaining gas" `Quick test_successful_with_remaining_gas; - Tztest.tztest "Test successful result" `Quick test_successful_with_spare_gas; + Tztest.tztest + "Test successful result with spare gas" + `Quick + test_successful_with_spare_gas; Tztest.tztest "Test inner error" `Quick test_inner_error; Tztest.tztest "Test unlimited" `Quick test_unlimited; Tztest.tztest "Test syntax module" `Quick test_syntax_module; -- GitLab From 695cfd37658c6e3ba9f054961a80a69bc6b767b8 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 27 Mar 2023 15:33:47 +0200 Subject: [PATCH 3/3] [lib_base/test]: combine tests to deduplicate title The same test is called twice with two different generators. This commit combines the generators so that there is only one test with the same title. --- src/lib_base/test/test_time.ml | 42 +++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/lib_base/test/test_time.ml b/src/lib_base/test/test_time.ml index 9993335c0398..0db352f78c12 100644 --- a/src/lib_base/test/test_time.ml +++ b/src/lib_base/test/test_time.ml @@ -208,26 +208,31 @@ module System = struct ()) let of_protocol_to_protocol_roundtrip_or_outside_rfc3339 = - of_protocol_to_protocol_roundtrip_or_outside_rfc3339_with_gen - Gen.(oneof [Protocol.gen; Protocol.rfc3339_compatible_t_gen]) - - let of_protocol_to_protocol_roundtrip_or_outside_rfc3339_int_sizes_trap = - let interesting_values = - Int64. - [ - max_int; - div max_int 2L; - min_int; - 0xf0_00_00_00_00L; - 0xf0_00_00_00_02L; - 0xf0_00_00_00_10L; - 0xff_ff_f0_00_00_00_10L; - logor 2932890L 0xff_00_00_00_00_00L; - logor 18L 0xff_00_00_00_00_00L; - ] + let gen_interesting_values = + let interesting_values = + Int64. + [ + max_int; + div max_int 2L; + min_int; + 0xf0_00_00_00_00L; + 0xf0_00_00_00_02L; + 0xf0_00_00_00_10L; + 0xff_ff_f0_00_00_00_10L; + logor 2932890L 0xff_00_00_00_00_00L; + logor 18L 0xff_00_00_00_00_00L; + ] + in + Gen.(oneofl (List.map Protocol.of_seconds interesting_values)) in of_protocol_to_protocol_roundtrip_or_outside_rfc3339_with_gen - Gen.(oneofl (List.map Protocol.of_seconds interesting_values)) + Gen.( + oneof + [ + Protocol.gen; + Protocol.rfc3339_compatible_t_gen; + gen_interesting_values; + ]) let rfc_encoding_binary_roundtrip = Test.make @@ -277,7 +282,6 @@ module System = struct [ to_protocol_of_protocol_roundtrip; of_protocol_to_protocol_roundtrip_or_outside_rfc3339; - of_protocol_to_protocol_roundtrip_or_outside_rfc3339_int_sizes_trap; rfc_encoding_binary_roundtrip; rfc_encoding_json_roundtrip; encoding_binary_roundtrip; -- GitLab