diff options
author | John Högberg <[email protected]> | 2019-05-24 15:26:53 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-06-12 13:33:46 +0200 |
commit | 9cfcddacc961301733619d998833e0fe345966e7 (patch) | |
tree | d56524c1d47718e3c3b7c6cf58f196c35b7d1663 /lib/compiler/test | |
parent | 9bf77c86ec83853d321958dac3582fdc2f00b045 (diff) | |
download | otp-9cfcddacc961301733619d998833e0fe345966e7.tar.gz otp-9cfcddacc961301733619d998833e0fe345966e7.tar.bz2 otp-9cfcddacc961301733619d998833e0fe345966e7.zip |
compiler: Move "known functions" to beam_types
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/beam_types_SUITE.erl | 8 | ||||
-rw-r--r-- | lib/compiler/test/property_test/beam_types_prop.erl | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/compiler/test/beam_types_SUITE.erl b/lib/compiler/test/beam_types_SUITE.erl index 66fd517ec0..297bd4026e 100644 --- a/lib/compiler/test/beam_types_SUITE.erl +++ b/lib/compiler/test/beam_types_SUITE.erl @@ -55,11 +55,11 @@ commutativity(Config) when is_list(Config) -> binary_consistency(Config) when is_list(Config) -> %% These binaries should meet into {binary,12} as that's the best common %% unit for both types. - A = {binary, 4}, - B = {binary, 6}, + A = #t_bitstring{unit=4}, + B = #t_bitstring{unit=6}, - {binary, 12} = beam_types:meet(A, B), - {binary, 2} = beam_types:join(A, B), + #t_bitstring{unit=12} = beam_types:meet(A, B), + #t_bitstring{unit=2} = beam_types:join(A, B), A = beam_types:meet(A, beam_types:join(A, B)), A = beam_types:join(A, beam_types:meet(A, B)), diff --git a/lib/compiler/test/property_test/beam_types_prop.erl b/lib/compiler/test/property_test/beam_types_prop.erl index 815e353853..9c103d3886 100644 --- a/lib/compiler/test/property_test/beam_types_prop.erl +++ b/lib/compiler/test/property_test/beam_types_prop.erl @@ -84,7 +84,7 @@ numerical_types() -> [gen_integer(), float, number]. nested_types(Depth) when Depth >= 3 -> []; -nested_types(Depth) -> [map, gen_tuple(Depth + 1)]. +nested_types(Depth) -> [#t_map{}, gen_tuple(Depth + 1)]. gen_atom() -> ?LET(Size, range(0, ?ATOM_SET_SIZE), @@ -99,8 +99,8 @@ gen_atom() -> end). gen_binary() -> - ?SHRINK({binary, range(1, 128)}, - [{binary, [1, 2, 3, 5, 7, 8, 16, 32, 64]}]). + ?SHRINK(#t_bitstring{unit=range(1, 128)}, + [#t_bitstring{unit=[1, 2, 3, 5, 7, 8, 16, 32, 64]}]). gen_integer() -> oneof([gen_integer_bounded(), #t_integer{}]). |