- Introduce `MaxDepthBehavior` option (`Throw`, `Truncate`, `Disable`) for explicit depth-limit handling in AcBinarySerializer and SGen. - Default is now `Throw` (fail-fast); `ShallowCopy` preset uses `Truncate` for shallow-copy semantics. - Refactor runtime and SGen paths to use unified `TryEnterRecursion`/`ExitRecursion` for correct wire output and inc/dec symmetry. - Add focused tests to diagnose SGen+Truncate wire-misalignment bug (see `BINARY_ISSUES.md#accore-bin-i-t7k3`). - Update docs and comments to clarify new behavior and document Toon serializer's current lack of `MaxDepthBehavior` support. - Adjust tests and usages for new semantics and improved safety. |
||
|---|---|---|
| .. | ||
| Compression | ||
| GeneratedWriters | ||
| Serialization | ||
| TestModels | ||
| AyCode.Core.Tests.csproj | ||
| GlobalUsings.cs | ||
| JsonExtensionTests.cs | ||
| README.md | ||
| TestModelBase.cs | ||
README.md
AyCode.Core.Tests
MSTest unit tests for AyCode.Core serialization, compression, and utilities. Covers binary/JSON round-trips, reference handling, nullable types, source generator integration, and performance benchmarks.
Folder Structure
| Folder | Purpose |
|---|---|
Serialization/ |
Binary and JSON serialization tests (20+ test classes) |
Compression/ |
GZip compression tests |
TestModels/ |
Shared test entities, enums, data factories, SignalR infrastructure |
GeneratedWriters/ |
Hand-written source generator output examples |
Key Files (Root)
GlobalUsings.cs— Global MSTest using.TestModelBase.cs— Abstract base for test models with configuration support.JsonExtensionTests.cs— JSON extension method tests.
Dependencies
| Dependency | Purpose |
|---|---|
MSTest |
Test framework |
MessagePack |
Serialization comparison |
MemoryPack |
Serialization comparison |
MongoDB.Bson |
BSON comparison |