From d39f05492baedbef6b62afe127e9da8b16903ff8 Mon Sep 17 00:00:00 2001 From: fotograf Date: Fri, 25 Oct 2024 15:18:33 +0800 Subject: [PATCH] [ArkTS CTS] Update or remove not relevant tests Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/IAZRJM Test: All required pre-merge tests passed. Results are available in the ggwatcher. Signed-off-by: fotograf Change-Id: Ia3de986fdcc0c5ce4a1be242ba46a4d5b577a11f --- .../addition/addition_byte.params.yaml | 14 +- .../addition/addition_short.params.yaml | 14 +- .../bitwise_and/bitwise_and_byte.params.yaml | 6 +- .../bitwise_and/bitwise_and_short.params.yaml | 6 +- .../bitwise_complement_byte.params.yaml | 4 +- .../bitwise_complement_short.params.yaml | 4 +- .../bitwise_or/bitwise_or_byte.params.yaml | 6 +- .../bitwise_or/bitwise_or_short.params.yaml | 6 +- .../bitwise_xor/bitwise_xor_byte.params.yaml | 7 +- .../bitwise_xor/bitwise_xor_short.params.yaml | 7 +- .../division/division_byte.params.yaml | 8 +- .../division/division_short.params.yaml | 8 +- .../equal/equal_byte.params.yaml | 16 +- .../equal/equal_short.params.yaml | 16 +- .../greater_or_equal_byte.params.yaml | 10 +- .../greater_or_equal_short.params.yaml | 10 +- .../greater_than_byte.params.yaml | 10 +- .../greater_than_short.params.yaml | 10 +- .../left_shift/left_shift_byte.params.yaml | 8 +- .../left_shift/left_shift_short.params.yaml | 8 +- .../less_or_equal_byte.params.yaml | 10 +- .../less_or_equal_short.params.yaml | 10 +- .../less_than/less_than_byte.params.yaml | 10 +- .../less_than/less_than_short.params.yaml | 10 +- .../multiplication_byte.params.yaml | 16 +- .../multiplication_short.params.yaml | 16 +- .../not_equal/not_equal_byte.params.yaml | 16 +- .../not_equal/not_equal_short.params.yaml | 16 +- .../postfix_decrement_byte.params.yaml | 4 +- .../postfix_decrement_short.params.yaml | 4 +- .../postfix_increment_byte.params.yaml | 4 +- .../postfix_increment_short.params.yaml | 4 +- .../prefix_decrement_byte.params.yaml | 4 +- .../prefix_decrement_short.params.yaml | 4 +- .../prefix_increment_byte.params.yaml | 4 +- .../prefix_increment_short.params.yaml | 4 +- .../remainder/remainder_byte.params.yaml | 12 +- .../remainder/remainder_short.params.yaml | 12 +- .../right_shift/right_shift_byte.params.yaml | 10 +- .../right_shift/right_shift_short.params.yaml | 10 +- .../subtraction/subtraction_byte.params.yaml | 16 +- .../subtraction/subtraction_short.params.yaml | 16 +- .../unary_minus/unary_minus_byte.params.yaml | 4 +- .../unary_minus/unary_minus_short.params.yaml | 4 +- .../unary_plus/unary_plus_byte.params.yaml | 4 +- .../unary_plus/unary_plus_short.params.yaml | 4 +- .../unsigned_right_shift_byte.params.yaml | 12 +- .../unsigned_right_shift_short.params.yaml | 12 +- .../10.tuple_types/tt2.params.yaml | 2 +- .../boxing.params.yaml | 6 +- .../boxing2.params.yaml | 6 +- .../01.assignment-like_contexts/boxing2.sts | 2 +- .../boxing2_call.params.yaml | 12 +- .../boxing2_call.sts | 2 +- .../boxing_call.params.yaml | 6 +- .../prim_narrowing.params.yaml | 56 ++--- .../prim_wide_narrow.params.yaml | 4 +- .../unboxing2_call.params.yaml | 18 +- .../unboxing_call.params.yaml | 6 +- .../result_type_cond_n.sts | 107 --------- .../neg_gen1.sts | 2 +- .../pos_2a.sts | 2 +- .../assn_var/assn-var.params.yaml | 76 +++---- .../call_cons/call-cons.params.yaml | 76 +++---- .../call_func/call-func.params.yaml | 76 +++---- .../call_lmbd/call-lmbd.params.yaml | 76 +++---- .../call_meth/call-meth.params.yaml | 76 +++---- .../comp_arr/comp-arr.params.yaml | 76 +++---- .../comp_obj/comp-clss.params.yaml | 76 +++---- .../comp_obj/comp-intf.params.yaml | 76 +++---- .../decl_const/decl-const.params.yaml | 76 +++---- .../decl_field/decl-field.params.yaml | 76 +++---- .../decl_field/decl-st-field.params.yaml | 76 +++---- .../decl_var/decl-var.params.yaml | 76 +++---- .../assn_var/assn-var.params.yaml | 60 ++--- .../call_cons/call-cons.params.yaml | 60 ++--- .../call_func/call-func.params.yaml | 60 ++--- .../call_lmbd/call-lmbd-nan.params.yaml | 5 - .../call_lmbd/call-lmbd-nan_n.params.yaml} | 10 +- .../call_lmbd/call-lmbd-nan_n.sts | 35 +++ .../call_lmbd/call-lmbd.params.yaml | 212 +----------------- .../call_lmbd/call-lmbd_n.params.yaml | 206 +++++++++++++++++ .../call_lmbd/call-lmbd_n.sts | 35 +++ .../call_meth/call-meth.params.yaml | 60 ++--- .../comp_arr/comp-arr.params.yaml | 60 ++--- .../comp_obj/comp-clss.params.yaml | 60 ++--- .../comp_obj/comp-intf.params.yaml | 60 ++--- .../decl_const/decl-const.params.yaml | 60 ++--- .../decl_field/decl-field.params.yaml | 60 ++--- .../decl_var/decl-var.params.yaml | 60 ++--- .../tof_const.params.yaml | 88 ++++---- .../17.typeof_expression/tof_func.params.yaml | 88 ++++---- .../17.typeof_expression/tof_meth.params.yaml | 88 ++++---- .../17.typeof_expression/tof_obj.params.yaml | 88 ++++---- .../17.typeof_expression/tof_vars.params.yaml | 88 ++++---- .../siexp.params.yaml | 32 +-- .../cond_t2.params.yaml | 20 +- .../do_t.params.yaml | 20 +- .../for_t.params.yaml | 20 +- .../if_t2.params.yaml | 20 +- .../ops.sts | 15 +- .../ops2.params.yaml | 63 ++++++ .../ops2.sts | 58 +++++ .../while_t.params.yaml | 20 +- .../cm_over2.params.yaml | 24 +- .../ets-cts/ets-cts-ignored-JIT-ASAN.txt | 3 - .../ets-cts/ets-cts-ignored-JIT-REPEATS.txt | 4 - .../test-lists/ets-cts/ets-cts-ignored.txt | 103 ++++----- 108 files changed, 1797 insertions(+), 1721 deletions(-) delete mode 100644 static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n.sts rename static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/{03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n.params.yaml => 05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_n.params.yaml} (65%) create mode 100644 static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_n.sts create mode 100644 static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_n.params.yaml create mode 100644 static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_n.sts create mode 100644 static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2.params.yaml create mode 100644 static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2.sts diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/addition/addition_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/addition/addition_byte.params.yaml index 407d712e3a..de5499b0c0 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/addition/addition_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/addition/addition_byte.params.yaml @@ -16,12 +16,12 @@ values: - { left: 0, right: 1, result: 1 } - { left: 1, right: 1, result: 2 } - { left: 42, right: 24, result: 66 } -- { left: 0, right: "Byte.MAX_VALUE as byte", result: "Byte.MAX_VALUE as byte" } -- { left: 1, right: "Byte.MAX_VALUE as byte", result: 128 } -- { left: 0, right: "Byte.MIN_VALUE as byte", result: "Byte.MIN_VALUE as byte" } -- { left: 1, right: "Byte.MIN_VALUE as byte", result: -127 } +- { left: 0, right: "Byte.MAX_VALUE", result: "Byte.MAX_VALUE" } +- { left: 1, right: "Byte.MAX_VALUE", result: 128 } +- { left: 0, right: "Byte.MIN_VALUE", result: "Byte.MIN_VALUE" } +- { left: 1, right: "Byte.MIN_VALUE", result: -127 } - { left: -1, right: 0, result: -1 } - { left: -1, right: 1, result: 0 } -- { left: -1, right: "Byte.MIN_VALUE as byte", result: -129 } -- { left: -1, right: "Byte.MAX_VALUE as byte", result: 126 } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: -1 } +- { left: -1, right: "Byte.MIN_VALUE", result: -129 } +- { left: -1, right: "Byte.MAX_VALUE", result: 126 } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: -1 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/addition/addition_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/addition/addition_short.params.yaml index c266ed6e8b..1a2d0b8263 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/addition/addition_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/addition/addition_short.params.yaml @@ -16,12 +16,12 @@ values: - { left: 0, right: 1, result: 1 } - { left: 1, right: 1, result: 2 } - { left: 5827, right: 8011, result: 13838 } -- { left: 0, right: "Short.MAX_VALUE as short", result: "Short.MAX_VALUE as short" } -- { left: 1, right: "Short.MAX_VALUE as short", result: 32768 } -- { left: 0, right: "Short.MIN_VALUE as short", result: "Short.MIN_VALUE as short" } -- { left: 1, right: "Short.MIN_VALUE as short", result: -32767 } +- { left: 0, right: "Short.MAX_VALUE", result: "Short.MAX_VALUE" } +- { left: 1, right: "Short.MAX_VALUE", result: 32768 } +- { left: 0, right: "Short.MIN_VALUE", result: "Short.MIN_VALUE" } +- { left: 1, right: "Short.MIN_VALUE", result: -32767 } - { left: -1, right: 0, result: -1 } - { left: -1, right: 1, result: 0 } -- { left: -1, right: "Short.MIN_VALUE as short", result: -32769 } -- { left: -1, right: "Short.MAX_VALUE as short", result: 32766 } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: -1 } +- { left: -1, right: "Short.MIN_VALUE", result: -32769 } +- { left: -1, right: "Short.MAX_VALUE", result: 32766 } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: -1 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_and/bitwise_and_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_and/bitwise_and_byte.params.yaml index 158b27111e..28b3043c1d 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_and/bitwise_and_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_and/bitwise_and_byte.params.yaml @@ -17,9 +17,9 @@ values: - { left: 0, right: 1, result: 0 } - { left: 1, right: 1, result: 1 } - { left: -1, right: -1, result: -1 } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "Byte.MIN_VALUE as byte" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "Byte.MAX_VALUE as byte" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: 0 } +- { left: "Byte.MIN_VALUE", right: "Byte.MIN_VALUE", result: "Byte.MIN_VALUE" } +- { left: "Byte.MAX_VALUE", right: "Byte.MAX_VALUE", result: "Byte.MAX_VALUE" } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: 0 } - { left: 42, right: 42, result: 42 } - { left: 42, right: -42, result: 2 } - { left: 40, right: -40, result: 8 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_and/bitwise_and_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_and/bitwise_and_short.params.yaml index f5087904e6..60adaf9b61 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_and/bitwise_and_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_and/bitwise_and_short.params.yaml @@ -17,9 +17,9 @@ values: - { left: 0, right: 1, result: 0 } - { left: 1, right: 1, result: 1 } - { left: -1, right: -1, result: -1 } -- { left: "Short.MIN_VALUE as short", right: "Short.MIN_VALUE as short", result: "Short.MIN_VALUE as short" } -- { left: "Short.MAX_VALUE as short", right: "Short.MAX_VALUE as short", result: "Short.MAX_VALUE as short" } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: 0 } +- { left: "Short.MIN_VALUE", right: "Short.MIN_VALUE", result: "Short.MIN_VALUE" } +- { left: "Short.MAX_VALUE", right: "Short.MAX_VALUE", result: "Short.MAX_VALUE" } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: 0 } - { left: 42, right: 42, result: 42 } - { left: 42, right: -42, result: 2 } - { left: 40, right: -40, result: 8 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_complement/bitwise_complement_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_complement/bitwise_complement_byte.params.yaml index 7aad7b94ec..035ae79293 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_complement/bitwise_complement_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_complement/bitwise_complement_byte.params.yaml @@ -16,7 +16,7 @@ values: - { value: 0, result: -1 } - { value: 1, result: -2 } - { value: -1, result: 0 } -- { value: "Byte.MAX_VALUE as byte", result: "Byte.MIN_VALUE as byte" } -- { value: "Byte.MIN_VALUE as byte", result: "Byte.MAX_VALUE as byte" } +- { value: "Byte.MAX_VALUE", result: "Byte.MIN_VALUE" } +- { value: "Byte.MIN_VALUE", result: "Byte.MAX_VALUE" } - { value: 42, result: -43 } - { value: -42, result: 41 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_complement/bitwise_complement_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_complement/bitwise_complement_short.params.yaml index d6ef2c9fe6..9b642aa08b 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_complement/bitwise_complement_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_complement/bitwise_complement_short.params.yaml @@ -16,7 +16,7 @@ values: - { value: 0, result: -1 } - { value: 1, result: -2 } - { value: -1, result: 0 } -- { value: "Short.MAX_VALUE as short", result: "Short.MIN_VALUE as short" } -- { value: "Short.MIN_VALUE as short", result: "Short.MAX_VALUE as short" } +- { value: "Short.MAX_VALUE", result: "Short.MIN_VALUE" } +- { value: "Short.MIN_VALUE", result: "Short.MAX_VALUE" } - { value: 23245, result: -23246 } - { value: -23245, result: 23244 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_or/bitwise_or_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_or/bitwise_or_byte.params.yaml index 0545ce1d96..34c0b12ed6 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_or/bitwise_or_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_or/bitwise_or_byte.params.yaml @@ -17,9 +17,9 @@ values: - { left: 0, right: 1, result: 1 } - { left: 1, right: 1, result: 1 } - { left: -1, right: -1, result: -1 } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "Byte.MIN_VALUE as byte" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "Byte.MAX_VALUE as byte" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: -1 } +- { left: "Byte.MIN_VALUE", right: "Byte.MIN_VALUE", result: "Byte.MIN_VALUE" } +- { left: "Byte.MAX_VALUE", right: "Byte.MAX_VALUE", result: "Byte.MAX_VALUE" } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: -1 } - { left: 42, right: 42, result: 42 } - { left: 42, right: -42, result: -2 } - { left: 40, right: -40, result: -8 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_or/bitwise_or_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_or/bitwise_or_short.params.yaml index 5331fc105d..124007f860 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_or/bitwise_or_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_or/bitwise_or_short.params.yaml @@ -17,9 +17,9 @@ values: - { left: 0, right: 1, result: 1 } - { left: 1, right: 1, result: 1 } - { left: -1, right: -1, result: -1 } -- { left: "Short.MIN_VALUE as short", right: "Short.MIN_VALUE as short", result: "Short.MIN_VALUE as short" } -- { left: "Short.MAX_VALUE as short", right: "Short.MAX_VALUE as short", result: "Short.MAX_VALUE as short" } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: -1 } +- { left: "Short.MIN_VALUE", right: "Short.MIN_VALUE", result: "Short.MIN_VALUE" } +- { left: "Short.MAX_VALUE", right: "Short.MAX_VALUE", result: "Short.MAX_VALUE" } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: -1 } - { left: 42, right: 42, result: 42 } - { left: 42, right: -42, result: -2 } - { left: 40, right: -40, result: -8 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_xor/bitwise_xor_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_xor/bitwise_xor_byte.params.yaml index 7d4d47d1c1..0a6deb2257 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_xor/bitwise_xor_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_xor/bitwise_xor_byte.params.yaml @@ -17,10 +17,9 @@ values: - { left: 0, right: 1, result: 1 } - { left: 1, right: 1, result: 0 } - { left: -1, right: -1, result: 0 } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: 0 } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: 0 } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: -1 } +- { left: "Byte.MIN_VALUE", right: "Byte.MIN_VALUE", result: 0 } +- { left: "Byte.MAX_VALUE", right: "Byte.MAX_VALUE", result: 0 } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: -1 } - { left: 42, right: 42, result: 0 } - { left: 42, right: -42, result: -4 } - { left: 85, right: -86, result: -1 } - diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_xor/bitwise_xor_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_xor/bitwise_xor_short.params.yaml index b49a87434d..496eff964c 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_xor/bitwise_xor_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/bitwise_xor/bitwise_xor_short.params.yaml @@ -17,10 +17,9 @@ values: - { left: 0, right: 1, result: 1 } - { left: 1, right: 1, result: 0 } - { left: -1, right: -1, result: 0 } -- { left: "Short.MIN_VALUE as short", right: "Short.MIN_VALUE as short", result: 0 } -- { left: "Short.MAX_VALUE as short", right: "Short.MAX_VALUE as short", result: 0 } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: -1 } +- { left: "Short.MIN_VALUE", right: "Short.MIN_VALUE", result: 0 } +- { left: "Short.MAX_VALUE", right: "Short.MAX_VALUE", result: 0 } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: -1 } - { left: 5321, right: 5321, result: 0 } - { left: 5321, right: -5321, result: -2 } - { left: 21845, right: -21846, result: -1 } - diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/division/division_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/division/division_byte.params.yaml index 4494d40ac3..2692e2938e 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/division/division_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/division/division_byte.params.yaml @@ -17,10 +17,10 @@ values: - { left: 1, right: 1, result: 1 } - { left: -1, right: 1, result: -1 } - { left: 1, right: -1, result: -1 } -- { left: 1, right: "Byte.MAX_VALUE as byte", result: 0 } -- { left: 1, right: "Byte.MIN_VALUE as byte", result: 0 } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: 0 } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: -1 } +- { left: 1, right: "Byte.MAX_VALUE", result: 0 } +- { left: 1, right: "Byte.MIN_VALUE", result: 0 } +- { left: "Byte.MAX_VALUE", right: "Byte.MIN_VALUE", result: 0 } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: -1 } - { left: 112, right: 2, result: 56 } - { left: 113, right: 2, result: 56 } - { left: 126, right: 3, result: 42 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/division/division_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/division/division_short.params.yaml index d502e0d8f6..46a2e6bd77 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/division/division_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/division/division_short.params.yaml @@ -17,10 +17,10 @@ values: - { left: 1, right: 1, result: 1 } - { left: -1, right: 1, result: -1 } - { left: 1, right: -1, result: -1 } -- { left: 1, right: "Short.MAX_VALUE as short", result: 0 } -- { left: 1, right: "Short.MIN_VALUE as short", result: 0 } -- { left: "Short.MAX_VALUE as short", right: "Short.MIN_VALUE as short", result: 0 } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: -1 } +- { left: 1, right: "Short.MAX_VALUE", result: 0 } +- { left: 1, right: "Short.MIN_VALUE", result: 0 } +- { left: "Short.MAX_VALUE", right: "Short.MIN_VALUE", result: 0 } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: -1 } - { left: "0x7000", right: 2, result: "0x3800" } - { left: "0x7001", right: 2, result: "0x3800" } - { left: "0x7ffe", right: 3, result: "0x2aaa" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/equal/equal_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/equal/equal_byte.params.yaml index 205bd49f77..4b1ed1dfee 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/equal/equal_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/equal/equal_byte.params.yaml @@ -20,13 +20,13 @@ values: - { left: -1, right: 0, result: "false" } - { left: -1, right: -1, result: "true" } - { left: -1, right: 1, result: "false" } -- { left: "Byte.MIN_VALUE as byte", right: 0, result: "false" } -- { left: "Byte.MIN_VALUE as byte", right: 42, result: "false" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "false" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: 0, result: "false" } -- { left: "Byte.MAX_VALUE as byte", right: 42, result: "false" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "false" } +- { left: "Byte.MIN_VALUE", right: 0, result: "false" } +- { left: "Byte.MIN_VALUE", right: 42, result: "false" } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: "false" } +- { left: "Byte.MIN_VALUE", right: "Byte.MIN_VALUE", result: "true" } +- { left: "Byte.MAX_VALUE", right: 0, result: "false" } +- { left: "Byte.MAX_VALUE", right: 42, result: "false" } +- { left: "Byte.MAX_VALUE", right: "Byte.MAX_VALUE", result: "true" } +- { left: "Byte.MAX_VALUE", right: "Byte.MIN_VALUE", result: "false" } - { left: 81, right: 81, result: "true" } - { left: -81, right: -81, result: "true" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/equal/equal_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/equal/equal_short.params.yaml index dba0eb7339..c1da5cf992 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/equal/equal_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/equal/equal_short.params.yaml @@ -20,13 +20,13 @@ values: - { left: -1, right: 0, result: "false" } - { left: -1, right: -1, result: "true" } - { left: -1, right: 1, result: "false" } -- { left: "Short.MIN_VALUE as short", right: 0, result: "false" } -- { left: "Short.MIN_VALUE as short", right: 742, result: "false" } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: "false" } -- { left: "Short.MIN_VALUE as short", right: "Short.MIN_VALUE as short", result: "true" } -- { left: "Short.MAX_VALUE as short", right: 0, result: "false" } -- { left: "Short.MAX_VALUE as short", right: 742, result: "false" } -- { left: "Short.MAX_VALUE as short", right: "Short.MAX_VALUE as short", result: "true" } -- { left: "Short.MAX_VALUE as short", right: "Short.MIN_VALUE as short", result: "false" } +- { left: "Short.MIN_VALUE", right: 0, result: "false" } +- { left: "Short.MIN_VALUE", right: 742, result: "false" } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: "false" } +- { left: "Short.MIN_VALUE", right: "Short.MIN_VALUE", result: "true" } +- { left: "Short.MAX_VALUE", right: 0, result: "false" } +- { left: "Short.MAX_VALUE", right: 742, result: "false" } +- { left: "Short.MAX_VALUE", right: "Short.MAX_VALUE", result: "true" } +- { left: "Short.MAX_VALUE", right: "Short.MIN_VALUE", result: "false" } - { left: 5139, right: 5139, result: "true" } - { left: -5139, right: -5139, result: "true" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_or_equal/greater_or_equal_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_or_equal/greater_or_equal_byte.params.yaml index 9695f76663..6565c4180a 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_or_equal/greater_or_equal_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_or_equal/greater_or_equal_byte.params.yaml @@ -20,10 +20,10 @@ values: - { left: -1, right: 0, result: "false" } - { left: -1, right: -1, result: "true" } - { left: -1, right: 1, result: "false" } -- { left: "Byte.MAX_VALUE as byte", right: 0, result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: 92, result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: -1, result: "true" } +- { left: "Byte.MAX_VALUE", right: 0, result: "true" } +- { left: "Byte.MAX_VALUE", right: 92, result: "true" } +- { left: "Byte.MAX_VALUE", right: "Byte.MAX_VALUE", result: "true" } +- { left: "Byte.MAX_VALUE", right: "Byte.MIN_VALUE", result: "true" } +- { left: "Byte.MAX_VALUE", right: -1, result: "true" } - { left: 78, right: 78, result: "true" } - { left: 78, right: -78, result: "true" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_or_equal/greater_or_equal_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_or_equal/greater_or_equal_short.params.yaml index 929f57c112..1ec822b7b1 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_or_equal/greater_or_equal_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_or_equal/greater_or_equal_short.params.yaml @@ -20,10 +20,10 @@ values: - { left: -1, right: 0, result: "false" } - { left: -1, right: -1, result: "true" } - { left: -1, right: 1, result: "false" } -- { left: "Short.MAX_VALUE as short", right: 0, result: "true" } -- { left: "Short.MAX_VALUE as short", right: 9278, result: "true" } -- { left: "Short.MAX_VALUE as short", right: "Short.MAX_VALUE as short", result: "true" } -- { left: "Short.MAX_VALUE as short", right: "Short.MIN_VALUE as short", result: "true" } -- { left: "Short.MAX_VALUE as short", right: -1, result: "true" } +- { left: "Short.MAX_VALUE", right: 0, result: "true" } +- { left: "Short.MAX_VALUE", right: 9278, result: "true" } +- { left: "Short.MAX_VALUE", right: "Short.MAX_VALUE", result: "true" } +- { left: "Short.MAX_VALUE", right: "Short.MIN_VALUE", result: "true" } +- { left: "Short.MAX_VALUE", right: -1, result: "true" } - { left: 27831, right: 27831, result: "true" } - { left: 27831, right: -27831, result: "true" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_than/greater_than_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_than/greater_than_byte.params.yaml index 2dff5ba459..08b3abea68 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_than/greater_than_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_than/greater_than_byte.params.yaml @@ -18,10 +18,10 @@ values: - { left: 1, right: 0, result: "true" } - { left: -1, right: 0, result: "false" } - { left: 0, right: -1, result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: 0, result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: 42, result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "false" } -- { left: "Byte.MAX_VALUE as byte", right: -1, result: "true" } +- { left: "Byte.MAX_VALUE", right: 0, result: "true" } +- { left: "Byte.MAX_VALUE", right: 42, result: "true" } +- { left: "Byte.MAX_VALUE", right: "Byte.MIN_VALUE", result: "true" } +- { left: "Byte.MAX_VALUE", right: "Byte.MAX_VALUE", result: "false" } +- { left: "Byte.MAX_VALUE", right: -1, result: "true" } - { left: 32, right: 32, result: "false" } - { left: 32, right: -32, result: "true" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_than/greater_than_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_than/greater_than_short.params.yaml index 70416bea7a..1566ce162e 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_than/greater_than_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/greater_than/greater_than_short.params.yaml @@ -18,10 +18,10 @@ values: - { left: 1, right: 0, result: "true" } - { left: -1, right: 0, result: "false" } - { left: 0, right: -1, result: "true" } -- { left: "Short.MAX_VALUE as short", right: 0, result: "true" } -- { left: "Short.MAX_VALUE as short", right: 4231, result: "true" } -- { left: "Short.MAX_VALUE as short", right: "Short.MIN_VALUE as short", result: "true" } -- { left: "Short.MAX_VALUE as short", right: "Short.MAX_VALUE as short", result: "false" } -- { left: "Short.MAX_VALUE as short", right: -1, result: "true" } +- { left: "Short.MAX_VALUE", right: 0, result: "true" } +- { left: "Short.MAX_VALUE", right: 4231, result: "true" } +- { left: "Short.MAX_VALUE", right: "Short.MIN_VALUE", result: "true" } +- { left: "Short.MAX_VALUE", right: "Short.MAX_VALUE", result: "false" } +- { left: "Short.MAX_VALUE", right: -1, result: "true" } - { left: 30101, right: 30101, result: "false" } - { left: 30101, right: -30101, result: "true" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/left_shift/left_shift_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/left_shift/left_shift_byte.params.yaml index bf06fc09fe..bebcf9b818 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/left_shift/left_shift_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/left_shift/left_shift_byte.params.yaml @@ -18,10 +18,10 @@ values: - { left: 1, right: 1, result: 2 } - { left: 1, right: 30, result: '0x40000000' } - { left: 1, right: 31, result: Int.MIN_VALUE } -- { left: "Byte.MIN_VALUE as byte", right: 1, result: -256 } -- { left: "Byte.MIN_VALUE as byte", right: 31, result: 0 } -- { left: "Byte.MAX_VALUE as byte", right: 1, result: 254 } -- { left: "Byte.MAX_VALUE as byte", right: 31, result: Int.MIN_VALUE } +- { left: "Byte.MIN_VALUE", right: 1, result: -256 } +- { left: "Byte.MIN_VALUE", right: 31, result: 0 } +- { left: "Byte.MAX_VALUE", right: 1, result: 254 } +- { left: "Byte.MAX_VALUE", right: 31, result: Int.MIN_VALUE } - { left: 0, right: 0, result: 0 } - { left: 1, right: 0, result: 1 } - { left: -1, right: 0, result: -1 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/left_shift/left_shift_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/left_shift/left_shift_short.params.yaml index a6701f47a2..c3a5d78765 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/left_shift/left_shift_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/left_shift/left_shift_short.params.yaml @@ -18,10 +18,10 @@ values: - { left: 1, right: 1, result: 2 } - { left: 1, right: 30, result: '0x40000000' } - { left: 1, right: 31, result: Int.MIN_VALUE } -- { left: "Short.MIN_VALUE as short", right: 1, result: -65536 } -- { left: "Short.MIN_VALUE as short", right: 31, result: 0 } -- { left: "Short.MAX_VALUE as short", right: 1, result: 65534 } -- { left: "Short.MAX_VALUE as short", right: 31, result: Int.MIN_VALUE } +- { left: "Short.MIN_VALUE", right: 1, result: -65536 } +- { left: "Short.MIN_VALUE", right: 31, result: 0 } +- { left: "Short.MAX_VALUE", right: 1, result: 65534 } +- { left: "Short.MAX_VALUE", right: 31, result: Int.MIN_VALUE } - { left: 0, right: 0, result: 0 } - { left: 1, right: 0, result: 1 } - { left: -1, right: 0, result: -1 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_or_equal/less_or_equal_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_or_equal/less_or_equal_byte.params.yaml index f4fab68a80..2c327572bd 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_or_equal/less_or_equal_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_or_equal/less_or_equal_byte.params.yaml @@ -20,10 +20,10 @@ values: - { left: -1, right: 0, result: "true" } - { left: -1, right: -1, result: "true" } - { left: -1, right: 1, result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: 0, result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: 42, result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: -1, result: "true" } +- { left: "Byte.MIN_VALUE", right: 0, result: "true" } +- { left: "Byte.MIN_VALUE", right: 42, result: "true" } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: "true" } +- { left: "Byte.MIN_VALUE", right: "Byte.MIN_VALUE", result: "true" } +- { left: "Byte.MIN_VALUE", right: -1, result: "true" } - { left: -42, right: 42, result: "true" } - { left: -42, right: -42, result: "true" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_or_equal/less_or_equal_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_or_equal/less_or_equal_short.params.yaml index 57cd7baa8c..f00e711e70 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_or_equal/less_or_equal_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_or_equal/less_or_equal_short.params.yaml @@ -20,10 +20,10 @@ values: - { left: -1, right: 0, result: "true" } - { left: -1, right: -1, result: "true" } - { left: -1, right: 1, result: "true" } -- { left: "Short.MIN_VALUE as short", right: 0, result: "true" } -- { left: "Short.MIN_VALUE as short", right: 31001, result: "true" } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: "true" } -- { left: "Short.MIN_VALUE as short", right: "Short.MIN_VALUE as short", result: "true" } -- { left: "Short.MIN_VALUE as short", right: -1, result: "true" } +- { left: "Short.MIN_VALUE", right: 0, result: "true" } +- { left: "Short.MIN_VALUE", right: 31001, result: "true" } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: "true" } +- { left: "Short.MIN_VALUE", right: "Short.MIN_VALUE", result: "true" } +- { left: "Short.MIN_VALUE", right: -1, result: "true" } - { left: -3120, right: 3120, result: "true" } - { left: 3120, right: 3120, result: "true" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_than/less_than_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_than/less_than_byte.params.yaml index 0b39f4e83d..8cf9b52811 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_than/less_than_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_than/less_than_byte.params.yaml @@ -18,10 +18,10 @@ values: - { left: 1, right: 0, result: "false" } - { left: -1, right: 0, result: "true" } - { left: 0, right: -1, result: "false" } -- { left: "Byte.MIN_VALUE as byte", right: 0, result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: 42, result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "false" } -- { left: "Byte.MIN_VALUE as byte", right: -1, result: "true" } +- { left: "Byte.MIN_VALUE", right: 0, result: "true" } +- { left: "Byte.MIN_VALUE", right: 42, result: "true" } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: "true" } +- { left: "Byte.MIN_VALUE", right: "Byte.MIN_VALUE", result: "false" } +- { left: "Byte.MIN_VALUE", right: -1, result: "true" } - { left: -32, right: 32, result: "true" } - { left: 32, right: 32, result: "false" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_than/less_than_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_than/less_than_short.params.yaml index 553dcd0525..fbe91a1193 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_than/less_than_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/less_than/less_than_short.params.yaml @@ -18,10 +18,10 @@ values: - { left: 1, right: 0, result: "false" } - { left: -1, right: 0, result: "true" } - { left: 0, right: -1, result: "false" } -- { left: "Short.MIN_VALUE as short", right: 0, result: "true" } -- { left: "Short.MIN_VALUE as short", right: 20301, result: "true" } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: "true" } -- { left: "Short.MIN_VALUE as short", right: "Short.MIN_VALUE as short", result: "false" } -- { left: "Short.MIN_VALUE as short", right: -1, result: "true" } +- { left: "Short.MIN_VALUE", right: 0, result: "true" } +- { left: "Short.MIN_VALUE", right: 20301, result: "true" } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: "true" } +- { left: "Short.MIN_VALUE", right: "Short.MIN_VALUE", result: "false" } +- { left: "Short.MIN_VALUE", right: -1, result: "true" } - { left: -30303, right: 30303, result: "true" } - { left: 30303, right: 30303, result: "false" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/multiplication/multiplication_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/multiplication/multiplication_byte.params.yaml index bbec5f3b97..e7c4cf4643 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/multiplication/multiplication_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/multiplication/multiplication_byte.params.yaml @@ -16,15 +16,15 @@ values: - { left: 0, right: 1, result: 0 } - { left: 1, right: 1, result: 1 } - { left: 122, right: 87, result: 10614 } -- { left: 0, right: "Byte.MAX_VALUE as byte", result: 0 } -- { left: 1, right: "Byte.MAX_VALUE as byte", result: "Byte.MAX_VALUE as byte" } -- { left: 0, right: "Byte.MIN_VALUE as byte", result: 0 } -- { left: 1, right: "Byte.MIN_VALUE as byte", result: "Byte.MIN_VALUE as byte" } +- { left: 0, right: "Byte.MAX_VALUE", result: 0 } +- { left: 1, right: "Byte.MAX_VALUE", result: "Byte.MAX_VALUE" } +- { left: 0, right: "Byte.MIN_VALUE", result: 0 } +- { left: 1, right: "Byte.MIN_VALUE", result: "Byte.MIN_VALUE" } - { left: -1, right: 0, result: 0 } - { left: -1, right: 1, result: -1 } - { left: -1, right: -1, result: 1 } -- { left: -1, right: "Byte.MIN_VALUE as byte", result: 128 } -- { left: -1, right: "Byte.MAX_VALUE as byte", result: -127 } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: 16129 } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: 16384 } +- { left: -1, right: "Byte.MIN_VALUE", result: 128 } +- { left: -1, right: "Byte.MAX_VALUE", result: -127 } +- { left: "Byte.MAX_VALUE", right: "Byte.MAX_VALUE", result: 16129 } +- { left: "Byte.MIN_VALUE", right: "Byte.MIN_VALUE", result: 16384 } - { left: 0x40, right: 2, result: 128 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/multiplication/multiplication_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/multiplication/multiplication_short.params.yaml index 5209b7be43..bed3da8438 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/multiplication/multiplication_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/multiplication/multiplication_short.params.yaml @@ -16,15 +16,15 @@ values: - { left: 0, right: 1, result: 0 } - { left: 1, right: 1, result: 1 } - { left: 29513, right: 17524, result: 517185812 } -- { left: 0, right: "Short.MAX_VALUE as short", result: 0 } -- { left: 1, right: "Short.MAX_VALUE as short", result: "Short.MAX_VALUE as short" } -- { left: 0, right: "Short.MIN_VALUE as short", result: 0 } -- { left: 1, right: "Short.MIN_VALUE as short", result: "Short.MIN_VALUE as short" } +- { left: 0, right: "Short.MAX_VALUE", result: 0 } +- { left: 1, right: "Short.MAX_VALUE", result: "Short.MAX_VALUE" } +- { left: 0, right: "Short.MIN_VALUE", result: 0 } +- { left: 1, right: "Short.MIN_VALUE", result: "Short.MIN_VALUE" } - { left: -1, right: 0, result: 0 } - { left: -1, right: 1, result: -1 } - { left: -1, right: -1, result: 1 } -- { left: -1, right: "Short.MIN_VALUE as short", result: 32768 } -- { left: -1, right: "Short.MAX_VALUE as short", result: -32767 } -- { left: "Short.MAX_VALUE as short", right: "Short.MAX_VALUE as short", result: 1073676289 } -- { left: "Short.MIN_VALUE as short", right: "Short.MIN_VALUE as short", result: 1073741824 } +- { left: -1, right: "Short.MIN_VALUE", result: 32768 } +- { left: -1, right: "Short.MAX_VALUE", result: -32767 } +- { left: "Short.MAX_VALUE", right: "Short.MAX_VALUE", result: 1073676289 } +- { left: "Short.MIN_VALUE", right: "Short.MIN_VALUE", result: 1073741824 } - { left: 0x4000, right: 2, result: 32768 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/not_equal/not_equal_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/not_equal/not_equal_byte.params.yaml index 7fff3319e3..d16601b8be 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/not_equal/not_equal_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/not_equal/not_equal_byte.params.yaml @@ -20,12 +20,12 @@ values: - { left: -1, right: 0, result: "true" } - { left: -1, right: -1, result: "false" } - { left: -1, right: 1, result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: 0, result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: 42, result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "true" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "false" } -- { left: "Byte.MAX_VALUE as byte", right: 0, result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: 42, result: "true" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: "false" } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "true" } +- { left: "Byte.MIN_VALUE", right: 0, result: "true" } +- { left: "Byte.MIN_VALUE", right: 42, result: "true" } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: "true" } +- { left: "Byte.MIN_VALUE", right: "Byte.MIN_VALUE", result: "false" } +- { left: "Byte.MAX_VALUE", right: 0, result: "true" } +- { left: "Byte.MAX_VALUE", right: 42, result: "true" } +- { left: "Byte.MAX_VALUE", right: "Byte.MAX_VALUE", result: "false" } +- { left: "Byte.MAX_VALUE", right: "Byte.MIN_VALUE", result: "true" } - { left: 42, right: 42, result: "false" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/not_equal/not_equal_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/not_equal/not_equal_short.params.yaml index 2333b7a80c..cb2ac98bc1 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/not_equal/not_equal_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/not_equal/not_equal_short.params.yaml @@ -20,12 +20,12 @@ values: - { left: -1, right: 0, result: "true" } - { left: -1, right: -1, result: "false" } - { left: -1, right: 1, result: "true" } -- { left: "Short.MIN_VALUE as short", right: 0, result: "true" } -- { left: "Short.MIN_VALUE as short", right: 21198, result: "true" } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: "true" } -- { left: "Short.MIN_VALUE as short", right: "Short.MIN_VALUE as short", result: "false" } -- { left: "Short.MAX_VALUE as short", right: 0, result: "true" } -- { left: "Short.MAX_VALUE as short", right: 30221, result: "true" } -- { left: "Short.MAX_VALUE as short", right: "Short.MAX_VALUE as short", result: "false" } -- { left: "Short.MAX_VALUE as short", right: "Short.MIN_VALUE as short", result: "true" } +- { left: "Short.MIN_VALUE", right: 0, result: "true" } +- { left: "Short.MIN_VALUE", right: 21198, result: "true" } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: "true" } +- { left: "Short.MIN_VALUE", right: "Short.MIN_VALUE", result: "false" } +- { left: "Short.MAX_VALUE", right: 0, result: "true" } +- { left: "Short.MAX_VALUE", right: 30221, result: "true" } +- { left: "Short.MAX_VALUE", right: "Short.MAX_VALUE", result: "false" } +- { left: "Short.MAX_VALUE", right: "Short.MIN_VALUE", result: "true" } - { left: 14678, right: 14678, result: "false" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_decrement/postfix_decrement_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_decrement/postfix_decrement_byte.params.yaml index 8f1a323871..b356383a63 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_decrement/postfix_decrement_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_decrement/postfix_decrement_byte.params.yaml @@ -16,7 +16,7 @@ values: - { value: 1, result: 0 } - { value: 2, result: 1 } - { value: 0, result: -1 } -- { value: "Byte.MIN_VALUE as byte", result: "Byte.MAX_VALUE as byte" } -- { value: "Byte.MAX_VALUE as byte", result: 126 } +- { value: "Byte.MIN_VALUE", result: "Byte.MAX_VALUE" } +- { value: "Byte.MAX_VALUE", result: 126 } - { value: 123, result: 122 } - { value: -123, result: -124 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_decrement/postfix_decrement_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_decrement/postfix_decrement_short.params.yaml index be7c50ec00..99f34b5e10 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_decrement/postfix_decrement_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_decrement/postfix_decrement_short.params.yaml @@ -16,7 +16,7 @@ values: - { value: 1, result: 0 } - { value: 2, result: 1 } - { value: 0, result: -1 } -- { value: "Short.MIN_VALUE as short", result: "Short.MAX_VALUE as short" } -- { value: "Short.MAX_VALUE as short", result: 32766 } +- { value: "Short.MIN_VALUE", result: "Short.MAX_VALUE" } +- { value: "Short.MAX_VALUE", result: 32766 } - { value: 23456, result: 23455 } - { value: -23456, result: -23457 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_increment/postfix_increment_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_increment/postfix_increment_byte.params.yaml index e85e90f572..2b59957b6d 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_increment/postfix_increment_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_increment/postfix_increment_byte.params.yaml @@ -16,7 +16,7 @@ values: - { value: 0, result: 1 } - { value: 1, result: 2 } - { value: -1, result: 0 } -- { value: "Byte.MIN_VALUE as byte", result: -127 } -- { value: "Byte.MAX_VALUE as byte", result: "Byte.MIN_VALUE as byte" } +- { value: "Byte.MIN_VALUE", result: -127 } +- { value: "Byte.MAX_VALUE", result: "Byte.MIN_VALUE" } - { value: 42, result: 43 } - { value: -42, result: -41 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_increment/postfix_increment_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_increment/postfix_increment_short.params.yaml index acc22a3266..dcc585bbae 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_increment/postfix_increment_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/postfix_increment/postfix_increment_short.params.yaml @@ -16,7 +16,7 @@ values: - { value: 0, result: 1 } - { value: 1, result: 2 } - { value: -1, result: 0 } -- { value: "Short.MIN_VALUE as short", result: -32767 } -- { value: "Short.MAX_VALUE as short", result: "Short.MIN_VALUE as short" } +- { value: "Short.MIN_VALUE", result: -32767 } +- { value: "Short.MAX_VALUE", result: "Short.MIN_VALUE" } - { value: 12345, result: 12346 } - { value: -12345, result: -12344 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_decrement/prefix_decrement_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_decrement/prefix_decrement_byte.params.yaml index d29d2332cd..f24a1512f0 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_decrement/prefix_decrement_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_decrement/prefix_decrement_byte.params.yaml @@ -16,7 +16,7 @@ values: - { value: 1, result: 0 } - { value: 2, result: 1 } - { value: 0, result: -1 } -- { value: "Byte.MIN_VALUE as byte", result: "Byte.MAX_VALUE as byte" } -- { value: "Byte.MAX_VALUE as byte", result: 126 } +- { value: "Byte.MIN_VALUE", result: "Byte.MAX_VALUE" } +- { value: "Byte.MAX_VALUE", result: 126 } - { value: 42, result: 41 } - { value: -42, result: -43 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_decrement/prefix_decrement_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_decrement/prefix_decrement_short.params.yaml index 54cd2058ab..4506b36f6b 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_decrement/prefix_decrement_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_decrement/prefix_decrement_short.params.yaml @@ -16,7 +16,7 @@ values: - { value: 1, result: 0 } - { value: 2, result: 1 } - { value: 0, result: -1 } -- { value: "Short.MIN_VALUE as short", result: "Short.MAX_VALUE as short" } -- { value: "Short.MAX_VALUE as short", result: 32766 } +- { value: "Short.MIN_VALUE", result: "Short.MAX_VALUE" } +- { value: "Short.MAX_VALUE", result: 32766 } - { value: 25679, result: 25678 } - { value: -25679, result: -25680 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_increment/prefix_increment_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_increment/prefix_increment_byte.params.yaml index e85e90f572..2b59957b6d 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_increment/prefix_increment_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_increment/prefix_increment_byte.params.yaml @@ -16,7 +16,7 @@ values: - { value: 0, result: 1 } - { value: 1, result: 2 } - { value: -1, result: 0 } -- { value: "Byte.MIN_VALUE as byte", result: -127 } -- { value: "Byte.MAX_VALUE as byte", result: "Byte.MIN_VALUE as byte" } +- { value: "Byte.MIN_VALUE", result: -127 } +- { value: "Byte.MAX_VALUE", result: "Byte.MIN_VALUE" } - { value: 42, result: 43 } - { value: -42, result: -41 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_increment/prefix_increment_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_increment/prefix_increment_short.params.yaml index 20cfeb59fa..5a141e011b 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_increment/prefix_increment_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/prefix_increment/prefix_increment_short.params.yaml @@ -16,7 +16,7 @@ values: - { value: 0, result: 1 } - { value: 1, result: 2 } - { value: -1, result: 0 } -- { value: "Short.MIN_VALUE as short", result: -32767 } -- { value: "Short.MAX_VALUE as short", result: "Short.MIN_VALUE as short" } +- { value: "Short.MIN_VALUE", result: -32767 } +- { value: "Short.MAX_VALUE", result: "Short.MIN_VALUE" } - { value: 29861, result: 29862 } - { value: -29861, result: -29860 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/remainder/remainder_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/remainder/remainder_byte.params.yaml index 6ae3404cc3..367826b74c 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/remainder/remainder_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/remainder/remainder_byte.params.yaml @@ -17,12 +17,12 @@ values: - { left: 1, right: 1, result: 0 } - { left: -1, right: 1, result: 0 } - { left: 1, right: -1, result: 0 } -- { left: 1, right: "Byte.MAX_VALUE as byte", result: 1 } -- { left: 1, right: "Byte.MIN_VALUE as byte", result: 1 } -- { left: -1, right: "Byte.MAX_VALUE as byte", result: -1 } -- { left: -1, right: "Byte.MIN_VALUE as byte", result: -1 } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: "Byte.MAX_VALUE as byte" } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: -1 } +- { left: 1, right: "Byte.MAX_VALUE", result: 1 } +- { left: 1, right: "Byte.MIN_VALUE", result: 1 } +- { left: -1, right: "Byte.MAX_VALUE", result: -1 } +- { left: -1, right: "Byte.MIN_VALUE", result: -1 } +- { left: "Byte.MAX_VALUE", right: "Byte.MIN_VALUE", result: "Byte.MAX_VALUE" } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: -1 } - { left: "0x70", right: 2, result: 0 } - { left: "0x71", right: 2, result: 1 } - { left: "0x7e", right: 3, result: 0 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/remainder/remainder_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/remainder/remainder_short.params.yaml index f2f1795812..342f303bf2 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/remainder/remainder_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/remainder/remainder_short.params.yaml @@ -17,12 +17,12 @@ values: - { left: 1, right: 1, result: 0 } - { left: -1, right: 1, result: 0 } - { left: 1, right: -1, result: 0 } -- { left: 1, right: "Short.MAX_VALUE as short", result: 1 } -- { left: 1, right: "Short.MIN_VALUE as short", result: 1 } -- { left: -1, right: "Short.MAX_VALUE as short", result: -1 } -- { left: -1, right: "Short.MIN_VALUE as short", result: -1 } -- { left: "Short.MAX_VALUE as short", right: "Short.MIN_VALUE as short", result: "Short.MAX_VALUE as short" } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: -1 } +- { left: 1, right: "Short.MAX_VALUE", result: 1 } +- { left: 1, right: "Short.MIN_VALUE", result: 1 } +- { left: -1, right: "Short.MAX_VALUE", result: -1 } +- { left: -1, right: "Short.MIN_VALUE", result: -1 } +- { left: "Short.MAX_VALUE", right: "Short.MIN_VALUE", result: "Short.MAX_VALUE" } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: -1 } - { left: "0x7000", right: 2, result: 0 } - { left: "0x7001", right: 2, result: 1 } - { left: "0x7ffe", right: 3, result: 0 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/right_shift/right_shift_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/right_shift/right_shift_byte.params.yaml index 5244dc4f24..13696c23c4 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/right_shift/right_shift_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/right_shift/right_shift_byte.params.yaml @@ -19,11 +19,11 @@ values: - { left: 1, right: 31, result: 0 } - { left: -1, right: 1, result: -1 } - { left: -1, right: 31, result: -1 } -- { left: "Byte.MIN_VALUE as byte", right: 1, result: -64 } -- { left: "Byte.MIN_VALUE as byte", right: 31, result: -1 } -- { left: "Byte.MAX_VALUE as byte", right: 1, result: 63 } -- { left: "Byte.MAX_VALUE as byte", right: 6, result: 1 } -- { left: "Byte.MAX_VALUE as byte", right: 7, result: 0 } +- { left: "Byte.MIN_VALUE", right: 1, result: -64 } +- { left: "Byte.MIN_VALUE", right: 31, result: -1 } +- { left: "Byte.MAX_VALUE", right: 1, result: 63 } +- { left: "Byte.MAX_VALUE", right: 6, result: 1 } +- { left: "Byte.MAX_VALUE", right: 7, result: 0 } - { left: 63, right: 2, result: 15 } - { left: 1, right: 0, result: 1 } - { left: -1, right: 0, result: -1 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/right_shift/right_shift_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/right_shift/right_shift_short.params.yaml index 47ce03d519..88f824e8fe 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/right_shift/right_shift_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/right_shift/right_shift_short.params.yaml @@ -19,11 +19,11 @@ values: - { left: 1, right: 31, result: 0 } - { left: -1, right: 1, result: -1 } - { left: -1, right: 31, result: -1 } -- { left: "Short.MIN_VALUE as short", right: 1, result: -16384 } -- { left: "Short.MIN_VALUE as short", right: 31, result: -1 } -- { left: "Short.MAX_VALUE as short", right: 1, result: 16383 } -- { left: "Short.MAX_VALUE as short", right: 14, result: 1 } -- { left: "Short.MAX_VALUE as short", right: 15, result: 0 } +- { left: "Short.MIN_VALUE", right: 1, result: -16384 } +- { left: "Short.MIN_VALUE", right: 31, result: -1 } +- { left: "Short.MAX_VALUE", right: 1, result: 16383 } +- { left: "Short.MAX_VALUE", right: 14, result: 1 } +- { left: "Short.MAX_VALUE", right: 15, result: 0 } - { left: 16383, right: 2, result: 4095 } - { left: 1, right: 0, result: 1 } - { left: -1, right: 0, result: -1 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/subtraction/subtraction_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/subtraction/subtraction_byte.params.yaml index 880de3974f..e9d629fea4 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/subtraction/subtraction_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/subtraction/subtraction_byte.params.yaml @@ -16,13 +16,13 @@ values: - { left: 1, right: 0, result: 1 } - { left: 1, right: 1, result: 0 } - { left: 86, right: 105, result: -19 } -- { left: "Byte.MAX_VALUE as byte", right: 0, result: "Byte.MAX_VALUE as byte" } -- { left: "Byte.MAX_VALUE as byte", right: 1, result: 126 } -- { left: "Byte.MIN_VALUE as byte", right: 0, result: "Byte.MIN_VALUE as byte" } -- { left: "Byte.MIN_VALUE as byte", right: 1, result: -129 } +- { left: "Byte.MAX_VALUE", right: 0, result: "Byte.MAX_VALUE" } +- { left: "Byte.MAX_VALUE", right: 1, result: 126 } +- { left: "Byte.MIN_VALUE", right: 0, result: "Byte.MIN_VALUE" } +- { left: "Byte.MIN_VALUE", right: 1, result: -129 } - { left: -1, right: 0, result: -1 } - { left: -1, right: 1, result: -2 } -- { left: "Byte.MIN_VALUE as byte", right: -1, result: -127 } -- { left: "Byte.MAX_VALUE as byte", right: -1, result: 128 } -- { left: "Byte.MIN_VALUE as byte", right: "Byte.MAX_VALUE as byte", result: -255 } -- { left: "Byte.MAX_VALUE as byte", right: "Byte.MIN_VALUE as byte", result: 255 } +- { left: "Byte.MIN_VALUE", right: -1, result: -127 } +- { left: "Byte.MAX_VALUE", right: -1, result: 128 } +- { left: "Byte.MIN_VALUE", right: "Byte.MAX_VALUE", result: -255 } +- { left: "Byte.MAX_VALUE", right: "Byte.MIN_VALUE", result: 255 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/subtraction/subtraction_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/subtraction/subtraction_short.params.yaml index 0df846ed72..ac431bdb87 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/subtraction/subtraction_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/subtraction/subtraction_short.params.yaml @@ -16,13 +16,13 @@ values: - { left: 1, right: 0, result: 1 } - { left: 1, right: 1, result: 0 } - { left: 31773, right: 20551, result: 11222 } -- { left: "Short.MAX_VALUE as short", right: 0, result: "Short.MAX_VALUE as short" } -- { left: "Short.MAX_VALUE as short", right: 1, result: 32766 } -- { left: "Short.MIN_VALUE as short", right: 0, result: "Short.MIN_VALUE as short" } -- { left: "Short.MIN_VALUE as short", right: 1, result: -32769 } +- { left: "Short.MAX_VALUE", right: 0, result: "Short.MAX_VALUE" } +- { left: "Short.MAX_VALUE", right: 1, result: 32766 } +- { left: "Short.MIN_VALUE", right: 0, result: "Short.MIN_VALUE" } +- { left: "Short.MIN_VALUE", right: 1, result: -32769 } - { left: -1, right: 0, result: -1 } - { left: -1, right: 1, result: -2 } -- { left: "Short.MIN_VALUE as short", right: -1, result: -32767 } -- { left: "Short.MAX_VALUE as short", right: -1, result: 32768 } -- { left: "Short.MIN_VALUE as short", right: "Short.MAX_VALUE as short", result: -65535 } -- { left: "Short.MAX_VALUE as short", right: "Short.MIN_VALUE as short", result: 65535 } +- { left: "Short.MIN_VALUE", right: -1, result: -32767 } +- { left: "Short.MAX_VALUE", right: -1, result: 32768 } +- { left: "Short.MIN_VALUE", right: "Short.MAX_VALUE", result: -65535 } +- { left: "Short.MAX_VALUE", right: "Short.MIN_VALUE", result: 65535 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_minus/unary_minus_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_minus/unary_minus_byte.params.yaml index 8d25f41938..6e4363506e 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_minus/unary_minus_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_minus/unary_minus_byte.params.yaml @@ -16,7 +16,7 @@ values: - { value: 0, result: 0 } - { value: 1, result: -1 } - { value: -1, result: 1 } -- { value: "Byte.MAX_VALUE as byte", result: -127 } -- { value: "Byte.MIN_VALUE as byte", result: 128 } +- { value: "Byte.MAX_VALUE", result: -127 } +- { value: "Byte.MIN_VALUE", result: 128 } - { value: 42, result: -42 } - { value: -42, result: 42 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_minus/unary_minus_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_minus/unary_minus_short.params.yaml index 685fdc39ba..8ea1fab323 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_minus/unary_minus_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_minus/unary_minus_short.params.yaml @@ -16,7 +16,7 @@ values: - { value: 0, result: 0 } - { value: 1, result: -1 } - { value: -1, result: 1 } -- { value: "Short.MAX_VALUE as short", result: -32767 } -- { value: "Short.MIN_VALUE as short", result: 32768 } +- { value: "Short.MAX_VALUE", result: -32767 } +- { value: "Short.MIN_VALUE", result: 32768 } - { value: 31123, result: -31123 } - { value: -31123, result: 31123 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_plus/unary_plus_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_plus/unary_plus_byte.params.yaml index f09c3e7d0c..1848cc2648 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_plus/unary_plus_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_plus/unary_plus_byte.params.yaml @@ -16,6 +16,6 @@ values: - { value: 0, result: 0 } - { value: 1, result: 1 } - { value: -1, result: -1 } -- { value: "Byte.MAX_VALUE as byte", result: "Byte.MAX_VALUE as byte" } -- { value: "Byte.MIN_VALUE as byte", result: "Byte.MIN_VALUE as byte" } +- { value: "Byte.MAX_VALUE", result: "Byte.MAX_VALUE" } +- { value: "Byte.MIN_VALUE", result: "Byte.MIN_VALUE" } - { value: 42, result: 42 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_plus/unary_plus_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_plus/unary_plus_short.params.yaml index ce2f4f4a24..7b2023a6a6 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_plus/unary_plus_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unary_plus/unary_plus_short.params.yaml @@ -16,6 +16,6 @@ values: - { value: 0, result: 0 } - { value: 1, result: 1 } - { value: -1, result: -1 } -- { value: "Short.MAX_VALUE as short", result: "Short.MAX_VALUE as short" } -- { value: "Short.MIN_VALUE as short", result: "Short.MIN_VALUE as short" } +- { value: "Short.MAX_VALUE", result: "Short.MAX_VALUE" } +- { value: "Short.MIN_VALUE", result: "Short.MIN_VALUE" } - { value: 31697, result: 31697 } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unsigned_right_shift/unsigned_right_shift_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unsigned_right_shift/unsigned_right_shift_byte.params.yaml index 62719bec65..d0e5337d88 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unsigned_right_shift/unsigned_right_shift_byte.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unsigned_right_shift/unsigned_right_shift_byte.params.yaml @@ -20,11 +20,11 @@ values: - { left: -1, right: 1, result: Int.MAX_VALUE } - { left: -1, right: 31, result: 1 } - { left: -1, right: 30, result: 3 } -- { left: "Byte.MIN_VALUE as byte", right: 1, result: "0x40" } -- { left: "Byte.MIN_VALUE as byte", right: 31, result: 1 } -- { left: "Byte.MAX_VALUE as byte", right: 1, result: 63 } -- { left: "Byte.MAX_VALUE as byte", right: 6, result: 1 } -- { left: "Byte.MAX_VALUE as byte", right: 7, result: 0 } +- { left: "Byte.MIN_VALUE", right: 1, result: "0x40" } +- { left: "Byte.MIN_VALUE", right: 31, result: 1 } +- { left: "Byte.MAX_VALUE", right: 1, result: 63 } +- { left: "Byte.MAX_VALUE", right: 6, result: 1 } +- { left: "Byte.MAX_VALUE", right: 7, result: 0 } - { left: 63, right: 2, result: 15 } - { left: 1, right: 0, result: 1 } - { left: -1, right: 0, result: -1 } @@ -32,4 +32,4 @@ values: - { left: 1, right: -1, result: 0 } - { left: 0, right: -1, result: 0 } - { left: -1, right: -2, result: 3 } -- { left: -1, right: -7, result: "Byte.MAX_VALUE as byte" } +- { left: -1, right: -7, result: "Byte.MAX_VALUE" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unsigned_right_shift/unsigned_right_shift_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unsigned_right_shift/unsigned_right_shift_short.params.yaml index b1c75193d5..28543628d6 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unsigned_right_shift/unsigned_right_shift_short.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/07.value_types/01.integer_types_and_operations/unsigned_right_shift/unsigned_right_shift_short.params.yaml @@ -20,11 +20,11 @@ values: - { left: -1, right: 1, result: Int.MAX_VALUE } - { left: -1, right: 14, result: '0x3ffff' } - { left: -1, right: 15, result: '0x1ffff' } -- { left: "Short.MIN_VALUE as short", right: 1, result: '0x4000' } -- { left: "Short.MIN_VALUE as short", right: 14, result: '0x3fffe' } -- { left: "Short.MAX_VALUE as short", right: 1, result: '0x3fff' } -- { left: "Short.MAX_VALUE as short", right: 14, result: 1 } -- { left: "Short.MAX_VALUE as short", right: 15, result: 0 } +- { left: "Short.MIN_VALUE", right: 1, result: '0x4000' } +- { left: "Short.MIN_VALUE", right: 14, result: '0x3fffe' } +- { left: "Short.MAX_VALUE", right: 1, result: '0x3fff' } +- { left: "Short.MAX_VALUE", right: 14, result: 1 } +- { left: "Short.MAX_VALUE", right: 15, result: 0 } - { left: '0x3fff', right: 2, result: '0x0fff' } - { left: 1, right: 0, result: 1 } - { left: -1, right: 0, result: -1 } @@ -32,4 +32,4 @@ values: - { left: 1, right: -1, result: 0 } - { left: 0, right: -1, result: 0 } - { left: -1, right: -2, result: 3 } -- { left: -1, right: -15, result: "Short.MAX_VALUE as short" } +- { left: -1, right: -15, result: "Short.MAX_VALUE" } diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/08.reference_types/10.tuple_types/tt2.params.yaml b/static_core/plugins/ets/tests/ets-templates/03.types/08.reference_types/10.tuple_types/tt2.params.yaml index 4a68bc5d8f..8260b3da1d 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/08.reference_types/10.tuple_types/tt2.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/03.types/08.reference_types/10.tuple_types/tt2.params.yaml @@ -14,7 +14,7 @@ --- cases: - { type: byte, val: 127 } - - { type: short, val: 'Short.MAX_VALUE as short' } + - { type: short, val: 'Short.MAX_VALUE' } - { type: int, val: 42 } - { type: long, val: Long.MIN_VALUE } - { type: boolean, val: 'true' } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing.params.yaml index 9afa8d31d7..d9b5bb2195 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing.params.yaml @@ -28,15 +28,15 @@ cases: - src_type: short dst_type: Short - values: [Short.MIN_VALUE as short, 255 as short] + values: [Short.MIN_VALUE, 255 as short] - src_type: int dst_type: Int - values: [127, 32767, Int.MAX_VALUE as int] + values: [127, 32767, Int.MAX_VALUE] - src_type: long dst_type: Long - values: [Long.MIN_VALUE as long, 9223372036854775807 as long] + values: [Long.MIN_VALUE, 9223372036854775807 as long] - src_type: float dst_type: Float diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2.params.yaml index 337d4765e1..ada2f9f06c 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2.params.yaml @@ -28,15 +28,15 @@ cases: - src_type: short dst_type: Object - values: [Short.MIN_VALUE as short, 255 as short] + values: [Short.MIN_VALUE, 255 as short] - src_type: int dst_type: Integral - values: [127, 32767, Int.MAX_VALUE as int] + values: [127, 32767, Int.MAX_VALUE] - src_type: long dst_type: Object - values: [Long.MIN_VALUE as long, 9223372036854775807 as long] + values: [Long.MIN_VALUE, 9223372036854775807 as long] - src_type: float dst_type: Object diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2.sts b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2.sts index bcea8625cd..5b9e019133 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2.sts +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2.sts @@ -23,7 +23,7 @@ function main(): int { {% for v in c['values'] %} let src_{{loop.index}}: {{c.src_type}} = {{v|safe}}; let dst_{{loop.index}}: {{c.dst_type}} = src_{{loop.index}}; // boxing in this assignment - if (dst_{{loop.index}} === null) { + if (dst_{{loop.index}} == null) { return 1; } {% endfor %} diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call.params.yaml index ffcc649a97..a8415299cb 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call.params.yaml @@ -32,27 +32,27 @@ cases: - type: Object prim_type: short - values: [Short.MIN_VALUE as short, 255 as short] + values: [Short.MIN_VALUE, 255 as short] - type: Integral prim_type: short - values: [Short.MIN_VALUE as short, 255 as short] + values: [Short.MIN_VALUE, 255 as short] - type: Object prim_type: int - values: [127, 32767, Int.MAX_VALUE as int] + values: [127, 32767, Int.MAX_VALUE] - type: Integral prim_type: int - values: [127, 32767, Int.MAX_VALUE as int] + values: [127, 32767, Int.MAX_VALUE] - type: Object prim_type: long - values: [Long.MIN_VALUE as long, 9223372036854775807 as long] + values: [Long.MIN_VALUE, 9223372036854775807 as long] - type: Integral prim_type: long - values: [Long.MIN_VALUE as long, 9223372036854775807 as long] + values: [Long.MIN_VALUE, 9223372036854775807 as long] - type: Object prim_type: float diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call.sts b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call.sts index 2740541763..3d5193cabc 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call.sts +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call.sts @@ -33,7 +33,7 @@ class A { public foo({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }}{% endfor %}): int { if ( {%- for v in c['values'] %} - this.fld_{{loop.index}} === null {{ " ||" if not loop.last }} + this.fld_{{loop.index}} == null {{ " ||" if not loop.last }} {%- endfor %} ) { return 1; diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing_call.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing_call.params.yaml index 74effa4c1c..157cc3d5c9 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing_call.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/boxing_call.params.yaml @@ -28,15 +28,15 @@ cases: - type: Short prim_type: short - values: [Short.MIN_VALUE as short, 255 as short] + values: [Short.MIN_VALUE, 255 as short] - type: Int prim_type: int - values: [127, 32767, Int.MAX_VALUE as int] + values: [127, 32767, Int.MAX_VALUE] - type: Long prim_type: long - values: [Long.MIN_VALUE as long, 9223372036854775807 as long] + values: [Long.MIN_VALUE, 9223372036854775807 as long] - type: Float prim_type: float diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/prim_narrowing.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/prim_narrowing.params.yaml index f290fbc1ec..45475ecf16 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/prim_narrowing.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/prim_narrowing.params.yaml @@ -14,42 +14,42 @@ --- cases: - types: - - { stype: short, src: Short.MIN_VALUE as short, dtype: byte, dst: 0 as byte } - - { stype: short, src: Short.MAX_VALUE as short, dtype: byte, dst: (-1) as byte } - - { stype: short, src: Short.MIN_VALUE as short, dtype: char, dst: "c'\\u8000'" } - - { stype: short, src: Short.MAX_VALUE as short, dtype: char, dst: "c'\\u7fff'" } + - { stype: short, src: Short.MIN_VALUE, dtype: byte, dst: 0 as byte } + - { stype: short, src: Short.MAX_VALUE, dtype: byte, dst: (-1) as byte } + - { stype: short, src: Short.MIN_VALUE, dtype: char, dst: "c'\\u8000'" } + - { stype: short, src: Short.MAX_VALUE, dtype: char, dst: "c'\\u7fff'" } - { stype: char, src: "c'\\u0000'", dtype: byte, dst: 0 as byte } - { stype: char, src: "c'\\uffff'", dtype: byte, dst: (-1) as byte } - { stype: char, src: "c'\\u0000'", dtype: short, dst: 0 as short } - { stype: char, src: "c'\\uffff'", dtype: short, dst: (-1) as short } - - { stype: int, src: Int.MIN_VALUE as int, dtype: byte, dst: 0 as byte } - - { stype: int, src: Int.MAX_VALUE as int, dtype: byte, dst: (-1) as byte } - - { stype: int, src: Int.MIN_VALUE as int, dtype: short, dst: 0 as short } - - { stype: int, src: Int.MAX_VALUE as int, dtype: short, dst: (-1) as short } - - { stype: int, src: Int.MIN_VALUE as int, dtype: char, dst: "c'\\u0000'" } - - { stype: int, src: Int.MAX_VALUE as int, dtype: char, dst: "c'\\uffff'" } + - { stype: int, src: Int.MIN_VALUE, dtype: byte, dst: 0 as byte } + - { stype: int, src: Int.MAX_VALUE, dtype: byte, dst: (-1) as byte } + - { stype: int, src: Int.MIN_VALUE, dtype: short, dst: 0 as short } + - { stype: int, src: Int.MAX_VALUE, dtype: short, dst: (-1) as short } + - { stype: int, src: Int.MIN_VALUE, dtype: char, dst: "c'\\u0000'" } + - { stype: int, src: Int.MAX_VALUE, dtype: char, dst: "c'\\uffff'" } - - { stype: long, src: Long.MIN_VALUE as long, dtype: byte, dst: 0 as byte } - - { stype: long, src: Long.MAX_VALUE as long, dtype: byte, dst: (-1) as byte } - - { stype: long, src: Long.MIN_VALUE as long, dtype: short, dst: 0 as short } - - { stype: long, src: Long.MAX_VALUE as long, dtype: short, dst: (-1) as short } - - { stype: long, src: Long.MIN_VALUE as long, dtype: char, dst: "c'\\u0000'" } - - { stype: long, src: Long.MAX_VALUE as long, dtype: char, dst: "c'\\uffff'" } - - { stype: long, src: Long.MIN_VALUE as long, dtype: int, dst: 0 as int } - - { stype: long, src: Long.MAX_VALUE as long, dtype: int, dst: (-1) as int } + - { stype: long, src: Long.MIN_VALUE, dtype: byte, dst: 0 as byte } + - { stype: long, src: Long.MAX_VALUE, dtype: byte, dst: (-1) as byte } + - { stype: long, src: Long.MIN_VALUE, dtype: short, dst: 0 as short } + - { stype: long, src: Long.MAX_VALUE, dtype: short, dst: (-1) as short } + - { stype: long, src: Long.MIN_VALUE, dtype: char, dst: "c'\\u0000'" } + - { stype: long, src: Long.MAX_VALUE, dtype: char, dst: "c'\\uffff'" } + - { stype: long, src: Long.MIN_VALUE, dtype: int, dst: 0 as int } + - { stype: long, src: Long.MAX_VALUE, dtype: int, dst: (-1) as int } - - { stype: float, src: Float.MIN_VALUE as float, dtype: byte, dst: 0 as byte } - - { stype: float, src: Float.MAX_VALUE as float, dtype: byte, dst: (-1) as byte } - - { stype: float, src: Float.MIN_VALUE as float, dtype: short, dst: 0 as short } - - { stype: float, src: Float.MAX_VALUE as float, dtype: short, dst: (-1) as short } - - { stype: float, src: Float.MIN_VALUE as float, dtype: char, dst: "c'\\u0000'" } - - { stype: float, src: Float.MAX_VALUE as float, dtype: char, dst: "c'\\uffff'" } - - { stype: float, src: Float.MIN_VALUE as float, dtype: int, dst: 0 } - - { stype: float, src: Float.MAX_VALUE as float, dtype: int, dst: 2147483647 } - - { stype: float, src: Float.MIN_VALUE as float, dtype: long, dst: 0 as long } - - { stype: float, src: Float.MAX_VALUE as float, dtype: long, dst: 9223372036854775807 as long } + - { stype: float, src: Float.MIN_VALUE, dtype: byte, dst: 0 as byte } + - { stype: float, src: Float.MAX_VALUE, dtype: byte, dst: (-1) as byte } + - { stype: float, src: Float.MIN_VALUE, dtype: short, dst: 0 as short } + - { stype: float, src: Float.MAX_VALUE, dtype: short, dst: (-1) as short } + - { stype: float, src: Float.MIN_VALUE, dtype: char, dst: "c'\\u0000'" } + - { stype: float, src: Float.MAX_VALUE, dtype: char, dst: "c'\\uffff'" } + - { stype: float, src: Float.MIN_VALUE, dtype: int, dst: 0 } + - { stype: float, src: Float.MAX_VALUE, dtype: int, dst: 2147483647 } + - { stype: float, src: Float.MIN_VALUE, dtype: long, dst: 0 as long } + - { stype: float, src: Float.MAX_VALUE, dtype: long, dst: 9223372036854775807 as long } - { stype: double, src: Double.MIN_VALUE, dtype: byte, dst: 0 as byte } - { stype: double, src: Double.MAX_VALUE, dtype: byte, dst: (-1) as byte } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/prim_wide_narrow.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/prim_wide_narrow.params.yaml index 9ce3c43549..36d7636de8 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/prim_wide_narrow.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/prim_wide_narrow.params.yaml @@ -14,8 +14,8 @@ --- cases: - types: - - { stype: byte, src: Byte.MIN_VALUE as byte, dtype: char, dst: "c'\\uff80'" } - - { stype: byte, src: Byte.MAX_VALUE as byte, dtype: char, dst: "c'\\u007f'" } + - { stype: byte, src: Byte.MIN_VALUE, dtype: char, dst: "c'\\uff80'" } + - { stype: byte, src: Byte.MAX_VALUE, dtype: char, dst: "c'\\u007f'" } - { stype: byte, src: 0 as byte, dtype: char, dst: "c'\\u0000'" } - { stype: byte, src: 1 as byte, dtype: char, dst: "c'\\u0001'" } - { stype: byte, src: (-1) as byte, dtype: char, dst: "c'\\uffff'" } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/unboxing2_call.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/unboxing2_call.params.yaml index 2cc51dcc35..d2be4bf034 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/unboxing2_call.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/unboxing2_call.params.yaml @@ -54,41 +54,41 @@ cases: - type: int ref_type: Short - values: [new Short(Short.MIN_VALUE as short), new Short(255 as short)] + values: [new Short(Short.MIN_VALUE), new Short(255 as short)] - type: long ref_type: Short - values: [new Short(Short.MIN_VALUE as short), new Short(255 as short)] + values: [new Short(Short.MIN_VALUE), new Short(255 as short)] - type: float ref_type: Short - values: [new Short(Short.MIN_VALUE as short), new Short(255 as short)] + values: [new Short(Short.MIN_VALUE), new Short(255 as short)] - type: double ref_type: Short - values: [new Short(Short.MIN_VALUE as short), new Short(255 as short)] + values: [new Short(Short.MIN_VALUE), new Short(255 as short)] - type: long ref_type: Int - values: [new Int(127), new Int(32767), new Int(Int.MAX_VALUE as int)] + values: [new Int(127), new Int(32767), new Int(Int.MAX_VALUE)] - type: float ref_type: Int - values: [new Int(127), new Int(32767), new Int(Int.MAX_VALUE as int)] + values: [new Int(127), new Int(32767), new Int(Int.MAX_VALUE)] - type: double ref_type: Int - values: [new Int(127), new Int(32767), new Int(Int.MAX_VALUE as int)] + values: [new Int(127), new Int(32767), new Int(Int.MAX_VALUE)] - type: float ref_type: Long - values: [new Long(Long.MIN_VALUE as long), new Long(9223372036854775807 as long)] + values: [new Long(Long.MIN_VALUE), new Long(9223372036854775807 as long)] - type: double ref_type: Long - values: [new Long(Long.MIN_VALUE as long), new Long(9223372036854775807 as long)] + values: [new Long(Long.MIN_VALUE), new Long(9223372036854775807 as long)] - type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/unboxing_call.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/unboxing_call.params.yaml index 1350f8248e..d38288bfce 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/unboxing_call.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/unboxing_call.params.yaml @@ -28,15 +28,15 @@ cases: - type: short ref_type: Short - values: [new Short(Short.MIN_VALUE as short), new Short(255 as short)] + values: [new Short(Short.MIN_VALUE), new Short(255 as short)] - type: int ref_type: Int - values: [new Int(127), new Int(32767), new Int(Int.MAX_VALUE as int)] + values: [new Int(127), new Int(32767), new Int(Int.MAX_VALUE)] - type: long ref_type: Long - values: [new Long(Long.MIN_VALUE as long), new Long(9223372036854775807 as long)] + values: [new Long(Long.MIN_VALUE), new Long(9223372036854775807 as long)] - type: float ref_type: Float diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n.sts b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n.sts deleted file mode 100644 index 6c6111e21c..0000000000 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n.sts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -{% for c in cases %} -/*--- -desc: |- - When an operator applies binary numeric promotion to a pair of operands, - each of which must denote a value that is convertible to a numeric type, - the following rules apply, in order: - 1. If any operand is of a reference type, it is subjected to unboxing conversion (link to conv). - 2. Widening primitive conversion (link to conv) is applied to convert either or both operands as specified by the following rules: - • If either operand is of type double, the other is converted to double. - • Otherwise, if either operand is of type float, the other is converted to float. - • Otherwise, if either operand is of type long, the other is converted to long. - • Otherwise, both operands are converted to type int. -params: {{c.rt}} -tags: [compile-only, negative] ----*/ - -function foo(p: byte): int { - return 1; -} - -function foo(p: short): int { - return 2; -} - -function foo(p: int): int { - return 3; -} - -function foo(p: long): int { - return 4; -} - -function foo(p: char): int { - return 5; -} - -function foo(p: boolean): int { - return 6; -} - -function foo(p: float): int { - return 7; -} - -function foo(p: double): int { - return 8; -} - -function foo(p: Byte): int { - return 21; -} - -function foo(p: Short): int { - return 22; -} - -function foo(p: Int): int { - return 23; -} - -function foo(p: Long): int { - return 24; -} - -function foo(p: Char): int { - return 25; -} - -function foo(p: Boolean): int { - return 26; -} - -function foo(p: Float): int { - return 27; -} - -function foo(p: Double): int { - return 28; -} - -function foo(p: Object): int { - return 40; -} - -function main(): int { - let b: boolean = foo(3) == 3; // always true - let v: {{c.type}} = {{c.val}}; - let r: {{c.rt}} = {{c.rv}}; - let result: int = foo(b ? v : r); - return result; -} -{% endfor %} diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/neg_gen1.sts b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/neg_gen1.sts index f423eebcd0..82546f2a2a 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/neg_gen1.sts +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/neg_gen1.sts @@ -19,7 +19,7 @@ tags: [compile-only, negative] ---*/ class A { fld: T; - init(p: Boolean) { + constructor(p: Boolean) { this.fld = p as T // CTE expected: casting to type parameter } } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/pos_2a.sts b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/pos_2a.sts index 8e7893107b..e3d3e3cd13 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/pos_2a.sts +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/pos_2a.sts @@ -28,6 +28,6 @@ function foo(p: Object[]|null): Object[] { function main(): int { let t: TT1[] = [["123", false], ["456", true]] let b: Object[]|null = t - let d: TT1 = foo(b) as TT1[] + let d: TT1[] = foo(b) as TT1[] return t == d ? 0 : 1 } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/assn_var/assn-var.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/assn_var/assn-var.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/assn_var/assn-var.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/assn_var/assn-var.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_cons/call-cons.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_cons/call-cons.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_cons/call-cons.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_cons/call-cons.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_func/call-func.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_func/call-func.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_func/call-func.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_func/call-func.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_lmbd/call-lmbd.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_lmbd/call-lmbd.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_lmbd/call-lmbd.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_lmbd/call-lmbd.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_meth/call-meth.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_meth/call-meth.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_meth/call-meth.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/call_meth/call-meth.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_arr/comp-arr.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_arr/comp-arr.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_arr/comp-arr.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_arr/comp-arr.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_obj/comp-clss.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_obj/comp-clss.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_obj/comp-clss.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_obj/comp-clss.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_obj/comp-intf.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_obj/comp-intf.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_obj/comp-intf.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/comp_obj/comp-intf.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_const/decl-const.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_const/decl-const.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_const/decl-const.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_const/decl-const.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_field/decl-field.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_field/decl-field.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_field/decl-field.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_field/decl-field.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_field/decl-st-field.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_field/decl-st-field.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_field/decl-st-field.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_field/decl-st-field.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_var/decl-var.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_var/decl-var.params.yaml index 445e3fd1b2..f464002608 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_var/decl-var.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_var/decl-var.params.yaml @@ -17,134 +17,134 @@ cases: to_type: short values: - { expr: 0b0 as byte, val: 0 as short } - - { expr: Byte.MIN_VALUE as byte, val: -128 as short } - - { expr: Byte.MAX_VALUE as byte, val: 127 as short } + - { expr: Byte.MIN_VALUE, val: -128 as short } + - { expr: Byte.MAX_VALUE, val: 127 as short } - from_type: byte to_type: int values: - { expr: 0b0 as byte, val: 0 } - - { expr: Byte.MIN_VALUE as byte, val: -128 } - - { expr: Byte.MAX_VALUE as byte, val: 127 } + - { expr: Byte.MIN_VALUE, val: -128 } + - { expr: Byte.MAX_VALUE, val: 127 } - from_type: byte to_type: long values: - { expr: 0b0 as byte, val: 0 as long } - - { expr: Byte.MIN_VALUE as byte, val: -128 as long } - - { expr: Byte.MAX_VALUE as byte, val: 127 as long } + - { expr: Byte.MIN_VALUE, val: -128 as long } + - { expr: Byte.MAX_VALUE, val: 127 as long } - from_type: byte to_type: float values: - { expr: 0b0 as byte, val: 0.0 as float } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as float } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as float } + - { expr: Byte.MIN_VALUE, val: -128.0 as float } + - { expr: Byte.MAX_VALUE, val: 127.0 as float } - from_type: byte to_type: double values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as double } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as double } + - { expr: Byte.MIN_VALUE, val: -128.0 as double } + - { expr: Byte.MAX_VALUE, val: 127.0 as double } - from_type: byte to_type: number values: - { expr: 0b0 as byte, val: 0.0 } - - { expr: Byte.MIN_VALUE as byte, val: -128.0 as number } - - { expr: Byte.MAX_VALUE as byte, val: 127.0 as number } + - { expr: Byte.MIN_VALUE, val: -128.0 as number } + - { expr: Byte.MAX_VALUE, val: 127.0 as number } - from_type: byte to_type: char values: - { expr: 0b0 as byte, val: "c'\\u0000'" } - - { expr: Byte.MIN_VALUE as byte, val: "c'\\uFF80'" } - - { expr: Byte.MAX_VALUE as byte, val: "c'\\u007F'" } + - { expr: Byte.MIN_VALUE, val: "c'\\uFF80'" } + - { expr: Byte.MAX_VALUE, val: "c'\\u007F'" } - from_type: short to_type: int values: - { expr: 0b0 as short, val: 0 } - - { expr: Short.MIN_VALUE as short, val: -32_768 } - - { expr: Short.MAX_VALUE as short, val: 32_767 } + - { expr: Short.MIN_VALUE, val: -32_768 } + - { expr: Short.MAX_VALUE, val: 32_767 } - from_type: short to_type: long values: - { expr: 0b0 as short, val: 0 as long } - - { expr: Short.MIN_VALUE as short, val: -32_768 as long } - - { expr: Short.MAX_VALUE as short, val: 32_767 as long } + - { expr: Short.MIN_VALUE, val: -32_768 as long } + - { expr: Short.MAX_VALUE, val: 32_767 as long } - from_type: short to_type: float values: - { expr: 0b0 as short, val: 0.0 as float } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as float } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as float } + - { expr: Short.MIN_VALUE, val: -32_768.0 as float } + - { expr: Short.MAX_VALUE, val: 32_767.0 as float } - from_type: short to_type: double values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as double} - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as double } + - { expr: Short.MIN_VALUE, val: -32_768.0 as double} + - { expr: Short.MAX_VALUE, val: 32_767.0 as double } - from_type: short to_type: number values: - { expr: 0b0 as short, val: 0.0 } - - { expr: Short.MIN_VALUE as short, val: -32_768.0 as number } - - { expr: Short.MAX_VALUE as short, val: 32_767.0 as number } + - { expr: Short.MIN_VALUE, val: -32_768.0 as number } + - { expr: Short.MAX_VALUE, val: 32_767.0 as number } - from_type: int to_type: long values: - { expr: 0, val: 0 as long } - - { expr: Int.MIN_VALUE as int, val: -2147483648 as long } - - { expr: Int.MAX_VALUE as int, val: 2147483647 as long } + - { expr: Int.MIN_VALUE, val: -2147483648 as long } + - { expr: Int.MAX_VALUE, val: 2147483647 as long } - from_type: int to_type: float values: - { expr: 0, val: 0.0 as float } - - { expr: Int.MIN_VALUE as int, val: -2147483600.0 as float } # expected loss of precision - - { expr: Int.MAX_VALUE as int, val: 2147483600 as float } # expected loss of precision + - { expr: Int.MIN_VALUE, val: -2147483600.0 as float } # expected loss of precision + - { expr: Int.MAX_VALUE, val: 2147483600 as float } # expected loss of precision - from_type: int to_type: double values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as double } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as double } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as double } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as double } - from_type: int to_type: number values: - { expr: 0, val: 0.0 } - - { expr: Int.MIN_VALUE as int, val: -2147483648.0 as number } - - { expr: Int.MAX_VALUE as int, val: 2147483647.0 as number } + - { expr: Int.MIN_VALUE, val: -2147483648.0 as number } + - { expr: Int.MAX_VALUE, val: 2147483647.0 as number } - from_type: long to_type: float values: - { expr: 0 as long, val: 0.0 as float } - - { expr: Long.MIN_VALUE as long, val: -9223372000000000000 as float } # expected loss of precision - - { expr: Long.MAX_VALUE as long, val: 9223372000000000000 as float } # expected loss of precision + - { expr: Long.MIN_VALUE, val: -9223372000000000000 as float } # expected loss of precision + - { expr: Long.MAX_VALUE, val: 9223372000000000000 as float } # expected loss of precision - from_type: long to_type: double values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as double } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as double } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as double } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as double } - from_type: long to_type: number values: - { expr: 0 as long, val: 0.0 } - - { expr: Long.MIN_VALUE as long, val: -9223372036854775808.0 as number } - - { expr: Long.MAX_VALUE as long, val: 9223372036854775807.0 as number } + - { expr: Long.MIN_VALUE, val: -9223372036854775808.0 as number } + - { expr: Long.MAX_VALUE, val: 9223372036854775807.0 as number } - from_type: float to_type: double diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/assn_var/assn-var.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/assn_var/assn-var.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/assn_var/assn-var.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/assn_var/assn-var.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_cons/call-cons.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_cons/call-cons.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_cons/call-cons.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_cons/call-cons.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_func/call-func.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_func/call-func.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_func/call-func.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_func/call-func.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan.params.yaml index 32d7a8c0de..d439d893b5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan.params.yaml @@ -18,11 +18,6 @@ cases: values: - { expr: new Float(Float.NaN) } - - from_type: Float - to_type: double - values: - - { expr: new Float(Float.NaN) } - - from_type: Double to_type: double values: diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_n.params.yaml similarity index 65% rename from static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n.params.yaml rename to static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_n.params.yaml index d5e6540a01..49476de6c6 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_n.params.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -13,7 +13,7 @@ --- cases: - - { type: short, val: 1 as short, rt: boolean, rv: 'true' } - - { type: char, val: "с'2'", rt: Boolean, rv: new Boolean(true) } - - { type: int, val: 1, rt: Object, rv: new Object() } - - { type: double, val: 0.1, rt: string, rv: '"0.1"' } + - from_type: Float + to_type: double + values: + - { expr: new Float(Float.NaN) } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_n.sts b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_n.sts new file mode 100644 index 0000000000..fbb8dfa6eb --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_n.sts @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{%- for c in cases %} + +/*--- +desc: >- + Call context, lambda, unboxing conversion, implicit. + See '20.4 Generic and Function Types Peculiarities' specification section for + details on why these tests are negative. +params: NaN conversion from {{c.from_type}} to {{c.to_type}} +tags: [compile-only, negative] +---*/ + +function main(): int { +{%- for t in c['values'] %} + let s{{loop.index}}: {{c.from_type}} = {{t.expr|safe}} + if (! {{c.to_type|capitalize}}.isNaN(((p: {{c.to_type}}): {{c.to_type}} => { return p })(s{{loop.index}}))) { + return 1 + } +{%- endfor %} + return 0 +} +{%- endfor %} diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd.params.yaml index 14deb34d00..8cda9c3a08 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd.params.yaml @@ -20,85 +20,14 @@ cases: - { expr: new Byte(127 as byte), val: 127 } - { expr: new Byte(-128 as byte), val: -128 } - - from_type: Byte - to_type: short - values: - - { expr: new Byte(), val: 0 } - - { expr: new Byte(127 as byte), val: 127 } - - { expr: new Byte(-128 as byte), val: -128 } - - - from_type: Byte - to_type: int - values: - - { expr: new Byte(), val: 0 } - - { expr: new Byte(127 as byte), val: 127 } - - { expr: new Byte(-128 as byte), val: -128 } - - - from_type: Byte - to_type: long - values: - - { expr: new Byte(), val: 0 } - - { expr: new Byte(127 as byte), val: 127 } - - { expr: new Byte(-128 as byte), val: -128 } - - - from_type: Byte - to_type: float - values: - - { expr: new Byte(), val: 0.0 as float } - - { expr: new Byte(127 as byte), val: 127.0 as float } - - { expr: new Byte(-128 as byte), val: -128.0 as float } - - - from_type: Byte - to_type: double - values: - - { expr: new Byte(), val: 0.0 } - - { expr: new Byte(127 as byte), val: 127.0 } - - { expr: new Byte(-128 as byte), val: -128.0 } - - from_type: Short to_type: short values: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } - - - from_type: Short - to_type: int - values: - - { expr: new Short(), val: 0 } - - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } - - - from_type: Short - to_type: long - values: - - { expr: new Short(), val: 0 } - - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } - - - from_type: Short - to_type: float - values: - - { expr: new Short(), val: 0.0 } - - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } - - - from_type: Short - to_type: double - values: - - { expr: new Short(), val: 0.0 } - - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,41 +37,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } - - - from_type: Int - to_type: long - values: - - { expr: new Int(), val: 0 } - - { expr: new Int(Byte.MIN_VALUE as int), val: -128 } - - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } - - - from_type: Int - to_type: float - values: - - { expr: new Int(), val: 0.0 } - - { expr: new Int(Byte.MIN_VALUE as int), val: -128.0 as float } - - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision - - - from_type: Int - to_type: double - values: - - { expr: new Int(), val: 0.0 } - - { expr: new Int(Byte.MIN_VALUE as int), val: -128.0 } - - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Long to_type: long @@ -154,34 +50,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } - - - from_type: Long - to_type: float - values: - - { expr: new Long(), val: 0.0 } - - { expr: new Long(Byte.MIN_VALUE as long), val: -128.0 as float } - - { expr: new Long(Byte.MAX_VALUE as long), val: 127.0 as float } - - { expr: new Long(Short.MIN_VALUE as long), val: -32768.0 as float } - - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision - - - from_type: Long - to_type: double - values: - - { expr: new Long(), val: 0.0 } - - { expr: new Long(Byte.MIN_VALUE as long), val: -128.0 } - - { expr: new Long(Byte.MAX_VALUE as long), val: 127.0 } - - { expr: new Long(Short.MIN_VALUE as long), val: -32768.0 } - - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Float to_type: float @@ -196,29 +66,11 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } - - from_type: Float - to_type: double - values: - - { expr: new Float(+0.0 as float), val: +0.0 } - - { expr: new Float(-0.0 as float), val: -0.0 } - - { expr: new Float(Byte.MIN_VALUE as float), val: -128.0 } - - { expr: new Float(Byte.MAX_VALUE as float), val: 127.0 } - - { expr: new Float(Short.MIN_VALUE as float), val: -32768.0 } - - { expr: new Float(Short.MAX_VALUE as float), val: 32767.0 } - - { expr: new Float(Int.MIN_VALUE as float), val: -2.147483648E9 } # loss of precision - - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } - - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } - - from_type: Double to_type: double values: @@ -236,8 +88,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } @@ -252,50 +104,6 @@ cases: - { expr: "new Char(c'\\ucafe')", val: "c'\\uCAFE'" } - { expr: "new Char(c'R')", val: "c'R'" } - - from_type: Char - to_type: int - values: - - { expr: "new Char(c'\\u0000')", val: 0 } - - { expr: "new Char(c'\\u007f')", val: 127 } - - { expr: "new Char(c'\\u8000')", val: 32768 } - - { expr: "new Char(c'\\uff80')", val: 65408 } - - { expr: "new Char(c'\\uffff')", val: 65535 } - - { expr: "new Char(c'\\ucafe')", val: 51966 } - - { expr: "new Char(c'R')", val: 82 } - - - from_type: Char - to_type: long - values: - - { expr: "new Char(c'\\u0000')", val: 0 as long } - - { expr: "new Char(c'\\u007f')", val: 127 as long } - - { expr: "new Char(c'\\u8000')", val: 32768 as long } - - { expr: "new Char(c'\\uff80')", val: 65408 as long } - - { expr: "new Char(c'\\uffff')", val: 65535 as long } - - { expr: "new Char(c'\\ucafe')", val: 51966 as long } - - { expr: "new Char(c'R')", val: 82 as long } - - - from_type: Char - to_type: float - values: - - { expr: "new Char(c'\\u0000')", val: 0.0 as float } - - { expr: "new Char(c'\\u007f')", val: 127.0 as float } - - { expr: "new Char(c'\\u8000')", val: 32768.0 as float } - - { expr: "new Char(c'\\uff80')", val: 65408.0 as float } - - { expr: "new Char(c'\\uffff')", val: 65535.0 as float } - - { expr: "new Char(c'\\ucafe')", val: 51966.0 as float } - - { expr: "new Char(c'R')", val: 82.0 as float } - - - from_type: Char - to_type: double - values: - - { expr: "new Char(c'\\u0000')", val: 0.0 } - - { expr: "new Char(c'\\u007f')", val: 127.0 } - - { expr: "new Char(c'\\u8000')", val: 32768.0 } - - { expr: "new Char(c'\\uff80')", val: 65408.0 } - - { expr: "new Char(c'\\uffff')", val: 65535.0 } - - { expr: "new Char(c'\\ucafe')", val: 51966.0 } - - { expr: "new Char(c'R')", val: 82.0 } - - from_type: Boolean to_type: boolean values: diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_n.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_n.params.yaml new file mode 100644 index 0000000000..215fbafac7 --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_n.params.yaml @@ -0,0 +1,206 @@ +# Copyright (c) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +cases: + - from_type: Byte + to_type: short + values: + - { expr: new Byte(), val: 0 } + - { expr: new Byte(127 as byte), val: 127 } + - { expr: new Byte(-128 as byte), val: -128 } + + - from_type: Byte + to_type: int + values: + - { expr: new Byte(), val: 0 } + - { expr: new Byte(127 as byte), val: 127 } + - { expr: new Byte(-128 as byte), val: -128 } + + - from_type: Byte + to_type: long + values: + - { expr: new Byte(), val: 0 } + - { expr: new Byte(127 as byte), val: 127 } + - { expr: new Byte(-128 as byte), val: -128 } + + - from_type: Byte + to_type: float + values: + - { expr: new Byte(), val: 0.0 as float } + - { expr: new Byte(127 as byte), val: 127.0 as float } + - { expr: new Byte(-128 as byte), val: -128.0 as float } + + - from_type: Byte + to_type: double + values: + - { expr: new Byte(), val: 0.0 } + - { expr: new Byte(127 as byte), val: 127.0 } + - { expr: new Byte(-128 as byte), val: -128.0 } + + - from_type: Short + to_type: int + values: + - { expr: new Short(), val: 0 } + - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } + - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } + + - from_type: Short + to_type: long + values: + - { expr: new Short(), val: 0 } + - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } + - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } + + - from_type: Short + to_type: float + values: + - { expr: new Short(), val: 0.0 } + - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } + - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } + + - from_type: Short + to_type: double + values: + - { expr: new Short(), val: 0.0 } + - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } + - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } + + - from_type: Int + to_type: long + values: + - { expr: new Int(), val: 0 } + - { expr: new Int(Byte.MIN_VALUE as int), val: -128 } + - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } + - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } + - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } + + - from_type: Int + to_type: float + values: + - { expr: new Int(), val: 0.0 } + - { expr: new Int(Byte.MIN_VALUE as int), val: -128.0 as float } + - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } + - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } + - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision + + - from_type: Int + to_type: double + values: + - { expr: new Int(), val: 0.0 } + - { expr: new Int(Byte.MIN_VALUE as int), val: -128.0 } + - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } + - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } + - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } + + - from_type: Long + to_type: float + values: + - { expr: new Long(), val: 0.0 } + - { expr: new Long(Byte.MIN_VALUE as long), val: -128.0 as float } + - { expr: new Long(Byte.MAX_VALUE as long), val: 127.0 as float } + - { expr: new Long(Short.MIN_VALUE as long), val: -32768.0 as float } + - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } + - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision + - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision + + - from_type: Long + to_type: double + values: + - { expr: new Long(), val: 0.0 } + - { expr: new Long(Byte.MIN_VALUE as long), val: -128.0 } + - { expr: new Long(Byte.MAX_VALUE as long), val: 127.0 } + - { expr: new Long(Short.MIN_VALUE as long), val: -32768.0 } + - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } + - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } + - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } + + - from_type: Float + to_type: double + values: + - { expr: new Float(+0.0 as float), val: +0.0 } + - { expr: new Float(-0.0 as float), val: -0.0 } + - { expr: new Float(Byte.MIN_VALUE as float), val: -128.0 } + - { expr: new Float(Byte.MAX_VALUE as float), val: 127.0 } + - { expr: new Float(Short.MIN_VALUE as float), val: -32768.0 } + - { expr: new Float(Short.MAX_VALUE as float), val: 32767.0 } + - { expr: new Float(Int.MIN_VALUE as float), val: -2.147483648E9 } # loss of precision + - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision + - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision + - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } + - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } + - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } + + - from_type: Char + to_type: int + values: + - { expr: "new Char(c'\\u0000')", val: 0 } + - { expr: "new Char(c'\\u007f')", val: 127 } + - { expr: "new Char(c'\\u8000')", val: 32768 } + - { expr: "new Char(c'\\uff80')", val: 65408 } + - { expr: "new Char(c'\\uffff')", val: 65535 } + - { expr: "new Char(c'\\ucafe')", val: 51966 } + - { expr: "new Char(c'R')", val: 82 } + + - from_type: Char + to_type: long + values: + - { expr: "new Char(c'\\u0000')", val: 0 as long } + - { expr: "new Char(c'\\u007f')", val: 127 as long } + - { expr: "new Char(c'\\u8000')", val: 32768 as long } + - { expr: "new Char(c'\\uff80')", val: 65408 as long } + - { expr: "new Char(c'\\uffff')", val: 65535 as long } + - { expr: "new Char(c'\\ucafe')", val: 51966 as long } + - { expr: "new Char(c'R')", val: 82 as long } + + - from_type: Char + to_type: float + values: + - { expr: "new Char(c'\\u0000')", val: 0.0 as float } + - { expr: "new Char(c'\\u007f')", val: 127.0 as float } + - { expr: "new Char(c'\\u8000')", val: 32768.0 as float } + - { expr: "new Char(c'\\uff80')", val: 65408.0 as float } + - { expr: "new Char(c'\\uffff')", val: 65535.0 as float } + - { expr: "new Char(c'\\ucafe')", val: 51966.0 as float } + - { expr: "new Char(c'R')", val: 82.0 as float } + + - from_type: Char + to_type: double + values: + - { expr: "new Char(c'\\u0000')", val: 0.0 } + - { expr: "new Char(c'\\u007f')", val: 127.0 } + - { expr: "new Char(c'\\u8000')", val: 32768.0 } + - { expr: "new Char(c'\\uff80')", val: 65408.0 } + - { expr: "new Char(c'\\uffff')", val: 65535.0 } + - { expr: "new Char(c'\\ucafe')", val: 51966.0 } + - { expr: "new Char(c'R')", val: 82.0 } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_n.sts b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_n.sts new file mode 100644 index 0000000000..ab1ffd4fb2 --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_n.sts @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{%- for c in cases %} + +/*--- +desc: >- + Call context, lambda, unboxing conversion, implicit. + See '20.4 Generic and Function Types Peculiarities' specification section for + details on why these tests are negative. +params: from {{c.from_type}} to {{c.to_type}} +tags: [compile-only, negative] +---*/ + +function main(): int { +{%- for t in c['values'] %} + let s{{loop.index}}: {{c.from_type}} = {{t.expr|safe}} + if (((p: {{c.to_type}}): {{c.to_type}} => { return p })(s{{loop.index}}) != {{t.val}}) { + return 1 + } +{%- endfor %} + return 0 +} +{%- endfor %} diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_meth/call-meth.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_meth/call-meth.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_meth/call-meth.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_meth/call-meth.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_arr/comp-arr.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_arr/comp-arr.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_arr/comp-arr.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_arr/comp-arr.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_obj/comp-clss.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_obj/comp-clss.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_obj/comp-clss.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_obj/comp-clss.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_obj/comp-intf.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_obj/comp-intf.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_obj/comp-intf.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/comp_obj/comp-intf.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_const/decl-const.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_const/decl-const.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_const/decl-const.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_const/decl-const.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_field/decl-field.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_field/decl-field.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_field/decl-field.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_field/decl-field.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_var/decl-var.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_var/decl-var.params.yaml index 14deb34d00..c3842f66d5 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_var/decl-var.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/decl_var/decl-var.params.yaml @@ -61,8 +61,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: int @@ -70,8 +70,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: long @@ -79,8 +79,8 @@ cases: - { expr: new Short(), val: 0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Short to_type: float @@ -88,8 +88,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128.0 as float } - { expr: new Short(Byte.MAX_VALUE as short), val: 127.0 as float } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768.0 as float } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767.0 as float } + - { expr: new Short(Short.MIN_VALUE), val: -32768.0 as float } + - { expr: new Short(Short.MAX_VALUE), val: 32767.0 as float } - from_type: Short to_type: double @@ -97,8 +97,8 @@ cases: - { expr: new Short(), val: 0.0 } - { expr: new Short(Byte.MIN_VALUE as short), val: -128 } - { expr: new Short(Byte.MAX_VALUE as short), val: 127 } - - { expr: new Short(Short.MIN_VALUE as short), val: -32768 } - - { expr: new Short(Short.MAX_VALUE as short), val: 32767 } + - { expr: new Short(Short.MIN_VALUE), val: -32768 } + - { expr: new Short(Short.MAX_VALUE), val: 32767 } - from_type: Int to_type: int @@ -108,8 +108,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: long @@ -119,8 +119,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647 } - from_type: Int to_type: float @@ -130,8 +130,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 as float } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 as float } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 as float } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483600.0 as float } # loss of precision - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MIN_VALUE), val: -2147483600.0 as float } # loss of precision + - { expr: new Int(Int.MAX_VALUE), val: 2147483600.0 as float } # loss of precision - from_type: Int to_type: double @@ -141,8 +141,8 @@ cases: - { expr: new Int(Byte.MAX_VALUE as int), val: 127.0 } - { expr: new Int(Short.MIN_VALUE as int), val: -32768.0 } - { expr: new Int(Short.MAX_VALUE as int), val: 32767.0 } - - { expr: new Int(Int.MIN_VALUE as int), val: -2147483648.0 } - - { expr: new Int(Int.MAX_VALUE as int), val: 2147483647.0 } + - { expr: new Int(Int.MIN_VALUE), val: -2147483648.0 } + - { expr: new Int(Int.MAX_VALUE), val: 2147483647.0 } - from_type: Long to_type: long @@ -154,8 +154,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807 } - from_type: Long to_type: float @@ -167,8 +167,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 as float } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483600.0 as float } # loss of precision - { expr: new Long(Int.MAX_VALUE as long), val: 2147483600.0 as float } # loss of precision - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372000000000000.0 as float } # loss of precision - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MIN_VALUE), val: -9223372000000000000.0 as float } # loss of precision + - { expr: new Long(Long.MAX_VALUE), val: 9223372000000000000.0 as float } # loss of precision - from_type: Long to_type: double @@ -180,8 +180,8 @@ cases: - { expr: new Long(Short.MAX_VALUE as long), val: 32767.0 } - { expr: new Long(Int.MIN_VALUE as long), val: -2147483648.0 } - { expr: new Long(Int.MAX_VALUE as long), val: 2147483647.0 } - - { expr: new Long(Long.MIN_VALUE as long), val: -9223372036854775808.0 } - - { expr: new Long(Long.MAX_VALUE as long), val: 9223372036854775807.0 } + - { expr: new Long(Long.MIN_VALUE), val: -9223372036854775808.0 } + - { expr: new Long(Long.MAX_VALUE), val: 9223372036854775807.0 } - from_type: Float to_type: float @@ -196,8 +196,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.14748365E9 as float } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372E18 as float } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372E18 as float } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.4E-45 as float } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028235E38 as float } + - { expr: new Float(Float.MIN_VALUE), val: 1.4E-45 as float } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028235E38 as float } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY } @@ -214,8 +214,8 @@ cases: - { expr: new Float(Int.MAX_VALUE as float), val: 2.147483648E9 } # loss of precision - { expr: new Float(Long.MIN_VALUE as float), val: -9.223372036854776E18 } # loss of precision - { expr: new Float(Long.MAX_VALUE as float), val: 9.223372036854776E18 } # loss of precision - - { expr: new Float(Float.MIN_VALUE as float), val: 1.401298464324817E-45 } - - { expr: new Float(Float.MAX_VALUE as float), val: 3.4028234663852886E38 } + - { expr: new Float(Float.MIN_VALUE), val: 1.401298464324817E-45 } + - { expr: new Float(Float.MAX_VALUE), val: 3.4028234663852886E38 } - { expr: new Float(Float.NEGATIVE_INFINITY as float), val: Float.NEGATIVE_INFINITY as double } - { expr: new Float(Float.POSITIVE_INFINITY as float), val: Float.POSITIVE_INFINITY as double } @@ -236,8 +236,8 @@ cases: - { expr: new Double(Float.MAX_VALUE as double), val: Float.MAX_VALUE as double } - { expr: new Double(Float.NEGATIVE_INFINITY as double), val: Float.NEGATIVE_INFINITY as double } - { expr: new Double(Float.POSITIVE_INFINITY as double), val: Float.POSITIVE_INFINITY as double } - - { expr: new Double(Double.MIN_VALUE as double), val: Double.MIN_VALUE as double } - - { expr: new Double(Double.MAX_VALUE as double), val: Double.MAX_VALUE as double } + - { expr: new Double(Double.MIN_VALUE), val: Double.MIN_VALUE } + - { expr: new Double(Double.MAX_VALUE), val: Double.MAX_VALUE } - { expr: new Double(Double.NEGATIVE_INFINITY as double), val: Double.NEGATIVE_INFINITY as double } - { expr: new Double(Double.POSITIVE_INFINITY as double), val: Double.POSITIVE_INFINITY as double } diff --git a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_const.params.yaml b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_const.params.yaml index d3499ddbbc..03a0f06141 100644 --- a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_const.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_const.params.yaml @@ -15,37 +15,37 @@ cases: - res: 'number' vals: - - { type: number, expr: Number.MIN_VALUE as number } - - { type: number, expr: Number.MAX_VALUE as number } - - { type: Number, expr: new Number(Number.MIN_VALUE as number) } - - { type: Number, expr: new Number(Number.MAX_VALUE as number) } + - { type: number, expr: Number.MIN_VALUE } + - { type: number, expr: Number.MAX_VALUE } + - { type: Number, expr: new Number(Number.MIN_VALUE) } + - { type: Number, expr: new Number(Number.MAX_VALUE) } - res: 'number' vals: - - { type: byte, expr: Byte.MIN_VALUE as byte } - - { type: byte, expr: Byte.MAX_VALUE as byte } - - { type: Byte, expr: new Byte(Byte.MIN_VALUE as byte) } - - { type: Byte, expr: new Byte(Byte.MAX_VALUE as byte) } - - { type: short, expr: Short.MIN_VALUE as short } - - { type: short, expr: Short.MAX_VALUE as short } - - { type: Short, expr: new Short(Short.MIN_VALUE as short) } - - { type: Short, expr: new Short(Short.MAX_VALUE as short) } - - { type: int, expr: Int.MIN_VALUE as int } - - { type: int, expr: Int.MAX_VALUE as int } - - { type: Int, expr: new Int(Int.MIN_VALUE as int) } - - { type: Int, expr: new Int(Int.MAX_VALUE as int) } - - { type: long, expr: Long.MIN_VALUE as long } - - { type: long, expr: Long.MAX_VALUE as long } - - { type: Long, expr: new Long(Long.MIN_VALUE as long) } - - { type: Long, expr: new Long(Long.MAX_VALUE as long) } - - { type: float, expr: Float.MIN_VALUE as float } - - { type: float, expr: Float.MAX_VALUE as float } - - { type: Float, expr: new Float(Float.MIN_VALUE as float) } - - { type: Float, expr: new Float(Float.MAX_VALUE as float) } - - { type: double, expr: Double.MIN_VALUE as double } - - { type: double, expr: Double.MAX_VALUE as double } - - { type: Double, expr: new Double(Double.MIN_VALUE as double) } - - { type: Double, expr: new Double(Double.MAX_VALUE as double) } + - { type: byte, expr: Byte.MIN_VALUE } + - { type: byte, expr: Byte.MAX_VALUE } + - { type: Byte, expr: new Byte(Byte.MIN_VALUE) } + - { type: Byte, expr: new Byte(Byte.MAX_VALUE) } + - { type: short, expr: Short.MIN_VALUE } + - { type: short, expr: Short.MAX_VALUE } + - { type: Short, expr: new Short(Short.MIN_VALUE) } + - { type: Short, expr: new Short(Short.MAX_VALUE) } + - { type: int, expr: Int.MIN_VALUE } + - { type: int, expr: Int.MAX_VALUE } + - { type: Int, expr: new Int(Int.MIN_VALUE) } + - { type: Int, expr: new Int(Int.MAX_VALUE) } + - { type: long, expr: Long.MIN_VALUE } + - { type: long, expr: Long.MAX_VALUE } + - { type: Long, expr: new Long(Long.MIN_VALUE) } + - { type: Long, expr: new Long(Long.MAX_VALUE) } + - { type: float, expr: Float.MIN_VALUE } + - { type: float, expr: Float.MAX_VALUE } + - { type: Float, expr: new Float(Float.MIN_VALUE) } + - { type: Float, expr: new Float(Float.MAX_VALUE) } + - { type: double, expr: Double.MIN_VALUE } + - { type: double, expr: Double.MAX_VALUE } + - { type: Double, expr: new Double(Double.MIN_VALUE) } + - { type: Double, expr: new Double(Double.MAX_VALUE) } - { type: char, expr: Char.MIN_VALUE as char } - { type: char, expr: Char.MAX_VALUE as char } - { type: Char, expr: new Char(Char.MIN_VALUE as char) } @@ -96,25 +96,25 @@ cases: - res: 'object' vals: - - { type: 'number[]', expr: '[Number.MIN_VALUE as number]' } - - { type: 'number[]', expr: '[Number.MAX_VALUE as number]' } - - { type: 'Number[]', expr: '[new Number(Number.MIN_VALUE as number)]' } - - { type: 'Number[]', expr: '[new Number(Number.MAX_VALUE as number)]' } + - { type: 'number[]', expr: '[Number.MIN_VALUE]' } + - { type: 'number[]', expr: '[Number.MAX_VALUE]' } + - { type: 'Number[]', expr: '[new Number(Number.MIN_VALUE)]' } + - { type: 'Number[]', expr: '[new Number(Number.MAX_VALUE)]' } - res: 'object' vals: - - { type: 'byte[]', expr: '[Byte.MIN_VALUE as byte]' } - - { type: 'Byte[]', expr: '[new Byte(Byte.MIN_VALUE as byte)]' } - - { type: 'short[]', expr: '[Short.MIN_VALUE as short]' } - - { type: 'Short[]', expr: '[new Short(Short.MIN_VALUE as short)]' } - - { type: 'int[]', expr: '[Int.MAX_VALUE as int]' } - - { type: 'Int[]', expr: '[new Int(Int.MIN_VALUE as int)]' } - - { type: 'long[]', expr: '[Long.MIN_VALUE as long]' } - - { type: 'Long[]', expr: '[new Long(Long.MIN_VALUE as long)]' } - - { type: 'float[]', expr: '[Float.MIN_VALUE as float]' } - - { type: 'Float[]', expr: '[new Float(Float.MIN_VALUE as float)]' } - - { type: 'double[]', expr: '[Double.MIN_VALUE as double]' } - - { type: 'Double[]', expr: '[new Double(Double.MIN_VALUE as double)]' } + - { type: 'byte[]', expr: '[Byte.MIN_VALUE]' } + - { type: 'Byte[]', expr: '[new Byte(Byte.MIN_VALUE)]' } + - { type: 'short[]', expr: '[Short.MIN_VALUE]' } + - { type: 'Short[]', expr: '[new Short(Short.MIN_VALUE)]' } + - { type: 'int[]', expr: '[Int.MAX_VALUE]' } + - { type: 'Int[]', expr: '[new Int(Int.MIN_VALUE)]' } + - { type: 'long[]', expr: '[Long.MIN_VALUE]' } + - { type: 'Long[]', expr: '[new Long(Long.MIN_VALUE)]' } + - { type: 'float[]', expr: '[Float.MIN_VALUE]' } + - { type: 'Float[]', expr: '[new Float(Float.MIN_VALUE)]' } + - { type: 'double[]', expr: '[Double.MIN_VALUE]' } + - { type: 'Double[]', expr: '[new Double(Double.MIN_VALUE)]' } - { type: 'char[]', expr: '[Char.MIN_VALUE as char]' } - { type: 'Char[]', expr: '[new Char(Char.MAX_VALUE as char)]' } diff --git a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_func.params.yaml b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_func.params.yaml index d411424f9b..94e6cfcc8b 100644 --- a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_func.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_func.params.yaml @@ -15,37 +15,37 @@ cases: - res: 'number' vals: - - { type: number, expr: Number.MIN_VALUE as number } - - { type: number, expr: Number.MAX_VALUE as number } - - { type: Number, expr: new Number(Number.MIN_VALUE as number) } - - { type: Number, expr: new Number(Number.MAX_VALUE as number) } + - { type: number, expr: Number.MIN_VALUE } + - { type: number, expr: Number.MAX_VALUE } + - { type: Number, expr: new Number(Number.MIN_VALUE) } + - { type: Number, expr: new Number(Number.MAX_VALUE) } - res: 'number' vals: - - { type: byte, expr: Byte.MIN_VALUE as byte } - - { type: byte, expr: Byte.MAX_VALUE as byte } - - { type: Byte, expr: new Byte(Byte.MIN_VALUE as byte) } - - { type: Byte, expr: new Byte(Byte.MAX_VALUE as byte) } - - { type: short, expr: Short.MIN_VALUE as short } - - { type: short, expr: Short.MAX_VALUE as short } - - { type: Short, expr: new Short(Short.MIN_VALUE as short) } - - { type: Short, expr: new Short(Short.MAX_VALUE as short) } - - { type: int, expr: Int.MIN_VALUE as int } - - { type: int, expr: Int.MAX_VALUE as int } - - { type: Int, expr: new Int(Int.MIN_VALUE as int) } - - { type: Int, expr: new Int(Int.MAX_VALUE as int) } - - { type: long, expr: Long.MIN_VALUE as long } - - { type: long, expr: Long.MAX_VALUE as long } - - { type: Long, expr: new Long(Long.MIN_VALUE as long) } - - { type: Long, expr: new Long(Long.MAX_VALUE as long) } - - { type: float, expr: Float.MIN_VALUE as float } - - { type: float, expr: Float.MAX_VALUE as float } - - { type: Float, expr: new Float(Float.MIN_VALUE as float) } - - { type: Float, expr: new Float(Float.MAX_VALUE as float) } - - { type: double, expr: Double.MIN_VALUE as double } - - { type: double, expr: Double.MAX_VALUE as double } - - { type: Double, expr: new Double(Double.MIN_VALUE as double) } - - { type: Double, expr: new Double(Double.MAX_VALUE as double) } + - { type: byte, expr: Byte.MIN_VALUE } + - { type: byte, expr: Byte.MAX_VALUE } + - { type: Byte, expr: new Byte(Byte.MIN_VALUE) } + - { type: Byte, expr: new Byte(Byte.MAX_VALUE) } + - { type: short, expr: Short.MIN_VALUE } + - { type: short, expr: Short.MAX_VALUE } + - { type: Short, expr: new Short(Short.MIN_VALUE) } + - { type: Short, expr: new Short(Short.MAX_VALUE) } + - { type: int, expr: Int.MIN_VALUE } + - { type: int, expr: Int.MAX_VALUE } + - { type: Int, expr: new Int(Int.MIN_VALUE) } + - { type: Int, expr: new Int(Int.MAX_VALUE) } + - { type: long, expr: Long.MIN_VALUE } + - { type: long, expr: Long.MAX_VALUE } + - { type: Long, expr: new Long(Long.MIN_VALUE) } + - { type: Long, expr: new Long(Long.MAX_VALUE) } + - { type: float, expr: Float.MIN_VALUE } + - { type: float, expr: Float.MAX_VALUE } + - { type: Float, expr: new Float(Float.MIN_VALUE) } + - { type: Float, expr: new Float(Float.MAX_VALUE) } + - { type: double, expr: Double.MIN_VALUE } + - { type: double, expr: Double.MAX_VALUE } + - { type: Double, expr: new Double(Double.MIN_VALUE) } + - { type: Double, expr: new Double(Double.MAX_VALUE) } - { type: char, expr: Char.MIN_VALUE as char } - { type: char, expr: Char.MAX_VALUE as char } - { type: Char, expr: new Char(Char.MIN_VALUE as char) } @@ -94,25 +94,25 @@ cases: - res: 'object' vals: - - { type: 'number[]', expr: '[Number.MIN_VALUE as number]' } - - { type: 'number[]', expr: '[Number.MAX_VALUE as number]' } - - { type: 'Number[]', expr: '[new Number(Number.MIN_VALUE as number)]' } - - { type: 'Number[]', expr: '[new Number(Number.MAX_VALUE as number)]' } + - { type: 'number[]', expr: '[Number.MIN_VALUE]' } + - { type: 'number[]', expr: '[Number.MAX_VALUE]' } + - { type: 'Number[]', expr: '[new Number(Number.MIN_VALUE)]' } + - { type: 'Number[]', expr: '[new Number(Number.MAX_VALUE)]' } - res: 'object' vals: - - { type: 'byte[]', expr: '[Byte.MIN_VALUE as byte]' } - - { type: 'Byte[]', expr: '[new Byte(Byte.MIN_VALUE as byte)]' } - - { type: 'short[]', expr: '[Short.MIN_VALUE as short]' } - - { type: 'Short[]', expr: '[new Short(Short.MIN_VALUE as short)]' } - - { type: 'int[]', expr: '[Int.MAX_VALUE as int]' } - - { type: 'Int[]', expr: '[new Int(Int.MIN_VALUE as int)]' } - - { type: 'long[]', expr: '[Long.MIN_VALUE as long]' } - - { type: 'Long[]', expr: '[new Long(Long.MIN_VALUE as long)]' } - - { type: 'float[]', expr: '[Float.MIN_VALUE as float]' } - - { type: 'Float[]', expr: '[new Float(Float.MIN_VALUE as float)]' } - - { type: 'double[]', expr: '[Double.MIN_VALUE as double]' } - - { type: 'Double[]', expr: '[new Double(Double.MIN_VALUE as double)]' } + - { type: 'byte[]', expr: '[Byte.MIN_VALUE]' } + - { type: 'Byte[]', expr: '[new Byte(Byte.MIN_VALUE)]' } + - { type: 'short[]', expr: '[Short.MIN_VALUE]' } + - { type: 'Short[]', expr: '[new Short(Short.MIN_VALUE)]' } + - { type: 'int[]', expr: '[Int.MAX_VALUE]' } + - { type: 'Int[]', expr: '[new Int(Int.MIN_VALUE)]' } + - { type: 'long[]', expr: '[Long.MIN_VALUE]' } + - { type: 'Long[]', expr: '[new Long(Long.MIN_VALUE)]' } + - { type: 'float[]', expr: '[Float.MIN_VALUE]' } + - { type: 'Float[]', expr: '[new Float(Float.MIN_VALUE)]' } + - { type: 'double[]', expr: '[Double.MIN_VALUE]' } + - { type: 'Double[]', expr: '[new Double(Double.MIN_VALUE)]' } - { type: 'char[]', expr: '[Char.MIN_VALUE as char]' } - { type: 'Char[]', expr: '[new Char(Char.MAX_VALUE as char)]' } diff --git a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_meth.params.yaml b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_meth.params.yaml index d411424f9b..94e6cfcc8b 100644 --- a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_meth.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_meth.params.yaml @@ -15,37 +15,37 @@ cases: - res: 'number' vals: - - { type: number, expr: Number.MIN_VALUE as number } - - { type: number, expr: Number.MAX_VALUE as number } - - { type: Number, expr: new Number(Number.MIN_VALUE as number) } - - { type: Number, expr: new Number(Number.MAX_VALUE as number) } + - { type: number, expr: Number.MIN_VALUE } + - { type: number, expr: Number.MAX_VALUE } + - { type: Number, expr: new Number(Number.MIN_VALUE) } + - { type: Number, expr: new Number(Number.MAX_VALUE) } - res: 'number' vals: - - { type: byte, expr: Byte.MIN_VALUE as byte } - - { type: byte, expr: Byte.MAX_VALUE as byte } - - { type: Byte, expr: new Byte(Byte.MIN_VALUE as byte) } - - { type: Byte, expr: new Byte(Byte.MAX_VALUE as byte) } - - { type: short, expr: Short.MIN_VALUE as short } - - { type: short, expr: Short.MAX_VALUE as short } - - { type: Short, expr: new Short(Short.MIN_VALUE as short) } - - { type: Short, expr: new Short(Short.MAX_VALUE as short) } - - { type: int, expr: Int.MIN_VALUE as int } - - { type: int, expr: Int.MAX_VALUE as int } - - { type: Int, expr: new Int(Int.MIN_VALUE as int) } - - { type: Int, expr: new Int(Int.MAX_VALUE as int) } - - { type: long, expr: Long.MIN_VALUE as long } - - { type: long, expr: Long.MAX_VALUE as long } - - { type: Long, expr: new Long(Long.MIN_VALUE as long) } - - { type: Long, expr: new Long(Long.MAX_VALUE as long) } - - { type: float, expr: Float.MIN_VALUE as float } - - { type: float, expr: Float.MAX_VALUE as float } - - { type: Float, expr: new Float(Float.MIN_VALUE as float) } - - { type: Float, expr: new Float(Float.MAX_VALUE as float) } - - { type: double, expr: Double.MIN_VALUE as double } - - { type: double, expr: Double.MAX_VALUE as double } - - { type: Double, expr: new Double(Double.MIN_VALUE as double) } - - { type: Double, expr: new Double(Double.MAX_VALUE as double) } + - { type: byte, expr: Byte.MIN_VALUE } + - { type: byte, expr: Byte.MAX_VALUE } + - { type: Byte, expr: new Byte(Byte.MIN_VALUE) } + - { type: Byte, expr: new Byte(Byte.MAX_VALUE) } + - { type: short, expr: Short.MIN_VALUE } + - { type: short, expr: Short.MAX_VALUE } + - { type: Short, expr: new Short(Short.MIN_VALUE) } + - { type: Short, expr: new Short(Short.MAX_VALUE) } + - { type: int, expr: Int.MIN_VALUE } + - { type: int, expr: Int.MAX_VALUE } + - { type: Int, expr: new Int(Int.MIN_VALUE) } + - { type: Int, expr: new Int(Int.MAX_VALUE) } + - { type: long, expr: Long.MIN_VALUE } + - { type: long, expr: Long.MAX_VALUE } + - { type: Long, expr: new Long(Long.MIN_VALUE) } + - { type: Long, expr: new Long(Long.MAX_VALUE) } + - { type: float, expr: Float.MIN_VALUE } + - { type: float, expr: Float.MAX_VALUE } + - { type: Float, expr: new Float(Float.MIN_VALUE) } + - { type: Float, expr: new Float(Float.MAX_VALUE) } + - { type: double, expr: Double.MIN_VALUE } + - { type: double, expr: Double.MAX_VALUE } + - { type: Double, expr: new Double(Double.MIN_VALUE) } + - { type: Double, expr: new Double(Double.MAX_VALUE) } - { type: char, expr: Char.MIN_VALUE as char } - { type: char, expr: Char.MAX_VALUE as char } - { type: Char, expr: new Char(Char.MIN_VALUE as char) } @@ -94,25 +94,25 @@ cases: - res: 'object' vals: - - { type: 'number[]', expr: '[Number.MIN_VALUE as number]' } - - { type: 'number[]', expr: '[Number.MAX_VALUE as number]' } - - { type: 'Number[]', expr: '[new Number(Number.MIN_VALUE as number)]' } - - { type: 'Number[]', expr: '[new Number(Number.MAX_VALUE as number)]' } + - { type: 'number[]', expr: '[Number.MIN_VALUE]' } + - { type: 'number[]', expr: '[Number.MAX_VALUE]' } + - { type: 'Number[]', expr: '[new Number(Number.MIN_VALUE)]' } + - { type: 'Number[]', expr: '[new Number(Number.MAX_VALUE)]' } - res: 'object' vals: - - { type: 'byte[]', expr: '[Byte.MIN_VALUE as byte]' } - - { type: 'Byte[]', expr: '[new Byte(Byte.MIN_VALUE as byte)]' } - - { type: 'short[]', expr: '[Short.MIN_VALUE as short]' } - - { type: 'Short[]', expr: '[new Short(Short.MIN_VALUE as short)]' } - - { type: 'int[]', expr: '[Int.MAX_VALUE as int]' } - - { type: 'Int[]', expr: '[new Int(Int.MIN_VALUE as int)]' } - - { type: 'long[]', expr: '[Long.MIN_VALUE as long]' } - - { type: 'Long[]', expr: '[new Long(Long.MIN_VALUE as long)]' } - - { type: 'float[]', expr: '[Float.MIN_VALUE as float]' } - - { type: 'Float[]', expr: '[new Float(Float.MIN_VALUE as float)]' } - - { type: 'double[]', expr: '[Double.MIN_VALUE as double]' } - - { type: 'Double[]', expr: '[new Double(Double.MIN_VALUE as double)]' } + - { type: 'byte[]', expr: '[Byte.MIN_VALUE]' } + - { type: 'Byte[]', expr: '[new Byte(Byte.MIN_VALUE)]' } + - { type: 'short[]', expr: '[Short.MIN_VALUE]' } + - { type: 'Short[]', expr: '[new Short(Short.MIN_VALUE)]' } + - { type: 'int[]', expr: '[Int.MAX_VALUE]' } + - { type: 'Int[]', expr: '[new Int(Int.MIN_VALUE)]' } + - { type: 'long[]', expr: '[Long.MIN_VALUE]' } + - { type: 'Long[]', expr: '[new Long(Long.MIN_VALUE)]' } + - { type: 'float[]', expr: '[Float.MIN_VALUE]' } + - { type: 'Float[]', expr: '[new Float(Float.MIN_VALUE)]' } + - { type: 'double[]', expr: '[Double.MIN_VALUE]' } + - { type: 'Double[]', expr: '[new Double(Double.MIN_VALUE)]' } - { type: 'char[]', expr: '[Char.MIN_VALUE as char]' } - { type: 'Char[]', expr: '[new Char(Char.MAX_VALUE as char)]' } diff --git a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_obj.params.yaml b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_obj.params.yaml index 92215a65ab..516b08f3a5 100644 --- a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_obj.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_obj.params.yaml @@ -15,37 +15,37 @@ cases: - res: 'number' vals: - - { type: number, expr: Number.MIN_VALUE as number } - - { type: number, expr: Number.MAX_VALUE as number } - - { type: Number, init_value: 0, expr: new Number(Number.MIN_VALUE as number) } - - { type: Number, init_value: 0, expr: new Number(Number.MAX_VALUE as number) } + - { type: number, expr: Number.MIN_VALUE } + - { type: number, expr: Number.MAX_VALUE } + - { type: Number, init_value: 0, expr: new Number(Number.MIN_VALUE) } + - { type: Number, init_value: 0, expr: new Number(Number.MAX_VALUE) } - res: 'number' vals: - - { type: byte, expr: Byte.MIN_VALUE as byte } - - { type: byte, expr: Byte.MAX_VALUE as byte } - - { type: Byte, init_value: 0, expr: new Byte(Byte.MIN_VALUE as byte) } - - { type: Byte, init_value: 0, expr: new Byte(Byte.MAX_VALUE as byte) } - - { type: short, expr: Short.MIN_VALUE as short } - - { type: short, expr: Short.MAX_VALUE as short } - - { type: Short, init_value: 0, expr: new Short(Short.MIN_VALUE as short) } - - { type: Short, init_value: 0, expr: new Short(Short.MAX_VALUE as short) } - - { type: int, expr: Int.MIN_VALUE as int } - - { type: int, expr: Int.MAX_VALUE as int } - - { type: Int, init_value: 0, expr: new Int(Int.MIN_VALUE as int) } - - { type: Int, init_value: 0, expr: new Int(Int.MAX_VALUE as int) } - - { type: long, expr: Long.MIN_VALUE as long } - - { type: long, expr: Long.MAX_VALUE as long } - - { type: Long, init_value: 0, expr: new Long(Long.MIN_VALUE as long) } - - { type: Long, init_value: 0, expr: new Long(Long.MAX_VALUE as long) } - - { type: float, expr: Float.MIN_VALUE as float } - - { type: float, expr: Float.MAX_VALUE as float } - - { type: Float, init_value: 0.0f, expr: new Float(Float.MIN_VALUE as float) } - - { type: Float, init_value: 0.0f, expr: new Float(Float.MAX_VALUE as float) } - - { type: double, expr: Double.MIN_VALUE as double } - - { type: double, expr: Double.MAX_VALUE as double } - - { type: Double, init_value: 0.0, expr: new Double(Double.MIN_VALUE as double) } - - { type: Double, init_value: 0.0, expr: new Double(Double.MAX_VALUE as double) } + - { type: byte, expr: Byte.MIN_VALUE } + - { type: byte, expr: Byte.MAX_VALUE } + - { type: Byte, init_value: 0, expr: new Byte(Byte.MIN_VALUE) } + - { type: Byte, init_value: 0, expr: new Byte(Byte.MAX_VALUE) } + - { type: short, expr: Short.MIN_VALUE } + - { type: short, expr: Short.MAX_VALUE } + - { type: Short, init_value: 0, expr: new Short(Short.MIN_VALUE) } + - { type: Short, init_value: 0, expr: new Short(Short.MAX_VALUE) } + - { type: int, expr: Int.MIN_VALUE } + - { type: int, expr: Int.MAX_VALUE } + - { type: Int, init_value: 0, expr: new Int(Int.MIN_VALUE) } + - { type: Int, init_value: 0, expr: new Int(Int.MAX_VALUE) } + - { type: long, expr: Long.MIN_VALUE } + - { type: long, expr: Long.MAX_VALUE } + - { type: Long, init_value: 0, expr: new Long(Long.MIN_VALUE) } + - { type: Long, init_value: 0, expr: new Long(Long.MAX_VALUE) } + - { type: float, expr: Float.MIN_VALUE } + - { type: float, expr: Float.MAX_VALUE } + - { type: Float, init_value: 0.0f, expr: new Float(Float.MIN_VALUE) } + - { type: Float, init_value: 0.0f, expr: new Float(Float.MAX_VALUE) } + - { type: double, expr: Double.MIN_VALUE } + - { type: double, expr: Double.MAX_VALUE } + - { type: Double, init_value: 0.0, expr: new Double(Double.MIN_VALUE) } + - { type: Double, init_value: 0.0, expr: new Double(Double.MAX_VALUE) } - { type: char, expr: Char.MIN_VALUE as char } - { type: char, expr: Char.MAX_VALUE as char } - { type: Char, init_value: "c'\\0'", expr: new Char(Char.MIN_VALUE as char) } @@ -94,25 +94,25 @@ cases: - res: 'object' vals: - - { type: 'number[]', init_value: '[]', expr: '[Number.MIN_VALUE as number]' } - - { type: 'number[]', init_value: '[]', expr: '[Number.MAX_VALUE as number]' } - - { type: 'Number[]', init_value: '[]', expr: '[new Number(Number.MIN_VALUE as number)]' } - - { type: 'Number[]', init_value: '[]', expr: '[new Number(Number.MAX_VALUE as number)]' } + - { type: 'number[]', init_value: '[]', expr: '[Number.MIN_VALUE]' } + - { type: 'number[]', init_value: '[]', expr: '[Number.MAX_VALUE]' } + - { type: 'Number[]', init_value: '[]', expr: '[new Number(Number.MIN_VALUE)]' } + - { type: 'Number[]', init_value: '[]', expr: '[new Number(Number.MAX_VALUE)]' } - res: 'object' vals: - - { type: 'byte[]', init_value: '[]', expr: '[Byte.MIN_VALUE as byte]' } - - { type: 'Byte[]', init_value: '[]', expr: '[new Byte(Byte.MIN_VALUE as byte)]' } - - { type: 'short[]', init_value: '[]', expr: '[Short.MIN_VALUE as short]' } - - { type: 'Short[]', init_value: '[]', expr: '[new Short(Short.MIN_VALUE as short)]' } - - { type: 'int[]', init_value: '[]', expr: '[Int.MAX_VALUE as int]' } - - { type: 'Int[]', init_value: '[]', expr: '[new Int(Int.MIN_VALUE as int)]' } - - { type: 'long[]', init_value: '[]', expr: '[Long.MIN_VALUE as long]' } - - { type: 'Long[]', init_value: '[]', expr: '[new Long(Long.MIN_VALUE as long)]' } - - { type: 'float[]', init_value: '[]', expr: '[Float.MIN_VALUE as float]' } - - { type: 'Float[]', init_value: '[]', expr: '[new Float(Float.MIN_VALUE as float)]' } - - { type: 'double[]', init_value: '[]', expr: '[Double.MIN_VALUE as double]' } - - { type: 'Double[]', init_value: '[]', expr: '[new Double(Double.MIN_VALUE as double)]' } + - { type: 'byte[]', init_value: '[]', expr: '[Byte.MIN_VALUE]' } + - { type: 'Byte[]', init_value: '[]', expr: '[new Byte(Byte.MIN_VALUE)]' } + - { type: 'short[]', init_value: '[]', expr: '[Short.MIN_VALUE]' } + - { type: 'Short[]', init_value: '[]', expr: '[new Short(Short.MIN_VALUE)]' } + - { type: 'int[]', init_value: '[]', expr: '[Int.MAX_VALUE]' } + - { type: 'Int[]', init_value: '[]', expr: '[new Int(Int.MIN_VALUE)]' } + - { type: 'long[]', init_value: '[]', expr: '[Long.MIN_VALUE]' } + - { type: 'Long[]', init_value: '[]', expr: '[new Long(Long.MIN_VALUE)]' } + - { type: 'float[]', init_value: '[]', expr: '[Float.MIN_VALUE]' } + - { type: 'Float[]', init_value: '[]', expr: '[new Float(Float.MIN_VALUE)]' } + - { type: 'double[]', init_value: '[]', expr: '[Double.MIN_VALUE]' } + - { type: 'Double[]', init_value: '[]', expr: '[new Double(Double.MIN_VALUE)]' } - { type: 'char[]', init_value: '[]', expr: '[Char.MIN_VALUE as char]' } - { type: 'Char[]', init_value: '[]', expr: '[new Char(Char.MAX_VALUE as char)]' } diff --git a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_vars.params.yaml b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_vars.params.yaml index d411424f9b..94e6cfcc8b 100644 --- a/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_vars.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/07.expressions/17.typeof_expression/tof_vars.params.yaml @@ -15,37 +15,37 @@ cases: - res: 'number' vals: - - { type: number, expr: Number.MIN_VALUE as number } - - { type: number, expr: Number.MAX_VALUE as number } - - { type: Number, expr: new Number(Number.MIN_VALUE as number) } - - { type: Number, expr: new Number(Number.MAX_VALUE as number) } + - { type: number, expr: Number.MIN_VALUE } + - { type: number, expr: Number.MAX_VALUE } + - { type: Number, expr: new Number(Number.MIN_VALUE) } + - { type: Number, expr: new Number(Number.MAX_VALUE) } - res: 'number' vals: - - { type: byte, expr: Byte.MIN_VALUE as byte } - - { type: byte, expr: Byte.MAX_VALUE as byte } - - { type: Byte, expr: new Byte(Byte.MIN_VALUE as byte) } - - { type: Byte, expr: new Byte(Byte.MAX_VALUE as byte) } - - { type: short, expr: Short.MIN_VALUE as short } - - { type: short, expr: Short.MAX_VALUE as short } - - { type: Short, expr: new Short(Short.MIN_VALUE as short) } - - { type: Short, expr: new Short(Short.MAX_VALUE as short) } - - { type: int, expr: Int.MIN_VALUE as int } - - { type: int, expr: Int.MAX_VALUE as int } - - { type: Int, expr: new Int(Int.MIN_VALUE as int) } - - { type: Int, expr: new Int(Int.MAX_VALUE as int) } - - { type: long, expr: Long.MIN_VALUE as long } - - { type: long, expr: Long.MAX_VALUE as long } - - { type: Long, expr: new Long(Long.MIN_VALUE as long) } - - { type: Long, expr: new Long(Long.MAX_VALUE as long) } - - { type: float, expr: Float.MIN_VALUE as float } - - { type: float, expr: Float.MAX_VALUE as float } - - { type: Float, expr: new Float(Float.MIN_VALUE as float) } - - { type: Float, expr: new Float(Float.MAX_VALUE as float) } - - { type: double, expr: Double.MIN_VALUE as double } - - { type: double, expr: Double.MAX_VALUE as double } - - { type: Double, expr: new Double(Double.MIN_VALUE as double) } - - { type: Double, expr: new Double(Double.MAX_VALUE as double) } + - { type: byte, expr: Byte.MIN_VALUE } + - { type: byte, expr: Byte.MAX_VALUE } + - { type: Byte, expr: new Byte(Byte.MIN_VALUE) } + - { type: Byte, expr: new Byte(Byte.MAX_VALUE) } + - { type: short, expr: Short.MIN_VALUE } + - { type: short, expr: Short.MAX_VALUE } + - { type: Short, expr: new Short(Short.MIN_VALUE) } + - { type: Short, expr: new Short(Short.MAX_VALUE) } + - { type: int, expr: Int.MIN_VALUE } + - { type: int, expr: Int.MAX_VALUE } + - { type: Int, expr: new Int(Int.MIN_VALUE) } + - { type: Int, expr: new Int(Int.MAX_VALUE) } + - { type: long, expr: Long.MIN_VALUE } + - { type: long, expr: Long.MAX_VALUE } + - { type: Long, expr: new Long(Long.MIN_VALUE) } + - { type: Long, expr: new Long(Long.MAX_VALUE) } + - { type: float, expr: Float.MIN_VALUE } + - { type: float, expr: Float.MAX_VALUE } + - { type: Float, expr: new Float(Float.MIN_VALUE) } + - { type: Float, expr: new Float(Float.MAX_VALUE) } + - { type: double, expr: Double.MIN_VALUE } + - { type: double, expr: Double.MAX_VALUE } + - { type: Double, expr: new Double(Double.MIN_VALUE) } + - { type: Double, expr: new Double(Double.MAX_VALUE) } - { type: char, expr: Char.MIN_VALUE as char } - { type: char, expr: Char.MAX_VALUE as char } - { type: Char, expr: new Char(Char.MIN_VALUE as char) } @@ -94,25 +94,25 @@ cases: - res: 'object' vals: - - { type: 'number[]', expr: '[Number.MIN_VALUE as number]' } - - { type: 'number[]', expr: '[Number.MAX_VALUE as number]' } - - { type: 'Number[]', expr: '[new Number(Number.MIN_VALUE as number)]' } - - { type: 'Number[]', expr: '[new Number(Number.MAX_VALUE as number)]' } + - { type: 'number[]', expr: '[Number.MIN_VALUE]' } + - { type: 'number[]', expr: '[Number.MAX_VALUE]' } + - { type: 'Number[]', expr: '[new Number(Number.MIN_VALUE)]' } + - { type: 'Number[]', expr: '[new Number(Number.MAX_VALUE)]' } - res: 'object' vals: - - { type: 'byte[]', expr: '[Byte.MIN_VALUE as byte]' } - - { type: 'Byte[]', expr: '[new Byte(Byte.MIN_VALUE as byte)]' } - - { type: 'short[]', expr: '[Short.MIN_VALUE as short]' } - - { type: 'Short[]', expr: '[new Short(Short.MIN_VALUE as short)]' } - - { type: 'int[]', expr: '[Int.MAX_VALUE as int]' } - - { type: 'Int[]', expr: '[new Int(Int.MIN_VALUE as int)]' } - - { type: 'long[]', expr: '[Long.MIN_VALUE as long]' } - - { type: 'Long[]', expr: '[new Long(Long.MIN_VALUE as long)]' } - - { type: 'float[]', expr: '[Float.MIN_VALUE as float]' } - - { type: 'Float[]', expr: '[new Float(Float.MIN_VALUE as float)]' } - - { type: 'double[]', expr: '[Double.MIN_VALUE as double]' } - - { type: 'Double[]', expr: '[new Double(Double.MIN_VALUE as double)]' } + - { type: 'byte[]', expr: '[Byte.MIN_VALUE]' } + - { type: 'Byte[]', expr: '[new Byte(Byte.MIN_VALUE)]' } + - { type: 'short[]', expr: '[Short.MIN_VALUE]' } + - { type: 'Short[]', expr: '[new Short(Short.MIN_VALUE)]' } + - { type: 'int[]', expr: '[Int.MAX_VALUE]' } + - { type: 'Int[]', expr: '[new Int(Int.MIN_VALUE)]' } + - { type: 'long[]', expr: '[Long.MIN_VALUE]' } + - { type: 'Long[]', expr: '[new Long(Long.MIN_VALUE)]' } + - { type: 'float[]', expr: '[Float.MIN_VALUE]' } + - { type: 'Float[]', expr: '[new Float(Float.MIN_VALUE)]' } + - { type: 'double[]', expr: '[Double.MIN_VALUE]' } + - { type: 'Double[]', expr: '[new Double(Double.MIN_VALUE)]' } - { type: 'char[]', expr: '[Char.MIN_VALUE as char]' } - { type: 'Char[]', expr: '[new Char(Char.MAX_VALUE as char)]' } diff --git a/static_core/plugins/ets/tests/ets-templates/07.expressions/31.string_interpolation_expressions/siexp.params.yaml b/static_core/plugins/ets/tests/ets-templates/07.expressions/31.string_interpolation_expressions/siexp.params.yaml index a2e26e2b02..018fb88819 100644 --- a/static_core/plugins/ets/tests/ets-templates/07.expressions/31.string_interpolation_expressions/siexp.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/07.expressions/31.string_interpolation_expressions/siexp.params.yaml @@ -13,21 +13,21 @@ --- cases: - use: |- - const b1: byte = Byte.MIN_VALUE as byte + const b1: byte = Byte.MIN_VALUE const b2: byte = 0 as byte - const b3: byte = Byte.MAX_VALUE as byte - const s1: short = Short.MIN_VALUE as short + const b3: byte = Byte.MAX_VALUE + const s1: short = Short.MIN_VALUE const s2: short = 0 as short - const s3: short = Short.MAX_VALUE as short - const i1: int = Int.MIN_VALUE as int + const s3: short = Short.MAX_VALUE + const i1: int = Int.MIN_VALUE const i2: int = 0 as int - const i3: int = Int.MAX_VALUE as int + const i3: int = Int.MAX_VALUE const l1: long = Long.MIN_VALUE const l2: long = 0 as long const l3: long = Long.MAX_VALUE - const f1: float = Float.MIN_VALUE as float + const f1: float = Float.MIN_VALUE const f2: float = 0.0 as float - const f3: float = Float.MAX_VALUE as float + const f3: float = Float.MAX_VALUE const n1: number = Number.MIN_VALUE const n2: number = 0.0 const n3: number = Number.MAX_VALUE @@ -36,21 +36,21 @@ cases: const expected = 'A -128 B 0 C 127 D -32768 E 0 F 32767 G -2147483648 H 0 I 2147483647 J -9223372036854775808 K 0 L 9223372036854775807 M 1e-45 N 0 P 3.4028235e+38 Q 5e-324 R 0 S 1.7976931348623157e+308' - use: |- - const b1: Byte = Byte.MIN_VALUE as byte + const b1: Byte = Byte.MIN_VALUE const b2: Byte = 0 as byte - const b3: Byte = Byte.MAX_VALUE as byte - const s1: Short = Short.MIN_VALUE as short + const b3: Byte = Byte.MAX_VALUE + const s1: Short = Short.MIN_VALUE const s2: Short = 0 as short - const s3: Short = Short.MAX_VALUE as short - const i1: Int = Int.MIN_VALUE as int + const s3: Short = Short.MAX_VALUE + const i1: Int = Int.MIN_VALUE const i2: Int = 0 as int - const i3: Int = Int.MAX_VALUE as int + const i3: Int = Int.MAX_VALUE const l1: Long = Long.MIN_VALUE const l2: Long = 0 as long const l3: Long = Long.MAX_VALUE - const f1: Float = Float.MIN_VALUE as float + const f1: Float = Float.MIN_VALUE const f2: Float = 0.0 as float - const f3: Float = Float.MAX_VALUE as float + const f3: Float = Float.MAX_VALUE const n1: Number = Number.MIN_VALUE const n2: Number = 0.0 const n3: Number = Number.MAX_VALUE diff --git a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/cond_t2.params.yaml b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/cond_t2.params.yaml index d820273a59..8f626b2ee8 100644 --- a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/cond_t2.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/cond_t2.params.yaml @@ -21,11 +21,11 @@ cases: - { val: '0.0000000001', type: 'double' } - { val: '0.000001', type: 'float' } - - { val: 'Byte.MIN_VALUE as byte', type: 'byte' } - - { val: 'Byte.MAX_VALUE as byte', type: 'byte' } + - { val: 'Byte.MIN_VALUE', type: 'byte' } + - { val: 'Byte.MAX_VALUE', type: 'byte' } - - { val: 'Short.MIN_VALUE as short', type: 'short' } - - { val: 'Short.MAX_VALUE as short', type: 'short' } + - { val: 'Short.MIN_VALUE', type: 'short' } + - { val: 'Short.MAX_VALUE', type: 'short' } - { val: 'Int.MIN_VALUE', type: 'int' } - { val: 'Int.MAX_VALUE', type: 'int' } @@ -45,14 +45,14 @@ cases: - { val: 'Float.MIN_VALUE', type: 'float' } - { val: 'Float.MAX_VALUE', type: 'float' } - - { val: 'new Byte(Byte.MIN_VALUE as byte)', type: 'Byte' } - - { val: 'new Byte(Byte.MAX_VALUE as byte)', type: 'Byte' } + - { val: 'new Byte(Byte.MIN_VALUE)', type: 'Byte' } + - { val: 'new Byte(Byte.MAX_VALUE)', type: 'Byte' } - - { val: 'new Short(Short.MIN_VALUE as short)', type: 'Short' } - - { val: 'new Short(Short.MAX_VALUE as short)', type: 'Short' } + - { val: 'new Short(Short.MIN_VALUE)', type: 'Short' } + - { val: 'new Short(Short.MAX_VALUE)', type: 'Short' } - - { val: 'new Int(Int.MIN_VALUE as int)', type: 'Int' } - - { val: 'new Int(Int.MAX_VALUE as int)', type: 'Int' } + - { val: 'new Int(Int.MIN_VALUE)', type: 'Int' } + - { val: 'new Int(Int.MAX_VALUE)', type: 'Int' } - { val: 'new Long(Long.MIN_VALUE)', type: 'Long' } - { val: 'new Long(Long.MAX_VALUE)', type: 'Long' } diff --git a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/do_t.params.yaml b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/do_t.params.yaml index d820273a59..8f626b2ee8 100644 --- a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/do_t.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/do_t.params.yaml @@ -21,11 +21,11 @@ cases: - { val: '0.0000000001', type: 'double' } - { val: '0.000001', type: 'float' } - - { val: 'Byte.MIN_VALUE as byte', type: 'byte' } - - { val: 'Byte.MAX_VALUE as byte', type: 'byte' } + - { val: 'Byte.MIN_VALUE', type: 'byte' } + - { val: 'Byte.MAX_VALUE', type: 'byte' } - - { val: 'Short.MIN_VALUE as short', type: 'short' } - - { val: 'Short.MAX_VALUE as short', type: 'short' } + - { val: 'Short.MIN_VALUE', type: 'short' } + - { val: 'Short.MAX_VALUE', type: 'short' } - { val: 'Int.MIN_VALUE', type: 'int' } - { val: 'Int.MAX_VALUE', type: 'int' } @@ -45,14 +45,14 @@ cases: - { val: 'Float.MIN_VALUE', type: 'float' } - { val: 'Float.MAX_VALUE', type: 'float' } - - { val: 'new Byte(Byte.MIN_VALUE as byte)', type: 'Byte' } - - { val: 'new Byte(Byte.MAX_VALUE as byte)', type: 'Byte' } + - { val: 'new Byte(Byte.MIN_VALUE)', type: 'Byte' } + - { val: 'new Byte(Byte.MAX_VALUE)', type: 'Byte' } - - { val: 'new Short(Short.MIN_VALUE as short)', type: 'Short' } - - { val: 'new Short(Short.MAX_VALUE as short)', type: 'Short' } + - { val: 'new Short(Short.MIN_VALUE)', type: 'Short' } + - { val: 'new Short(Short.MAX_VALUE)', type: 'Short' } - - { val: 'new Int(Int.MIN_VALUE as int)', type: 'Int' } - - { val: 'new Int(Int.MAX_VALUE as int)', type: 'Int' } + - { val: 'new Int(Int.MIN_VALUE)', type: 'Int' } + - { val: 'new Int(Int.MAX_VALUE)', type: 'Int' } - { val: 'new Long(Long.MIN_VALUE)', type: 'Long' } - { val: 'new Long(Long.MAX_VALUE)', type: 'Long' } diff --git a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/for_t.params.yaml b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/for_t.params.yaml index d820273a59..8f626b2ee8 100644 --- a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/for_t.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/for_t.params.yaml @@ -21,11 +21,11 @@ cases: - { val: '0.0000000001', type: 'double' } - { val: '0.000001', type: 'float' } - - { val: 'Byte.MIN_VALUE as byte', type: 'byte' } - - { val: 'Byte.MAX_VALUE as byte', type: 'byte' } + - { val: 'Byte.MIN_VALUE', type: 'byte' } + - { val: 'Byte.MAX_VALUE', type: 'byte' } - - { val: 'Short.MIN_VALUE as short', type: 'short' } - - { val: 'Short.MAX_VALUE as short', type: 'short' } + - { val: 'Short.MIN_VALUE', type: 'short' } + - { val: 'Short.MAX_VALUE', type: 'short' } - { val: 'Int.MIN_VALUE', type: 'int' } - { val: 'Int.MAX_VALUE', type: 'int' } @@ -45,14 +45,14 @@ cases: - { val: 'Float.MIN_VALUE', type: 'float' } - { val: 'Float.MAX_VALUE', type: 'float' } - - { val: 'new Byte(Byte.MIN_VALUE as byte)', type: 'Byte' } - - { val: 'new Byte(Byte.MAX_VALUE as byte)', type: 'Byte' } + - { val: 'new Byte(Byte.MIN_VALUE)', type: 'Byte' } + - { val: 'new Byte(Byte.MAX_VALUE)', type: 'Byte' } - - { val: 'new Short(Short.MIN_VALUE as short)', type: 'Short' } - - { val: 'new Short(Short.MAX_VALUE as short)', type: 'Short' } + - { val: 'new Short(Short.MIN_VALUE)', type: 'Short' } + - { val: 'new Short(Short.MAX_VALUE)', type: 'Short' } - - { val: 'new Int(Int.MIN_VALUE as int)', type: 'Int' } - - { val: 'new Int(Int.MAX_VALUE as int)', type: 'Int' } + - { val: 'new Int(Int.MIN_VALUE)', type: 'Int' } + - { val: 'new Int(Int.MAX_VALUE)', type: 'Int' } - { val: 'new Long(Long.MIN_VALUE)', type: 'Long' } - { val: 'new Long(Long.MAX_VALUE)', type: 'Long' } diff --git a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/if_t2.params.yaml b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/if_t2.params.yaml index d820273a59..8f626b2ee8 100644 --- a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/if_t2.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/if_t2.params.yaml @@ -21,11 +21,11 @@ cases: - { val: '0.0000000001', type: 'double' } - { val: '0.000001', type: 'float' } - - { val: 'Byte.MIN_VALUE as byte', type: 'byte' } - - { val: 'Byte.MAX_VALUE as byte', type: 'byte' } + - { val: 'Byte.MIN_VALUE', type: 'byte' } + - { val: 'Byte.MAX_VALUE', type: 'byte' } - - { val: 'Short.MIN_VALUE as short', type: 'short' } - - { val: 'Short.MAX_VALUE as short', type: 'short' } + - { val: 'Short.MIN_VALUE', type: 'short' } + - { val: 'Short.MAX_VALUE', type: 'short' } - { val: 'Int.MIN_VALUE', type: 'int' } - { val: 'Int.MAX_VALUE', type: 'int' } @@ -45,14 +45,14 @@ cases: - { val: 'Float.MIN_VALUE', type: 'float' } - { val: 'Float.MAX_VALUE', type: 'float' } - - { val: 'new Byte(Byte.MIN_VALUE as byte)', type: 'Byte' } - - { val: 'new Byte(Byte.MAX_VALUE as byte)', type: 'Byte' } + - { val: 'new Byte(Byte.MIN_VALUE)', type: 'Byte' } + - { val: 'new Byte(Byte.MAX_VALUE)', type: 'Byte' } - - { val: 'new Short(Short.MIN_VALUE as short)', type: 'Short' } - - { val: 'new Short(Short.MAX_VALUE as short)', type: 'Short' } + - { val: 'new Short(Short.MIN_VALUE)', type: 'Short' } + - { val: 'new Short(Short.MAX_VALUE)', type: 'Short' } - - { val: 'new Int(Int.MIN_VALUE as int)', type: 'Int' } - - { val: 'new Int(Int.MAX_VALUE as int)', type: 'Int' } + - { val: 'new Int(Int.MIN_VALUE)', type: 'Int' } + - { val: 'new Int(Int.MAX_VALUE)', type: 'Int' } - { val: 'new Long(Long.MIN_VALUE)', type: 'Long' } - { val: 'new Long(Long.MAX_VALUE)', type: 'Long' } diff --git a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops.sts b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops.sts index 744b15de65..acdca82687 100644 --- a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops.sts +++ b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops.sts @@ -23,20 +23,21 @@ desc: >- enum Color { Red, Green, Blue } enum Size { S, M, L } +let a: {{a.type}} = {{a.val}}; // {% if a.truthy %}truthy{% else %}falsy{% endif %} + function main() { - let a: {{a.type}} = {{a.val}} // {% if a.truthy %}truthy{% else %}falsy{% endif %} - assert(!a == {% if a.truthy %}false{% else %}true{% endif %}) + assert(!a ? {% if a.truthy %}false : true{% else %}true : false{% endif %}); {%- for b in cases %} {%- if a != b %} { - let b: {{b.type}} = {{b.val}} // {% if b.truthy %}truthy{% else %}falsy{% endif %} + let b: {{b.type}} = {{b.val}}; // {% if b.truthy %}truthy{% else %}falsy{% endif %} {%- if a.truthy %} - assert((a && b) == {% if b.truthy %}true{% else %}false{% endif %}) - assert(a || b) + assert((a && b) ? {% if b.truthy %}true : false{% else %}false : true{% endif %}); + assert((a || b) ? true : false); {%- else %} - assert(!(a && b)) - assert((a || b) == {% if b.truthy %}true{% else %}false{% endif %}) + assert(!(a && b) ? false : true); + assert((a || b) ? {% if b.truthy %}true : false{% else %}false : true{% endif %}); {%- endif %} } {%- endif %} diff --git a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2.params.yaml b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2.params.yaml new file mode 100644 index 0000000000..ee9f563d06 --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2.params.yaml @@ -0,0 +1,63 @@ +# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +cases: + - { val: 'Long.MIN_VALUE', type: 'long', truthy: true } + - { val: '0', type: 'long', truthy: false } + - { val: 'Long.MAX_VALUE', type: 'long', truthy: true } + + - { val: 'new Long(Long.MIN_VALUE)', type: 'Long', truthy: true } + - { val: 'new Long()', type: 'Long', truthy: false } + - { val: 'new Long(Long.MAX_VALUE)', type: 'Long', truthy: true } + + - { val: 'Number.POSITIVE_INFINITY', type: 'number', truthy: true } + - { val: 'Number.NEGATIVE_INFINITY', type: 'number', truthy: true } + - { val: 'Number.MIN_VALUE', type: 'number', truthy: true } + - { val: 'Number.MAX_VALUE', type: 'number', truthy: true } + - { val: 'Number.NaN', type: 'number', truthy: false, nan: true } + - { val: '-0.0', type: 'number', truthy: false } + + - { val: 'new Number(Number.POSITIVE_INFINITY)', type: 'Number', truthy: true } + - { val: 'new Number(Number.NEGATIVE_INFINITY)', type: 'Number', truthy: true } + - { val: 'new Number(Number.MIN_VALUE)', type: 'Number', truthy: true } + - { val: 'new Number(Number.MAX_VALUE)', type: 'Number', truthy: true } + - { val: 'new Number(Number.NaN)', type: 'Number', truthy: false, nan: true } + - { val: 'new Number(0.0)', type: 'Number', truthy: false } + + - { val: 'new String("\u0000\u0000").substring(0, 0)', type: 'string', truthy: false } + - { val: 'new String("\u0000\u0000").substring(0, 1)', type: 'string', truthy: true } + + - { val: "c'\\u0000'", type: 'char', truthy: false } + - { val: "c' '", type: 'char', truthy: true } + - { val: "new Char(c'\\u0000')", type: 'Char', truthy: false } + - { val: "new Char(c' ')", type: 'Char', truthy: true } + + - { val: '!false', type: 'boolean', truthy: true } + - { val: '!true', type: 'boolean', truthy: false } + - { val: 'new Boolean(!false)', type: 'Boolean', truthy: true } + - { val: 'new Boolean(!true)', type: 'Boolean', truthy: false } + + - { val: '[]', type: 'number[]', truthy: true } + - { val: 'new string[0]', type: 'string[]', truthy: true } + + - { val: 'new Object()', type: 'Object', truthy: true } + - { val: '{} as Object', type: 'Object|null', truthy: true } + + - { val: 'null', type: 'Object|null', truthy: false } + - { val: 'undefined', type: 'Error|undefined', truthy: false } + + - { val: '0n', type: 'bigint', truthy: true } + + - { type: 'Color', val: 'Color.Red', truthy: false } + - { type: 'Size', val: 'Size.L', truthy: true } diff --git a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2.sts b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2.sts new file mode 100644 index 0000000000..36e51030cd --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2.sts @@ -0,0 +1,58 @@ +{%- for a in cases %} +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*--- +desc: >- + The actual extended semantics of conditional-and and conditional-or expressions + is described in the following truth tables (assuming that 'A' and 'B' are any + valid expressions) +---*/ +enum Color { Red, Green, Blue } +enum Size { S, M, L } + +let a: {{a.type}} = {{a.val}}; // {% if a.truthy %}truthy{% else %}falsy{% endif %} + +function main() { + assert(!a == {% if a.truthy %}false{% else %}true{% endif %}); + +{%- for b in cases %} +{%- if a != b %} + { + let b: {{b.type}} = {{b.val}}; // {% if b.truthy %}truthy{% else %}falsy{% endif %} +{%- if a.truthy %} + {%- if b.nan %} + assert(Number.isNaN(a && b)); + {%- else %} + assert((a && b) == b); + {%- endif %} + assert((a || b) == a); +{%- else %} + {%- if a.nan %} + assert(Number.isNaN(a && b)); + {%- else %} + assert((a && b) == a); + {%- endif %} + {%- if b.nan %} + assert(Number.isNaN(a || b)); + {%- else %} + assert((a || b) == b); + {%- endif %} +{%- endif %} + } +{%- endif %} +{%- endfor %} +} +{%- endfor %} diff --git a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/while_t.params.yaml b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/while_t.params.yaml index d820273a59..8f626b2ee8 100644 --- a/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/while_t.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/while_t.params.yaml @@ -21,11 +21,11 @@ cases: - { val: '0.0000000001', type: 'double' } - { val: '0.000001', type: 'float' } - - { val: 'Byte.MIN_VALUE as byte', type: 'byte' } - - { val: 'Byte.MAX_VALUE as byte', type: 'byte' } + - { val: 'Byte.MIN_VALUE', type: 'byte' } + - { val: 'Byte.MAX_VALUE', type: 'byte' } - - { val: 'Short.MIN_VALUE as short', type: 'short' } - - { val: 'Short.MAX_VALUE as short', type: 'short' } + - { val: 'Short.MIN_VALUE', type: 'short' } + - { val: 'Short.MAX_VALUE', type: 'short' } - { val: 'Int.MIN_VALUE', type: 'int' } - { val: 'Int.MAX_VALUE', type: 'int' } @@ -45,14 +45,14 @@ cases: - { val: 'Float.MIN_VALUE', type: 'float' } - { val: 'Float.MAX_VALUE', type: 'float' } - - { val: 'new Byte(Byte.MIN_VALUE as byte)', type: 'Byte' } - - { val: 'new Byte(Byte.MAX_VALUE as byte)', type: 'Byte' } + - { val: 'new Byte(Byte.MIN_VALUE)', type: 'Byte' } + - { val: 'new Byte(Byte.MAX_VALUE)', type: 'Byte' } - - { val: 'new Short(Short.MIN_VALUE as short)', type: 'Short' } - - { val: 'new Short(Short.MAX_VALUE as short)', type: 'Short' } + - { val: 'new Short(Short.MIN_VALUE)', type: 'Short' } + - { val: 'new Short(Short.MAX_VALUE)', type: 'Short' } - - { val: 'new Int(Int.MIN_VALUE as int)', type: 'Int' } - - { val: 'new Int(Int.MAX_VALUE as int)', type: 'Int' } + - { val: 'new Int(Int.MIN_VALUE)', type: 'Int' } + - { val: 'new Int(Int.MAX_VALUE)', type: 'Int' } - { val: 'new Long(Long.MIN_VALUE)', type: 'Long' } - { val: 'new Long(Long.MAX_VALUE)', type: 'Long' } diff --git a/static_core/plugins/ets/tests/ets-templates/17.experimental_features/07.function_and_method_overloading/02.class_method_overloading/cm_over2.params.yaml b/static_core/plugins/ets/tests/ets-templates/17.experimental_features/07.function_and_method_overloading/02.class_method_overloading/cm_over2.params.yaml index fdac36bef6..cac7402edc 100644 --- a/static_core/plugins/ets/tests/ets-templates/17.experimental_features/07.function_and_method_overloading/02.class_method_overloading/cm_over2.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/17.experimental_features/07.function_and_method_overloading/02.class_method_overloading/cm_over2.params.yaml @@ -77,21 +77,21 @@ cases: class Ex extends Exception {} let ex: Ex = new Ex() class A { - meth(p: byte): byte throws { if (p == 0) throw ex; else return Byte.MIN_VALUE as byte } + meth(p: byte): byte throws { if (p == 0) throw ex; else return Byte.MIN_VALUE } meth(p: Byte): Byte { return Byte.MAX_VALUE as Byte } - meth(p: short): short { return Short.MIN_VALUE as short } + meth(p: short): short { return Short.MIN_VALUE } meth(p: Short): Short throws { if (p == 0) throw ex; else return Short.MAX_VALUE as Short } - meth(p: int): int throws { if (p == 0) throw ex; else return Int.MIN_VALUE as int } + meth(p: int): int throws { if (p == 0) throw ex; else return Int.MIN_VALUE } meth(p: Int): Int { return Int.MAX_VALUE as Int } - meth(p: long): long { return Long.MIN_VALUE as long } + meth(p: long): long { return Long.MIN_VALUE } meth(p: Long): Long throws { if (p == 0) throw ex; else return Long.MAX_VALUE as Long } meth(p: char): char throws { if (p == 0) throw ex; else return Char.MIN_VALUE as char } meth(p: Char): Char { return Char.MAX_VALUE as Char } meth(p: boolean): boolean { return false as boolean } meth(p: Boolean): Boolean throws { return true as Boolean } - meth(p: float): float throws { if (p == 0) throw ex; else return Float.MIN_VALUE as float } + meth(p: float): float throws { if (p == 0) throw ex; else return Float.MIN_VALUE } meth(p: Float): Float { return Float.MAX_VALUE as Float } - meth(p: double): double { return Double.MIN_VALUE as double } + meth(p: double): double { return Double.MIN_VALUE } meth(p: Double): Double throws { if (p == 0) throw ex; else return Double.MAX_VALUE as Double } } use: |- @@ -122,21 +122,21 @@ cases: class Ex extends Exception {} let ex: Ex = new Ex() class A { - meth(p: byte[]): byte throws { if (p.length == 0) throw ex; else return Byte.MIN_VALUE as byte } + meth(p: byte[]): byte throws { if (p.length == 0) throw ex; else return Byte.MIN_VALUE } meth(p: Byte[]): Byte { return Byte.MAX_VALUE as Byte } - meth(p: short[]): short { return Short.MIN_VALUE as short } + meth(p: short[]): short { return Short.MIN_VALUE } meth(p: Short[]): Short throws { if (p.length == 0) throw ex; else return Short.MAX_VALUE as Short } - meth(p: int[]): int throws { if (p.length == 0) throw ex; else return Int.MIN_VALUE as int } + meth(p: int[]): int throws { if (p.length == 0) throw ex; else return Int.MIN_VALUE } meth(p: Int[]): Int { return Int.MAX_VALUE as Int } - meth(p: long[]): long { return Long.MIN_VALUE as long } + meth(p: long[]): long { return Long.MIN_VALUE } meth(p: Long[]): Long throws { if (p.length == 0) throw ex; else return Long.MAX_VALUE as Long } meth(p: char[]): char throws { if (p.length == 0) throw ex; else return Char.MIN_VALUE as char } meth(p: Char[]): Char { return Char.MAX_VALUE as Char } meth(p: boolean[]): boolean { return false } meth(p: Boolean[]): Boolean throws { return true as Boolean } - meth(p: float[]): float throws { if (p.length == 0) throw ex; else return Float.MIN_VALUE as float } + meth(p: float[]): float throws { if (p.length == 0) throw ex; else return Float.MIN_VALUE } meth(p: Float[]): Float { return Float.MAX_VALUE as Float } - meth(p: double[]): double { return Double.MIN_VALUE as double } + meth(p: double[]): double { return Double.MIN_VALUE } meth(p: Double[]): Double throws { if (p.length == 0) throw ex; else return Double.MAX_VALUE as Double } } use: |- diff --git a/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored-JIT-ASAN.txt b/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored-JIT-ASAN.txt index c5bc89c41b..e69de29bb2 100644 --- a/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored-JIT-ASAN.txt +++ b/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored-JIT-ASAN.txt @@ -1,3 +0,0 @@ -# 17669 JIT-optimized code gives wrong result -06.contexts_and_conversions/05.implicit_conversions/04.boxing_conversion/comp_obj/comp-clss_26.sts -06.contexts_and_conversions/05.implicit_conversions/04.boxing_conversion/comp_arr/comp-arr_26.sts diff --git a/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored-JIT-REPEATS.txt b/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored-JIT-REPEATS.txt index 12a41465db..e2930333cb 100644 --- a/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored-JIT-REPEATS.txt +++ b/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored-JIT-REPEATS.txt @@ -1,10 +1,6 @@ # panda#17445 06.contexts_and_conversions/05.implicit_conversions/06.widening_union_conversion/comp_arr/comp-arr-wd_6.ets -# 17669 JIT-optimized code gives wrong result -06.contexts_and_conversions/05.implicit_conversions/04.boxing_conversion/comp_obj/comp-clss_26.sts -06.contexts_and_conversions/05.implicit_conversions/04.boxing_conversion/comp_arr/comp-arr_26.sts - # 18707 07.expressions/25.equality_expressions/03.bigint_equality_operators/ne2_17.sts diff --git a/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored.txt b/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored.txt index 120fc74f8f..d8b0951c29 100644 --- a/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored.txt +++ b/static_core/tests/tests-u-runner/test-lists/ets-cts/ets-cts-ignored.txt @@ -585,7 +585,7 @@ 17.experimental_features/17.async_functions_and_methods/01.async_functions/afunc_0.sts 17.experimental_features/17.async_functions_and_methods/02.async_methods/ameth_0.sts -# 17057 Cannot launch function returning enum +# 17057, 17360 Cannot launch function returning enum 17.experimental_features/16.coroutines/01.create_and_launch_coroutine/c_func_19.sts 17.experimental_features/16.coroutines/01.create_and_launch_coroutine/c_func_20.sts 17.experimental_features/16.coroutines/01.create_and_launch_coroutine/c_meth_18.sts @@ -648,7 +648,6 @@ #19096 07.expressions/04.array_literal/02.type_inference_from-types_of_elements/arr_inf2_8.sts - # es2panda fails: panda#12528 04.names_declarations_and_scopes/07.variable_and_constant_declarations/04.type_inference_from_initializer/infer_4.sts 04.names_declarations_and_scopes/07.variable_and_constant_declarations/04.type_inference_from_initializer/infer_5.sts @@ -794,7 +793,23 @@ 17.experimental_features/02.array_creation_expressions/expr_9.sts # end of es2panda fails -# es2panda fails: panda#19809 +# 20289 es2panda aborts on extended conditional expression +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_1.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_10.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_11.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_16.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_17.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_19.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_20.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_22.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_25.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_27.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_28.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_29.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_30.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_34.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_36.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_4.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_0.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_1.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_10.sts @@ -820,9 +835,6 @@ 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_29.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_3.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_30.sts -15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_31.sts -15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_32.sts -15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_33.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_34.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_35.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_36.sts @@ -832,7 +844,35 @@ 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_7.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_8.sts 15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_9.sts -# end of es2panda fails + +# 20294 es2panda reports errors on equality with extended conditional expressions +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_0.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_12.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_13.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_14.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_15.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_18.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_2.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_21.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_23.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_24.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_26.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_3.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_31.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_32.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_33.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_35.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_5.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_6.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_7.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_8.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops2_9.sts + +# 20296 es2panda doesn't permit nullish types in extended conditional expressions +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_31.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_32.sts +15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ops_33.sts + # es2panda fails: panda#14338 es2panda fails to compile overloaded functions 15.semantic_rules/07.overloading_and_overriding/02.override-compatible_signatures/pos_1.sts @@ -1022,33 +1062,6 @@ 05.generics/02.generic_instantiations/02.type_arguments/type_arguments_of_parameterized_declarations/method_args1_neg_2.sts 05.generics/02.generic_instantiations/02.type_arguments/type_arguments_of_parameterized_declarations/method_args1_neg_3.sts 05.generics/02.generic_instantiations/02.type_arguments/type_arguments_of_parameterized_declarations/method_args2_neg_3.sts -# non-compatible operands, null and non-nullable -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_0.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_1.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_2.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_3.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_4.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_5.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_6.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_7.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_0.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_1.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_10.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_11.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_12.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_13.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_2.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_3.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_4.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_5.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_6.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_7.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_8.sts -06.contexts_and_conversions/01.assignment-like_contexts/boxing2_call_9.sts -# no reason to fail -06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n_0.sts -06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n_2.sts -06.contexts_and_conversions/03.numeric_operator_contexts/binary_numeric_promotion/result_type_cond_n_3.sts # non-compatible operands # assign nullable to non-nullable 07.expressions/11.function_call_expression/optional_chaining_value_result.sts @@ -1420,28 +1433,6 @@ 06.contexts_and_conversions/05.implicit_conversions/07.widening_reference_conversion/comp_obj/comp-intf_7.sts 06.contexts_and_conversions/05.implicit_conversions/07.widening_reference_conversion/comp_obj/comp-intf_8.sts -# 16325 unboxing in lambda parameter -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd-nan_1.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_1.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_10.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_12.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_13.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_14.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_16.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_17.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_19.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_2.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_22.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_23.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_24.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_25.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_3.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_4.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_5.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_7.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_8.sts -06.contexts_and_conversions/05.implicit_conversions/05.unboxing_conversion/call_lmbd/call-lmbd_9.sts - # 18550 [ArkTS frontend] es2panda aborts on implicit number conversion 06.contexts_and_conversions/05.implicit_conversions/02.widening_primitive_conversions/decl_const/decl-const_6.sts