fuels-rs icon indicating copy to clipboard operation
fuels-rs copied to clipboard

chore: extend types tests with array with generics

Open MujkicA opened this issue 10 months ago • 1 comments

Related: https://github.com/FuelLabs/sway/issues/5860

Adds the above mentioned case to our tests. Currently, it fails to compile with the experimental new encoding.

Compilation with the previous encoding scheme is successful but displays encoding issues:

assertion `left == right` failed
  left: StructWArrWGenericStruct { a: [StructWTwoGenerics { a: Bits256([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), b: 1 }, StructWTwoGenerics { a: Bits256([0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]), b: 2 }, StructWTwoGenerics { a: Bits256([2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), b: 3 }] }
  right: StructWArrWGenericStruct { a: [StructWTwoGenerics { a: Bits256([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), b: 1 }, StructWTwoGenerics { a: Bits256([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]), b: 2 }, StructWTwoGenerics { a: Bits256([3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), b: 3 }] }

Checklist

  • [ ] I have linked to any relevant issues.
  • [ ] I have updated the documentation.
  • [ ] I have added tests that prove my fix is effective or that my feature works.
  • [ ] I have added necessary labels.
  • [ ] I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • [ ] I have requested a review from the relevant team or maintainers.

MujkicA avatar Apr 19 '24 10:04 MujkicA

Do we close this? Leave it as a draft?

Probably shouldn't be open and blocked.

segfault-magnet avatar Apr 30 '24 17:04 segfault-magnet