diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out deleted file mode 100644 index ad926ee522a94849179710a480f82ed8f20ed1e4..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_script[None] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out deleted file mode 100644 index ae1ac32f84f1a6ba236c50cccd76992249509612..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_script[Optimized] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out deleted file mode 100644 index 863dda9a7e5a0c24595d81665b8a861acc17109f..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out +++ /dev/null @@ -1,12 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_script[Optimized_legacy] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 (Pair 3 (Pair 6 9)) ; - Pair 1 (Pair 4 (Pair 7 10)) ; - Pair 2 (Pair 5 (Pair 8 11)) } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out deleted file mode 100644 index 3e4d75fd36574de47ce702101e3ae37b4e9ce2e5..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_script[Readable] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out deleted file mode 100644 index 285aadf75fcadedc43f19903e772cfc704264674..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int bool bytes)] - -list (pair nat (pair int (pair bool bytes))) diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out deleted file mode 100644 index cc7473bdc8c66d7d8dcc351fceb53f6c6f4616c0..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int bool)] - -list (pair nat (pair int bool)) diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out deleted file mode 100644 index 2b3a3b71bd4e80667faa937592e4f33061e2a03f..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int)] - -list (pair nat int) diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out deleted file mode 100644 index 27f0a4f77e7064edfcd1ba1ac4444b7d71a23c9f..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_type[list nat] - -list nat diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out deleted file mode 100644 index 8b9d37d68012e6c7b659bf2f10419026f0de7dd7..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_type[nat] - -nat diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out deleted file mode 100644 index 5e6379c82d91ce0f2a2c40a710935f41d91a34bb..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_type[pair nat int bool bytes] - -pair nat (pair int (pair bool bytes)) diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out deleted file mode 100644 index 09e342b1ab6ab63fada43b222245ea9ec69e64d1..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_type[pair nat int bool] - -pair nat (pair int bool) diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out deleted file mode 100644 index c8492352334d10b8af5ae8926d201466e0ce6430..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_type[pair nat int] - -pair nat int diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out deleted file mode 100644 index d128e78a59290422f386eaf02463632a5924698b..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_unparsing_mode[None] - -{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out deleted file mode 100644 index 61d4469b3d25f58cee9931b52fb96444249fdb17..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Optimized] - -{ { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out deleted file mode 100644 index 80dc17981c1cd4b1e128f436105b9ebf083c1814..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out +++ /dev/null @@ -1,5 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Optimized_legacy] - -{ Pair 0 (Pair 3 (Pair 6 9)) ; - Pair 1 (Pair 4 (Pair 7 10)) ; - Pair 2 (Pair 5 (Pair 8 11)) } diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out b/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out deleted file mode 100644 index 2864ffc0534c9b47a3193d18a0c4a8f4b61aeec0..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Readable] - -{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } diff --git a/tests_python/tests_014/test_contract.py b/tests_python/tests_014/test_contract.py index bcfef5ae53b0437efa545e969b82ca2926c08eb1..c9790e30e47e2c237595c2257d5733fec8208da9 100644 --- a/tests_python/tests_014/test_contract.py +++ b/tests_python/tests_014/test_contract.py @@ -1594,54 +1594,6 @@ expruat2BS4KCwn9kbopeX1ZwxtrtJbyFhpnpnG6A5KdCBCwHNsdod ) == [results] -@pytest.mark.contract -@pytest.mark.regression -class TestNormalize: - """Regression tests for the "normalize data" command.""" - - modes = [None, 'Readable', 'Optimized', 'Optimized_legacy'] - - @pytest.mark.parametrize('mode', modes) - def test_normalize_unparsing_mode(self, client_regtest_scrubbed, mode): - client = client_regtest_scrubbed - input_data = ( - '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' - ) - input_type = 'list (pair nat nat nat nat)' - client.normalize(input_data, input_type, mode=mode) - - def test_normalize_legacy_flag(self, client_regtest_scrubbed): - client = client_regtest_scrubbed - input_data = '{Elt %a 0 1}' - input_type = 'map nat nat' - client.normalize(input_data, input_type, legacy=True) - error_pattern = 'unexpected annotation.' - with utils.assert_run_failure(error_pattern): - client.normalize(input_data, input_type, legacy=False) - - @pytest.mark.parametrize('mode', modes) - def test_normalize_script(self, client_regtest_scrubbed, mode): - client = client_regtest_scrubbed - path = os.path.join(CONTRACT_PATH, 'opcodes', 'comb-literals.tz') - client.normalize_script(path, mode=mode) - - types = [ - 'nat', - 'list nat', - 'pair nat int', - 'list (pair nat int)', - 'pair nat int bool', - 'list (pair nat int bool)', - 'pair nat int bool bytes', - 'list (pair nat int bool bytes)', - ] - - @pytest.mark.parametrize('typ', types) - def test_normalize_type(self, client_regtest_scrubbed, typ): - client = client_regtest_scrubbed - client.normalize_type(typ) - - @pytest.mark.contract @pytest.mark.incremental class TestContractTypeChecking: diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out deleted file mode 100644 index 56226aa08d1ed38d34ce246570268d3c682de6dd..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_script[None] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out deleted file mode 100644 index 4e22be8494554623ee590964a91c85104e22468c..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_script[Optimized] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out deleted file mode 100644 index 7212dc21238c5b4a3b493a7c9128be1e2edd2bb6..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out +++ /dev/null @@ -1,12 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_script[Optimized_legacy] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 (Pair 3 (Pair 6 9)) ; - Pair 1 (Pair 4 (Pair 7 10)) ; - Pair 2 (Pair 5 (Pair 8 11)) } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out deleted file mode 100644 index 0b357da402236e52ab32134ce78946d258ab59b0..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_script[Readable] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out deleted file mode 100644 index c82cf253935e5dd17b75a57bad2077320a09c54e..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int bool bytes)] - -list (pair nat (pair int (pair bool bytes))) diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out deleted file mode 100644 index dcf59cb9f0bcb754d1cf487a2535a5a0833d9ceb..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int bool)] - -list (pair nat (pair int bool)) diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out deleted file mode 100644 index f1b2084c72bcffd205523caa88986e0bceacf68f..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int)] - -list (pair nat int) diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out deleted file mode 100644 index a03b28a8973a68a5a4412cf65db2ddd288c7cb56..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_type[list nat] - -list nat diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out deleted file mode 100644 index 7ff78aa0ddbb141c999b6c42d8f4a311e17c703e..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_type[nat] - -nat diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out deleted file mode 100644 index 02a57da9aa36f7c82481125a48298d8036626ce2..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_type[pair nat int bool bytes] - -pair nat (pair int (pair bool bytes)) diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out deleted file mode 100644 index ae4498025128fa8a14ca6850d8ad4a9603d59a66..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_type[pair nat int bool] - -pair nat (pair int bool) diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out deleted file mode 100644 index 97540c223b26d5491f7a7537d36889018ddda7dc..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_type[pair nat int] - -pair nat int diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out deleted file mode 100644 index c9c1fa05663765270c979bed9ca1ed1bdd2962a2..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_unparsing_mode[None] - -{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out deleted file mode 100644 index 4eeabb7280b1a02df6d94ecd29c8d89be981f612..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Optimized] - -{ { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out deleted file mode 100644 index cc7aee013ea51387facc3ef585c091628e1d034f..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out +++ /dev/null @@ -1,5 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Optimized_legacy] - -{ Pair 0 (Pair 3 (Pair 6 9)) ; - Pair 1 (Pair 4 (Pair 7 10)) ; - Pair 2 (Pair 5 (Pair 8 11)) } diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out b/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out deleted file mode 100644 index 5b1d45e62784ebc147e546ce606ecf478946c140..0000000000000000000000000000000000000000 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Readable] - -{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } diff --git a/tests_python/tests_015/test_contract.py b/tests_python/tests_015/test_contract.py index bcfef5ae53b0437efa545e969b82ca2926c08eb1..c9790e30e47e2c237595c2257d5733fec8208da9 100644 --- a/tests_python/tests_015/test_contract.py +++ b/tests_python/tests_015/test_contract.py @@ -1594,54 +1594,6 @@ expruat2BS4KCwn9kbopeX1ZwxtrtJbyFhpnpnG6A5KdCBCwHNsdod ) == [results] -@pytest.mark.contract -@pytest.mark.regression -class TestNormalize: - """Regression tests for the "normalize data" command.""" - - modes = [None, 'Readable', 'Optimized', 'Optimized_legacy'] - - @pytest.mark.parametrize('mode', modes) - def test_normalize_unparsing_mode(self, client_regtest_scrubbed, mode): - client = client_regtest_scrubbed - input_data = ( - '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' - ) - input_type = 'list (pair nat nat nat nat)' - client.normalize(input_data, input_type, mode=mode) - - def test_normalize_legacy_flag(self, client_regtest_scrubbed): - client = client_regtest_scrubbed - input_data = '{Elt %a 0 1}' - input_type = 'map nat nat' - client.normalize(input_data, input_type, legacy=True) - error_pattern = 'unexpected annotation.' - with utils.assert_run_failure(error_pattern): - client.normalize(input_data, input_type, legacy=False) - - @pytest.mark.parametrize('mode', modes) - def test_normalize_script(self, client_regtest_scrubbed, mode): - client = client_regtest_scrubbed - path = os.path.join(CONTRACT_PATH, 'opcodes', 'comb-literals.tz') - client.normalize_script(path, mode=mode) - - types = [ - 'nat', - 'list nat', - 'pair nat int', - 'list (pair nat int)', - 'pair nat int bool', - 'list (pair nat int bool)', - 'pair nat int bool bytes', - 'list (pair nat int bool bytes)', - ] - - @pytest.mark.parametrize('typ', types) - def test_normalize_type(self, client_regtest_scrubbed, typ): - client = client_regtest_scrubbed - client.normalize_type(typ) - - @pytest.mark.contract @pytest.mark.incremental class TestContractTypeChecking: diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out deleted file mode 100644 index 8668e0b796a6344006296d2dffea47a50301c912..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[None].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_script[None] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out deleted file mode 100644 index 2f25d7b365312b5da5300d5105f045e1888b3a1a..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_script[Optimized] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out deleted file mode 100644 index f9cc768df6a58f0fe09931dee0d7386ede99605a..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Optimized_legacy].out +++ /dev/null @@ -1,12 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_script[Optimized_legacy] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 (Pair 3 (Pair 6 9)) ; - Pair 1 (Pair 4 (Pair 7 10)) ; - Pair 2 (Pair 5 (Pair 8 11)) } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out deleted file mode 100644 index 29fd88c59a95e128d7f9d55bad05239e59e63b23..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_script[Readable].out +++ /dev/null @@ -1,10 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_script[Readable] - -{ parameter unit ; - storage unit ; - code { PUSH (list (pair nat nat nat nat)) - { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; - DROP 2 ; - UNIT ; - NIL operation ; - PAIR } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out deleted file mode 100644 index 7e5a3e33ec7a3cb3a9df5e3a492e6a3d23682f50..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool bytes)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int bool bytes)] - -list (pair nat (pair int (pair bool bytes))) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out deleted file mode 100644 index ba911c59a7703d4181c16b67adc90bd15419358b..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int bool)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int bool)] - -list (pair nat (pair int bool)) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out deleted file mode 100644 index 4cf8edb045ff23d34fe99a348f5da9f2124a7b41..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list (pair nat int)].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_type[list (pair nat int)] - -list (pair nat int) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out deleted file mode 100644 index 71c75f1600a1d9df16b26a838c650da7ec43f4ff..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[list nat].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_type[list nat] - -list nat diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out deleted file mode 100644 index 82859c3f044be504df98f4407788e22f0289d1bc..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[nat].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_type[nat] - -nat diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out deleted file mode 100644 index caeea900f6045dc2acb3e362c780e64f7d06d2ea..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool bytes].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_type[pair nat int bool bytes] - -pair nat (pair int (pair bool bytes)) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out deleted file mode 100644 index dc6a5062ffb6fac6d06f5f6472bbed6faf710d7e..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int bool].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_type[pair nat int bool] - -pair nat (pair int bool) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out deleted file mode 100644 index 04ef11b9f89748a2782eb598f470e9c00fbc1bc5..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_type[pair nat int].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_type[pair nat int] - -pair nat int diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out deleted file mode 100644 index 978685e04a2c43656e677c8e8d2870d1c6cb2726..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[None].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_unparsing_mode[None] - -{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out deleted file mode 100644 index bb3dc76a9359275ddf3598d3523358343634f366..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Optimized] - -{ { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out deleted file mode 100644 index b511c9b56d7aa0e90d84a489f4d0cb581ac268f0..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Optimized_legacy].out +++ /dev/null @@ -1,5 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Optimized_legacy] - -{ Pair 0 (Pair 3 (Pair 6 9)) ; - Pair 1 (Pair 4 (Pair 7 10)) ; - Pair 2 (Pair 5 (Pair 8 11)) } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out deleted file mode 100644 index 9d062161eb8c09d100cd89880557d789213bcafe..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_unparsing_mode[Readable].out +++ /dev/null @@ -1,3 +0,0 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_unparsing_mode[Readable] - -{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } diff --git a/tests_python/tests_alpha/test_contract.py b/tests_python/tests_alpha/test_contract.py index bcfef5ae53b0437efa545e969b82ca2926c08eb1..c9790e30e47e2c237595c2257d5733fec8208da9 100644 --- a/tests_python/tests_alpha/test_contract.py +++ b/tests_python/tests_alpha/test_contract.py @@ -1594,54 +1594,6 @@ expruat2BS4KCwn9kbopeX1ZwxtrtJbyFhpnpnG6A5KdCBCwHNsdod ) == [results] -@pytest.mark.contract -@pytest.mark.regression -class TestNormalize: - """Regression tests for the "normalize data" command.""" - - modes = [None, 'Readable', 'Optimized', 'Optimized_legacy'] - - @pytest.mark.parametrize('mode', modes) - def test_normalize_unparsing_mode(self, client_regtest_scrubbed, mode): - client = client_regtest_scrubbed - input_data = ( - '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' - ) - input_type = 'list (pair nat nat nat nat)' - client.normalize(input_data, input_type, mode=mode) - - def test_normalize_legacy_flag(self, client_regtest_scrubbed): - client = client_regtest_scrubbed - input_data = '{Elt %a 0 1}' - input_type = 'map nat nat' - client.normalize(input_data, input_type, legacy=True) - error_pattern = 'unexpected annotation.' - with utils.assert_run_failure(error_pattern): - client.normalize(input_data, input_type, legacy=False) - - @pytest.mark.parametrize('mode', modes) - def test_normalize_script(self, client_regtest_scrubbed, mode): - client = client_regtest_scrubbed - path = os.path.join(CONTRACT_PATH, 'opcodes', 'comb-literals.tz') - client.normalize_script(path, mode=mode) - - types = [ - 'nat', - 'list nat', - 'pair nat int', - 'list (pair nat int)', - 'pair nat int bool', - 'list (pair nat int bool)', - 'pair nat int bool bytes', - 'list (pair nat int bool bytes)', - ] - - @pytest.mark.parametrize('typ', types) - def test_normalize_type(self, client_regtest_scrubbed, typ): - client = client_regtest_scrubbed - client.normalize_type(typ) - - @pytest.mark.contract @pytest.mark.incremental class TestContractTypeChecking: diff --git a/tezt/lib_tezos/client.ml b/tezt/lib_tezos/client.ml index a26f281000233f9c47a54eada07a5971571cf34d..4522e69acf8f34300a0775fc220bdeea07d66688 100644 --- a/tezt/lib_tezos/client.ml +++ b/tezt/lib_tezos/client.ml @@ -1468,7 +1468,7 @@ let normalize_mode_to_string = function | Optimized -> "Optimized" | Optimized_legacy -> "Optimized_legacy" -let spawn_normalize_data ?mode ?(legacy = false) ~data ~typ client = +let spawn_normalize_data ?hooks ?mode ?(legacy = false) ~data ~typ client = let mode_cmd = Option.map normalize_mode_to_string mode |> Option.map (fun s -> ["--unparsing-mode"; s]) @@ -1478,13 +1478,13 @@ let spawn_normalize_data ?mode ?(legacy = false) ~data ~typ client = @ Option.value ~default:[] mode_cmd @ if legacy then ["--legacy"] else [] in - spawn_command client cmd + spawn_command ?hooks client cmd -let normalize_data ?mode ?legacy ~data ~typ client = - spawn_normalize_data ?mode ?legacy ~data ~typ client +let normalize_data ?hooks ?mode ?legacy ~data ~typ client = + spawn_normalize_data ?hooks ?mode ?legacy ~data ~typ client |> Process.check_and_read_stdout -let spawn_normalize_script ?mode ~script client = +let spawn_normalize_script ?hooks ?mode ~script client = let mode_cmd = Option.map normalize_mode_to_string mode |> Option.map (fun s -> ["--unparsing-mode"; s]) @@ -1492,10 +1492,11 @@ let spawn_normalize_script ?mode ~script client = let cmd = ["normalize"; "script"; script] @ Option.value ~default:[] mode_cmd in - spawn_command client cmd + spawn_command ?hooks client cmd -let normalize_script ?mode ~script client = - spawn_normalize_script ?mode ~script client |> Process.check_and_read_stdout +let normalize_script ?hooks ?mode ~script client = + spawn_normalize_script ?hooks ?mode ~script client + |> Process.check_and_read_stdout let spawn_typecheck_data ~data ~typ ?gas ?(legacy = false) client = let gas_cmd = @@ -1508,6 +1509,12 @@ let spawn_typecheck_data ~data ~typ ?gas ?(legacy = false) client = in spawn_command client cmd +let spawn_normalize_type ?hooks ~typ client = + spawn_command ?hooks client ["normalize"; "type"; typ] + +let normalize_type ?hooks ~typ client = + spawn_normalize_type ?hooks ~typ client |> Process.check_and_read_stdout + let typecheck_data ~data ~typ ?gas ?(legacy = false) client = spawn_typecheck_data ~data ~typ ?gas ~legacy client |> Process.check diff --git a/tezt/lib_tezos/client.mli b/tezt/lib_tezos/client.mli index 2c74e0a726650d0a012012a66dd19d42be3e5bf1..3d8743d84caad0d5c5fa8f50180d317aaab04bab 100644 --- a/tezt/lib_tezos/client.mli +++ b/tezt/lib_tezos/client.mli @@ -1178,6 +1178,7 @@ val spawn_get_contract_hash : (** Run [octez-client normalize data .. of type ...]*) val normalize_data : + ?hooks:Process_hooks.t -> ?mode:normalize_mode -> ?legacy:bool -> data:string -> @@ -1187,6 +1188,7 @@ val normalize_data : (** Same as [normalize_data], but do not wait for the process to exit. *) val spawn_normalize_data : + ?hooks:Process_hooks.t -> ?mode:normalize_mode -> ?legacy:bool -> data:string -> @@ -1196,11 +1198,26 @@ val spawn_normalize_data : (** Run [octez-client normalize script ..]*) val normalize_script : - ?mode:normalize_mode -> script:string -> t -> string Lwt.t + ?hooks:Process_hooks.t -> + ?mode:normalize_mode -> + script:string -> + t -> + string Lwt.t (** Same as [normalize_script], but do not wait for the process to exit. *) val spawn_normalize_script : - ?mode:normalize_mode -> script:string -> t -> Process.t + ?hooks:Process_hooks.t -> + ?mode:normalize_mode -> + script:string -> + t -> + Process.t + +(** Run [octez-client normalize type ..]*) +val normalize_type : ?hooks:Process_hooks.t -> typ:string -> t -> string Lwt.t + +(** Same as [normalize_type], but do not wait for the process to exit. *) +val spawn_normalize_type : + ?hooks:Process_hooks.t -> typ:string -> t -> Process.t (** Run [octez-client typecheck data ..]*) val typecheck_data : diff --git a/tezt/tests/contracts/proto_alpha/comb-literals.tz b/tezt/tests/contracts/proto_alpha/comb-literals.tz new file mode 100644 index 0000000000000000000000000000000000000000..2a2b217d78577ca5bcddc18dd28f7eb29bb9553e --- /dev/null +++ b/tezt/tests/contracts/proto_alpha/comb-literals.tz @@ -0,0 +1,9 @@ +# This pushes a list of combs to test the effect of the normalize script command +parameter unit; +storage unit; +code { + PUSH + (list (pair nat nat nat nat)) + {Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}; + DROP 2; UNIT; NIL operation; PAIR + } diff --git a/tezt/tests/expected/normalize.ml/Alpha- Test normalize in unparsing mode.out b/tezt/tests/expected/normalize.ml/Alpha- Test normalize in unparsing mode.out new file mode 100644 index 0000000000000000000000000000000000000000..80323b4574cb47d5c3653b4fdc5191efc62aac4e --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Alpha- Test normalize in unparsing mode.out @@ -0,0 +1,14 @@ + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' +{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Readable +{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Optimized +{ { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Optimized_legacy +{ Pair 0 (Pair 3 (Pair 6 9)) ; + Pair 1 (Pair 4 (Pair 7 10)) ; + Pair 2 (Pair 5 (Pair 8 11)) } diff --git a/tezt/tests/expected/normalize.ml/Alpha- Test normalize script.out b/tezt/tests/expected/normalize.ml/Alpha- Test normalize script.out new file mode 100644 index 0000000000000000000000000000000000000000..772b4afaf68f31b8fe719f8459dc0b5716f638f9 --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Alpha- Test normalize script.out @@ -0,0 +1,42 @@ + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Readable +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Optimized +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Optimized_legacy +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 (Pair 3 (Pair 6 9)) ; + Pair 1 (Pair 4 (Pair 7 10)) ; + Pair 2 (Pair 5 (Pair 8 11)) } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } diff --git a/tezt/tests/expected/normalize.ml/Alpha- Test normalize type.out b/tezt/tests/expected/normalize.ml/Alpha- Test normalize type.out new file mode 100644 index 0000000000000000000000000000000000000000..c35ef0e62ff854500fdcbe60890ae2ac1888f5b7 --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Alpha- Test normalize type.out @@ -0,0 +1,24 @@ + +./octez-client --mode mockup normalize type nat +nat + +./octez-client --mode mockup normalize type 'list nat' +list nat + +./octez-client --mode mockup normalize type 'pair nat int' +pair nat int + +./octez-client --mode mockup normalize type 'list (pair nat int)' +list (pair nat int) + +./octez-client --mode mockup normalize type 'pair nat int bool' +pair nat (pair int bool) + +./octez-client --mode mockup normalize type 'list (pair nat int bool)' +list (pair nat (pair int bool)) + +./octez-client --mode mockup normalize type 'pair nat int bool bytes' +pair nat (pair int (pair bool bytes)) + +./octez-client --mode mockup normalize type 'list (pair nat int bool bytes)' +list (pair nat (pair int (pair bool bytes))) diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out b/tezt/tests/expected/normalize.ml/Alpha- Test normalize with legacy flag.out similarity index 51% rename from tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out rename to tezt/tests/expected/normalize.ml/Alpha- Test normalize with legacy flag.out index b39ccb66d9ee2d5c69eef1c16354fe712bdca809..8ecc6976ccf662ba2ebc888828af88e97cb2a030 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out +++ b/tezt/tests/expected/normalize.ml/Alpha- Test normalize with legacy flag.out @@ -1,6 +1,8 @@ -tests_014/test_contract.py::TestNormalize::test_normalize_legacy_flag +./octez-client --mode mockup normalize data '{Elt %a 0 1}' of type 'map nat nat' --legacy { Elt 0 1 } + +./octez-client --mode mockup normalize data '{Elt %a 0 1}' of type 'map nat nat' At (unshown) location 0, value { Elt %a 0 1 } is invalid for type map nat nat. At (unshown) location 1, unexpected annotation. diff --git a/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize in unparsing mode.out b/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize in unparsing mode.out new file mode 100644 index 0000000000000000000000000000000000000000..80323b4574cb47d5c3653b4fdc5191efc62aac4e --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize in unparsing mode.out @@ -0,0 +1,14 @@ + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' +{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Readable +{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Optimized +{ { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Optimized_legacy +{ Pair 0 (Pair 3 (Pair 6 9)) ; + Pair 1 (Pair 4 (Pair 7 10)) ; + Pair 2 (Pair 5 (Pair 8 11)) } diff --git a/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize script.out b/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize script.out new file mode 100644 index 0000000000000000000000000000000000000000..772b4afaf68f31b8fe719f8459dc0b5716f638f9 --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize script.out @@ -0,0 +1,42 @@ + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Readable +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Optimized +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Optimized_legacy +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 (Pair 3 (Pair 6 9)) ; + Pair 1 (Pair 4 (Pair 7 10)) ; + Pair 2 (Pair 5 (Pair 8 11)) } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } diff --git a/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize type.out b/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize type.out new file mode 100644 index 0000000000000000000000000000000000000000..c35ef0e62ff854500fdcbe60890ae2ac1888f5b7 --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize type.out @@ -0,0 +1,24 @@ + +./octez-client --mode mockup normalize type nat +nat + +./octez-client --mode mockup normalize type 'list nat' +list nat + +./octez-client --mode mockup normalize type 'pair nat int' +pair nat int + +./octez-client --mode mockup normalize type 'list (pair nat int)' +list (pair nat int) + +./octez-client --mode mockup normalize type 'pair nat int bool' +pair nat (pair int bool) + +./octez-client --mode mockup normalize type 'list (pair nat int bool)' +list (pair nat (pair int bool)) + +./octez-client --mode mockup normalize type 'pair nat int bool bytes' +pair nat (pair int (pair bool bytes)) + +./octez-client --mode mockup normalize type 'list (pair nat int bool bytes)' +list (pair nat (pair int (pair bool bytes))) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out b/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize with legacy flag.out similarity index 51% rename from tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out rename to tezt/tests/expected/normalize.ml/Kathmandu- Test normalize with legacy flag.out index f85dafbbe73b90ddf7c4c7f3bc248f85a3511fbb..8ecc6976ccf662ba2ebc888828af88e97cb2a030 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out +++ b/tezt/tests/expected/normalize.ml/Kathmandu- Test normalize with legacy flag.out @@ -1,6 +1,8 @@ -tests_alpha/test_contract.py::TestNormalize::test_normalize_legacy_flag +./octez-client --mode mockup normalize data '{Elt %a 0 1}' of type 'map nat nat' --legacy { Elt 0 1 } + +./octez-client --mode mockup normalize data '{Elt %a 0 1}' of type 'map nat nat' At (unshown) location 0, value { Elt %a 0 1 } is invalid for type map nat nat. At (unshown) location 1, unexpected annotation. diff --git a/tezt/tests/expected/normalize.ml/Lima- Test normalize in unparsing mode.out b/tezt/tests/expected/normalize.ml/Lima- Test normalize in unparsing mode.out new file mode 100644 index 0000000000000000000000000000000000000000..80323b4574cb47d5c3653b4fdc5191efc62aac4e --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Lima- Test normalize in unparsing mode.out @@ -0,0 +1,14 @@ + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' +{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Readable +{ Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Optimized +{ { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } + +./octez-client --mode mockup normalize data '{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}' of type 'list (pair nat nat nat nat)' --unparsing-mode Optimized_legacy +{ Pair 0 (Pair 3 (Pair 6 9)) ; + Pair 1 (Pair 4 (Pair 7 10)) ; + Pair 2 (Pair 5 (Pair 8 11)) } diff --git a/tezt/tests/expected/normalize.ml/Lima- Test normalize script.out b/tezt/tests/expected/normalize.ml/Lima- Test normalize script.out new file mode 100644 index 0000000000000000000000000000000000000000..772b4afaf68f31b8fe719f8459dc0b5716f638f9 --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Lima- Test normalize script.out @@ -0,0 +1,42 @@ + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Readable +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 3 6 9 ; Pair 1 4 7 10 ; Pair 2 5 8 11 } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Optimized +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { { 0 ; 3 ; 6 ; 9 } ; { 1 ; 4 ; 7 ; 10 } ; { 2 ; 5 ; 8 ; 11 } } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } + +./octez-client --mode mockup normalize script file:./tezt/tests/contracts/proto_alpha/comb-literals.tz --unparsing-mode Optimized_legacy +{ parameter unit ; + storage unit ; + code { PUSH (list (pair nat nat nat nat)) + { Pair 0 (Pair 3 (Pair 6 9)) ; + Pair 1 (Pair 4 (Pair 7 10)) ; + Pair 2 (Pair 5 (Pair 8 11)) } ; + DROP 2 ; + UNIT ; + NIL operation ; + PAIR } } diff --git a/tezt/tests/expected/normalize.ml/Lima- Test normalize type.out b/tezt/tests/expected/normalize.ml/Lima- Test normalize type.out new file mode 100644 index 0000000000000000000000000000000000000000..c35ef0e62ff854500fdcbe60890ae2ac1888f5b7 --- /dev/null +++ b/tezt/tests/expected/normalize.ml/Lima- Test normalize type.out @@ -0,0 +1,24 @@ + +./octez-client --mode mockup normalize type nat +nat + +./octez-client --mode mockup normalize type 'list nat' +list nat + +./octez-client --mode mockup normalize type 'pair nat int' +pair nat int + +./octez-client --mode mockup normalize type 'list (pair nat int)' +list (pair nat int) + +./octez-client --mode mockup normalize type 'pair nat int bool' +pair nat (pair int bool) + +./octez-client --mode mockup normalize type 'list (pair nat int bool)' +list (pair nat (pair int bool)) + +./octez-client --mode mockup normalize type 'pair nat int bool bytes' +pair nat (pair int (pair bool bytes)) + +./octez-client --mode mockup normalize type 'list (pair nat int bool bytes)' +list (pair nat (pair int (pair bool bytes))) diff --git a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out b/tezt/tests/expected/normalize.ml/Lima- Test normalize with legacy flag.out similarity index 51% rename from tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out rename to tezt/tests/expected/normalize.ml/Lima- Test normalize with legacy flag.out index 76d87f4d7a9fff30f1dff8269cc92547f44b001d..8ecc6976ccf662ba2ebc888828af88e97cb2a030 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract.TestNormalize::test_normalize_legacy_flag.out +++ b/tezt/tests/expected/normalize.ml/Lima- Test normalize with legacy flag.out @@ -1,6 +1,8 @@ -tests_015/test_contract.py::TestNormalize::test_normalize_legacy_flag +./octez-client --mode mockup normalize data '{Elt %a 0 1}' of type 'map nat nat' --legacy { Elt 0 1 } + +./octez-client --mode mockup normalize data '{Elt %a 0 1}' of type 'map nat nat' At (unshown) location 0, value { Elt %a 0 1 } is invalid for type map nat nat. At (unshown) location 1, unexpected annotation. diff --git a/tezt/tests/normalize.ml b/tezt/tests/normalize.ml index 08f5fdf595bd4bbb4fd41a64eabbd50772e84606..056a72ef5d5b82115cb19ee46479a25de57e0e07 100644 --- a/tezt/tests/normalize.ml +++ b/tezt/tests/normalize.ml @@ -2,6 +2,7 @@ (* *) (* Open Source License *) (* Copyright (c) 2020 Nomadic Labs *) +(* Copyright (c) 2022 Marigold *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -25,58 +26,98 @@ (* Testing ------- - Component: Client - normalize command - Invocation: dune exec tezt/tests/main.exe -- --file normalize.ml - Subject: Test the client's command 'normalize data .. of type ...' + Component: Client + Invocation: dune exec tezt/tests/main.exe -- --file normalize.ml + Subject: Regression tests for the "normalize data" command. *) -let data = "{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}" +let hooks = Tezos_regression.hooks -let typ = "list (pair nat nat nat nat)" +let modes = Client.[None; Some Readable; Some Optimized; Some Optimized_legacy] -let normalize_modes = - let open Client in - [Readable; Optimized; Optimized_legacy] - -let execute_all_modes client = - let legacy = true in - Lwt_list.map_s - (fun mode -> Client.normalize_data ~mode ~legacy ~data ~typ client) - normalize_modes +let test_normalize_unparsing_mode = + Protocol.register_regression_test + ~__FILE__ + ~title:"Test normalize in unparsing mode" + ~tags:["client"; "normalize"] + @@ fun protocol -> + let* client = Client.init_mockup ~protocol () in + let data = "{Pair 0 3 6 9; Pair 1 (Pair 4 (Pair 7 10)); {2; 5; 8; 11}}" in + let typ = "list (pair nat nat nat nat)" in + let* () = + modes + |> Lwt_list.iter_s @@ fun mode -> + let* _ = Client.normalize_data client ~hooks ?mode ~data ~typ in + unit + in + unit -let test_normalize_vanilla = - Protocol.register_test +let test_normalize_legacy_flag = + Protocol.register_regression_test ~__FILE__ - ~title:(sf "normalize data") - ~tags:["normalize"; "data"] + ~title:"Test normalize with legacy flag" + ~tags:["client"; "normalize"] @@ fun protocol -> - let* node = Node.init [] in - let* client = Client.init ~endpoint:(Node node) () in - let* () = Client.activate_protocol ~protocol client in - let* _ = execute_all_modes client in - Lwt.return_unit + let* client = Client.init_mockup ~protocol () in + let data = "{Elt %a 0 1}" in + let typ = "map nat nat" in + let* () = + let* _ = Client.normalize_data client ~legacy:true ~hooks ~data ~typ in + unit + in + let* () = + Client.spawn_normalize_data client ~legacy:false ~hooks ~data ~typ + |> Process.check_error ~msg:(rex "unexpected annotation.") + in + unit -let test_normalize_mockup = - Protocol.register_test +let test_normalize_script = + Protocol.register_regression_test ~__FILE__ - ~title:"normalize data (mockup)" - ~tags:["mockup"; "normalize"; "data"] + ~title:"Test normalize script" + ~tags:["client"; "normalize"] @@ fun protocol -> let* client = Client.init_mockup ~protocol () in - let* _ = execute_all_modes client in - Lwt.return_unit + let* () = + modes + |> Lwt_list.iter_s @@ fun mode -> + let* _ = + Client.normalize_script + client + ~hooks + ?mode + ~script:"file:./tezt/tests/contracts/proto_alpha/comb-literals.tz" + in + unit + in + unit -let test_normalize_proxy = - Protocol.register_test +let test_normalize_type = + Protocol.register_regression_test ~__FILE__ - ~title:"normalize data (proxy)" - ~tags:["proxy"; "normalize"; "data"] + ~title:"Test normalize type" + ~tags:["client"; "normalize"] @@ fun protocol -> - let* _, client = Proxy.init ~protocol () in - let* _ = execute_all_modes client in - Lwt.return_unit + let* client = Client.init_mockup ~protocol () in + let* () = + [ + "nat"; + "list nat"; + "pair nat int"; + "list (pair nat int)"; + "pair nat int bool"; + "list (pair nat int bool)"; + "pair nat int bool bytes"; + "list (pair nat int bool bytes)"; + ] + |> Lwt_list.iter_s @@ fun typ -> + let* _ = Client.normalize_type client ~hooks ~typ in + unit + in + unit let register ~protocols = - test_normalize_vanilla protocols ; - test_normalize_mockup protocols ; - test_normalize_proxy protocols + test_normalize_unparsing_mode protocols ; + test_normalize_legacy_flag protocols ; + test_normalize_script protocols ; + test_normalize_type protocols