Skip to content

Add roundtrip test for Foo and Bar structs - #87

Merged
sator-imaging merged 8 commits into
mainfrom
test/add-foo-bar-roundtrip-test-6948808545237087535
Aug 28, 2026
Merged

Add roundtrip test for Foo and Bar structs#87
sator-imaging merged 8 commits into
mainfrom
test/add-foo-bar-roundtrip-test-6948808545237087535

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

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

- 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.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Comment thread tests/SerializationModels.cs Outdated
- 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.
Comment thread tests/SerializationModels.cs Outdated
- 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.
Comment thread tests/SerializationModels.cs Outdated
Comment thread tests/SerializationModels.cs Outdated
Comment thread tests/SerializationTests.cs
- Renamed BadAlignedStructWithPackOne to BadlyAlignedStructWithPackOne and BadAlignedContainerStructWithPackOne to BadlyAlignedContainerStructWithPackOne as record structs.
- Added Materialize equality assertion (foo == view.Materialize()) to BadlyAlignedStructWithPackOneRoundTrip in SerializationTests.cs.
Comment thread tests/SerializationTests.cs Outdated
Comment thread tests/SerializationTests.cs Outdated
Comment thread tests/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.
Comment thread tests/SerializationModels.cs Outdated
- Renamed BadlyAlignedContainerArrayStructWithPackOne to BadlyAlignedContainerArrayStruct in SerializationModels.cs and updated SerializationTests.cs.
@sator-imaging
sator-imaging marked this pull request as ready for review August 28, 2026 06:44
@sator-imaging
sator-imaging merged commit e43f710 into main Aug 28, 2026
4 checks passed
@sator-imaging
sator-imaging deleted the test/add-foo-bar-roundtrip-test-6948808545237087535 branch August 28, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant