diff --git a/tests/data/specs/aggregate_in_relation.rflx b/tests/data/specs/aggregate_in_relation.rflx index 547c3eb4f..a1f9bcf50 100644 --- a/tests/data/specs/aggregate_in_relation.rflx +++ b/tests/data/specs/aggregate_in_relation.rflx @@ -26,7 +26,10 @@ package Aggregate_In_Relation is if Fld_C = [16#CC#, 16#CC#] then null if Fld_C /= [16#CC#, 16#CC#]; - Fld_D : D; + Fld_D : Opaque + with Size => 16 + then null + if Fld_D = Fld_A; end message; end Aggregate_In_Relation; diff --git a/tests/unit/expression_test.py b/tests/unit/expression_test.py index 79cb54f21..d6449dee4 100644 --- a/tests/unit/expression_test.py +++ b/tests/unit/expression_test.py @@ -1083,7 +1083,8 @@ def test_relation_simplified() -> None: ) assert_equal(Equal(String("Foo Bar"), String("Foo Bar")).simplified(), TRUE) assert_equal( - Equal(String("Foo"), Aggregate(Number(70), Number(111), Number(111))).simplified(), TRUE + Equal(String("Foo"), Aggregate(Number(70), Number(111), Number(111))).simplified(), + TRUE, ) assert_equal( Equal( @@ -1097,10 +1098,22 @@ def test_relation_simplified() -> None: ).simplified(), FALSE, ) - assert_equal(Equal(Number(0), Aggregate(Number(0), Number(1), Number(2))).simplified(), FALSE) - assert_equal(Equal(Aggregate(Number(0), Number(1), Number(2)), Number(0)).simplified(), FALSE) - assert_equal(NotEqual(Number(4), Aggregate(Number(0), Number(1), Number(2))).simplified(), TRUE) - assert_equal(NotEqual(Number(0), Aggregate(Number(0), Number(1), Number(2))).simplified(), TRUE) + assert_equal( + Equal(Number(0), Aggregate(Number(0), Number(1), Number(2))).simplified(), + FALSE, + ) + assert_equal( + Equal(Aggregate(Number(0), Number(1), Number(2)), Number(0)).simplified(), + FALSE, + ) + assert_equal( + NotEqual(Number(4), Aggregate(Number(0), Number(1), Number(2))).simplified(), + TRUE, + ) + assert_equal( + NotEqual(Number(0), Aggregate(Number(0), Number(1), Number(2))).simplified(), + TRUE, + ) assert Equal(TRUE, TRUE).simplified() == TRUE assert Equal(TRUE, FALSE).simplified() == FALSE assert NotEqual(TRUE, TRUE).simplified() == FALSE diff --git a/tests/unit/pyrflx_test.py b/tests/unit/pyrflx_test.py index 1001e018b..ab31f4f5f 100644 --- a/tests/unit/pyrflx_test.py +++ b/tests/unit/pyrflx_test.py @@ -1520,6 +1520,6 @@ def test_low_order(low_order_package: Package) -> None: def test_aggregate_in_relation_valid(aggregate_in_relation_package: Package) -> None: msg = aggregate_in_relation_package.new_message("Aggregate_In_Relation_Msg") - msg.parse(b"\xAA\xAA\xBB\xCC\xCC\xDD") - assert msg.bytestring == b"\xAA\xAA\xBB\xCC\xCC\xDD" + msg.parse(b"\xAA\xAA\xBB\xCC\xCC\xAA\xAA") + assert msg.bytestring == b"\xAA\xAA\xBB\xCC\xCC\xAA\xAA" assert msg.valid_message