Files
flatbuffers/tests
vsmcea 95053e6a47 Correct span and non-span versions of ToArray() and ToArrayPadded() methods (#8734)
* Correction of bug inside ToArray<T> methods

Avoid allocating too large buffers (len is expressed in bytes, not in Ts).
Added validation to ensure len is a multiple of SizeOf<T>() before converting to array.

* Update ByteBuffer.cs

* Refactor ToArray and ToArrayPadded methods

I understand from failed test that pos, len, padLeft and padRight are expressed in Ts

* Refactor ToArray and ToArrayPadded methods

* Final correction
All functions parameters expressed in bytes for homogeneity
Tests run:
  - UNSAFE_BYTEBUFFER=true/ENABLE_SPAN_T=true: passed
  - UNSAFE_BYTEBUFFER=true/ENABLE_SPAN_T=false: passed
  - UNSAFE_BYTEBUFFER=false/ENABLE_SPAN_T=false: passed
  - UNSAFE_BYTEBUFFER=false/ENABLE_SPAN_T=true: configuration forbidden by compilation
Correction of FlatBuffers.Test.csproj to allow UNSAFE_BYTEBUFFER/ENABLE_SPAN_T tests
Correction of FlatBuffersExampleTests.cs: I think the test was not run because it could not pass (to be reviewed carefully)
2025-10-25 11:58:05 -07:00
..
2025-09-23 22:18:02 -07:00
2025-09-23 22:18:02 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 22:18:02 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 22:18:02 -07:00
2024-11-18 17:31:19 +00:00
2025-09-23 21:50:27 -07:00
2022-08-28 16:54:58 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2023-09-17 10:21:58 -07:00
2023-09-29 07:40:02 -07:00
2021-12-02 21:29:19 -08:00
2021-12-02 21:29:19 -08:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 22:18:02 -07:00
2025-09-23 22:18:02 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00