Add roundtrip test for Foo and Bar structs - #87
Conversation
- Define Foo and Bar structs with [StructLayout(LayoutKind.Sequential, Pack = 1)] and [ZeroSerializer] attributes in SerializationModels.cs. - Add SequentialPackOneFooBarRoundTrip test in SerializationTests.cs verifying exact hardcoded byte lengths (3 for BarView and 30 for FooView) and verifying roundtrip data integrity.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Updated Foo struct in SerializationModels.cs to include byte property G and Bar properties H and I as suggested in PR review. - Updated SequentialPackOneFooBarRoundTrip in SerializationTests.cs to check expected byte lengths (3 for BarView and 31 for FooView) and full roundtrip serialization.
- Renamed Bar struct to BadAlignedStructWithPackOne in SerializationModels.cs and updated Foo struct properties H and I accordingly. - Renamed test method to BadAlignedStructWithPackOneRoundTrip in SerializationTests.cs.
- Renamed Foo to BadAlignedContainerStructWithPackOne and Bar to BadAlignedStructWithPackOne in SerializationModels.cs and updated SerializationTests.cs accordingly.
- Renamed BadAlignedStructWithPackOne to BadlyAlignedStructWithPackOne and BadAlignedContainerStructWithPackOne to BadlyAlignedContainerStructWithPackOne as record structs. - Added Materialize equality assertion (foo == view.Materialize()) to BadlyAlignedStructWithPackOneRoundTrip in SerializationTests.cs.
…test - Added BadlyAlignedContainerArrayStructWithPackOne model in SerializationModels.cs. - Updated BadlyAlignedStructWithPackOneRoundTrip in SerializationTests.cs to test array serialization and memory slicing as requested in PR review.
- Renamed BadlyAlignedContainerArrayStructWithPackOne to BadlyAlignedContainerArrayStruct in SerializationModels.cs and updated SerializationTests.cs.
Adds a roundtrip unit test for Foo and Bar structs decorated with [StructLayout(LayoutKind.Sequential, Pack = 1)] and [ZeroSerializer], verifying hardcoded byte lengths (3 and 30) and roundtrip serialization correctness.
PR created automatically by Jules for task 6948808545237087535 started by @sator-imaging