encoding/binary — validation proof
Go’s own encoding/binary test suite, converted to C# by go2cs, built against the converted standard
library, run under the Go-semantics test host, and compared verdict for verdict against a clean
go test -json baseline of the same sources. This page is generated by the converter from that
comparison — it is the evidence behind the encoding/binary row in
Validated Test Packages.
Validated 2026-08-04 · converter f6e9c0cf0
137 matched · 9 disclosed — Go 1.23.1, windows/amd64, converted package
src/core/encoding/binary.
Verdicts
| Test | go test |
go2cs |
|---|---|---|
TestAppendAllocs |
pass | fail (disclosed) |
TestBigEndianPtrWrite |
pass | pass |
TestBigEndianPtrWrite/Append |
pass | pass |
TestBigEndianPtrWrite/Encode |
pass | pass |
TestBigEndianPtrWrite/Write |
pass | pass |
TestBigEndianRead |
pass | pass |
TestBigEndianRead/Decode |
pass | pass |
TestBigEndianRead/Read |
pass | pass |
TestBigEndianWrite |
pass | pass |
TestBigEndianWrite/Append |
pass | pass |
TestBigEndianWrite/Encode |
pass | pass |
TestBigEndianWrite/Write |
pass | pass |
TestBlankFields |
pass | pass |
TestBlankFields/Append |
pass | pass |
TestBlankFields/Encode |
pass | pass |
TestBlankFields/Write |
pass | pass |
TestBufferTooBigWithOverflow |
pass | pass |
TestBufferTooBigWithOverflow/invalid:_1000_bytes |
pass | pass |
TestBufferTooBigWithOverflow/invalid:_10th_byte |
pass | pass |
TestBufferTooBigWithOverflow/invalid:_with_more_than_MaxVarintLen64_bytes |
pass | pass |
TestBufferTooBigWithOverflow/valid:_math.MaxUint64-40 |
pass | pass |
TestBufferTooSmall |
pass | pass |
TestByteOrder |
pass | pass |
TestConstants |
pass | pass |
TestEarlyBoundsChecks |
pass | pass |
TestLittleEndianPtrWrite |
pass | pass |
TestLittleEndianPtrWrite/Append |
pass | pass |
TestLittleEndianPtrWrite/Encode |
pass | pass |
TestLittleEndianPtrWrite/Write |
pass | pass |
TestLittleEndianRead |
pass | pass |
TestLittleEndianRead/Decode |
pass | pass |
TestLittleEndianRead/Read |
pass | pass |
TestLittleEndianWrite |
pass | pass |
TestLittleEndianWrite/Append |
pass | pass |
TestLittleEndianWrite/Encode |
pass | pass |
TestLittleEndianWrite/Write |
pass | pass |
TestNativeEndian |
pass | pass |
TestNoFixedSize |
pass | pass |
TestNoFixedSize/Append |
pass | pass |
TestNoFixedSize/Encode |
pass | pass |
TestNoFixedSize/Write |
pass | pass |
TestNonCanonicalZero |
pass | pass |
TestOverflow |
pass | pass |
TestReadBool |
pass | pass |
TestReadBool/Decode |
pass | pass |
TestReadBool/Read |
pass | pass |
TestReadBoolSlice |
pass | pass |
TestReadBoolSlice/Decode |
pass | pass |
TestReadBoolSlice/Read |
pass | pass |
TestReadErrorMsg |
pass | pass |
TestReadErrorMsg/Decode |
pass | pass |
TestReadErrorMsg/Read |
pass | pass |
TestReadInvalidDestination |
pass | pass |
TestReadSlice |
pass | pass |
TestReadSlice/Decode |
pass | pass |
TestReadSlice/Read |
pass | pass |
TestReadTruncated |
pass | pass |
TestSizeAllocs |
pass | fail (disclosed) |
TestSizeAllocs/*binary.Struct |
pass | fail (disclosed) |
TestSizeAllocs/[1]binary.Struct |
pass | fail (disclosed) |
TestSizeAllocs/[]binary.Struct |
pass | fail (disclosed) |
TestSizeAllocs/[]binary.Struct#01 |
pass | fail (disclosed) |
TestSizeAllocs/binary.Struct |
pass | fail (disclosed) |
TestSizeAllocs/bool |
pass | pass |
TestSizeAllocs/complex128 |
pass | fail (disclosed) |
TestSizeAllocs/complex64 |
pass | fail (disclosed) |
TestSizeAllocs/float32 |
pass | pass |
TestSizeAllocs/float64 |
pass | pass |
TestSizeAllocs/int16 |
pass | pass |
TestSizeAllocs/int32 |
pass | pass |
TestSizeAllocs/int64 |
pass | pass |
TestSizeAllocs/int8 |
pass | pass |
TestSizeAllocs/uint16 |
pass | pass |
TestSizeAllocs/uint32 |
pass | pass |
TestSizeAllocs/uint64 |
pass | pass |
TestSizeAllocs/uint8 |
pass | pass |
TestSizeInvalid |
pass | pass |
TestSizeStructCache |
pass | pass |
TestSliceRoundTrip |
pass | pass |
TestSliceRoundTrip/Append,Decode |
pass | pass |
TestSliceRoundTrip/Append,Decode/int16 |
pass | pass |
TestSliceRoundTrip/Append,Decode/int32 |
pass | pass |
TestSliceRoundTrip/Append,Decode/int64 |
pass | pass |
TestSliceRoundTrip/Append,Decode/int8 |
pass | pass |
TestSliceRoundTrip/Append,Decode/uint16 |
pass | pass |
TestSliceRoundTrip/Append,Decode/uint32 |
pass | pass |
TestSliceRoundTrip/Append,Decode/uint64 |
pass | pass |
TestSliceRoundTrip/Append,Decode/uint8 |
pass | pass |
TestSliceRoundTrip/Append,Read |
pass | pass |
TestSliceRoundTrip/Append,Read/int16 |
pass | pass |
TestSliceRoundTrip/Append,Read/int32 |
pass | pass |
TestSliceRoundTrip/Append,Read/int64 |
pass | pass |
TestSliceRoundTrip/Append,Read/int8 |
pass | pass |
TestSliceRoundTrip/Append,Read/uint16 |
pass | pass |
TestSliceRoundTrip/Append,Read/uint32 |
pass | pass |
TestSliceRoundTrip/Append,Read/uint64 |
pass | pass |
TestSliceRoundTrip/Append,Read/uint8 |
pass | pass |
TestSliceRoundTrip/Encode,Decode |
pass | pass |
TestSliceRoundTrip/Encode,Decode/int16 |
pass | pass |
TestSliceRoundTrip/Encode,Decode/int32 |
pass | pass |
TestSliceRoundTrip/Encode,Decode/int64 |
pass | pass |
TestSliceRoundTrip/Encode,Decode/int8 |
pass | pass |
TestSliceRoundTrip/Encode,Decode/uint16 |
pass | pass |
TestSliceRoundTrip/Encode,Decode/uint32 |
pass | pass |
TestSliceRoundTrip/Encode,Decode/uint64 |
pass | pass |
TestSliceRoundTrip/Encode,Decode/uint8 |
pass | pass |
TestSliceRoundTrip/Encode,Read |
pass | pass |
TestSliceRoundTrip/Encode,Read/int16 |
pass | pass |
TestSliceRoundTrip/Encode,Read/int32 |
pass | pass |
TestSliceRoundTrip/Encode,Read/int64 |
pass | pass |
TestSliceRoundTrip/Encode,Read/int8 |
pass | pass |
TestSliceRoundTrip/Encode,Read/uint16 |
pass | pass |
TestSliceRoundTrip/Encode,Read/uint32 |
pass | pass |
TestSliceRoundTrip/Encode,Read/uint64 |
pass | pass |
TestSliceRoundTrip/Encode,Read/uint8 |
pass | pass |
TestSliceRoundTrip/Write,Decode |
pass | pass |
TestSliceRoundTrip/Write,Decode/int16 |
pass | pass |
TestSliceRoundTrip/Write,Decode/int32 |
pass | pass |
TestSliceRoundTrip/Write,Decode/int64 |
pass | pass |
TestSliceRoundTrip/Write,Decode/int8 |
pass | pass |
TestSliceRoundTrip/Write,Decode/uint16 |
pass | pass |
TestSliceRoundTrip/Write,Decode/uint32 |
pass | pass |
TestSliceRoundTrip/Write,Decode/uint64 |
pass | pass |
TestSliceRoundTrip/Write,Decode/uint8 |
pass | pass |
TestSliceRoundTrip/Write,Read |
pass | pass |
TestSliceRoundTrip/Write,Read/int16 |
pass | pass |
TestSliceRoundTrip/Write,Read/int32 |
pass | pass |
TestSliceRoundTrip/Write,Read/int64 |
pass | pass |
TestSliceRoundTrip/Write,Read/int8 |
pass | pass |
TestSliceRoundTrip/Write,Read/uint16 |
pass | pass |
TestSliceRoundTrip/Write,Read/uint32 |
pass | pass |
TestSliceRoundTrip/Write,Read/uint64 |
pass | pass |
TestSliceRoundTrip/Write,Read/uint8 |
pass | pass |
TestUnexportedRead |
pass | pass |
TestUnexportedRead/Decode |
pass | pass |
TestUnexportedRead/Read |
pass | pass |
TestUvarint |
pass | pass |
TestVarint |
pass | pass |
TestWriteSlice |
pass | pass |
TestWriteSlice/Append |
pass | pass |
TestWriteSlice/Encode |
pass | pass |
TestWriteSlice/Write |
pass | pass |
TestWriteT |
pass | pass |
TestWriteT/Append |
pass | pass |
TestWriteT/Encode |
pass | pass |
TestWriteT/Write |
pass | pass |
Disclosed divergences
A disclosed divergence is a specific Go assertion the managed CLR provably cannot satisfy — not
a skipped test and not a tolerance. Each one is pinned by exact failure signature in the package’s
hand-owned go2cs_test_disclosures.json;
a disclosed test that fails any other way is still a hard mismatch.
| Test | Class | Pinned reason |
|---|---|---|
TestAppendAllocs |
alloc-profile |
want-zero AllocsPerRun assert: binary.Append’s reflect walk boxes every field value into any (Value readers) in the managed model where Go’s encoder writes through pre-sized memory allocation-free; boxing into an interface allocates on the CLR by construction |
TestSizeAllocs |
aggregate |
no failure text of its own — the roll-up of this test’s disclosed subtests |
TestSizeAllocs/*binary.Struct |
alloc-profile |
want-zero AllocsPerRun assert: Size(v any) boxes the pointer argument per call and Indirect materializes an addressable bridge Value — CLR heap allocations Go’s non-escaping eface avoids |
TestSizeAllocs/[1]binary.Struct |
alloc-profile |
want-zero AllocsPerRun assert: Size(v any) boxes the array argument per call (a full managed copy of the array struct) — CLR heap allocations Go’s non-escaping eface avoids |
TestSizeAllocs/[]binary.Struct |
alloc-profile |
want-zero AllocsPerRun assert: Size(v any) boxes the slice argument per call — a CLR heap allocation Go’s non-escaping eface avoids |
TestSizeAllocs/[]binary.Struct#01 |
alloc-profile |
want-zero AllocsPerRun assert: Size(v any) boxes the slice argument per call — a CLR heap allocation Go’s non-escaping eface avoids |
TestSizeAllocs/binary.Struct |
alloc-profile |
want-zero AllocsPerRun assert: Size(v any) boxes the struct argument per call, and the cached-struct-size lookup constructs a boxed reflect.Value — CLR heap allocations Go’s non-escaping eface and pointer-word Value avoid |
TestSizeAllocs/complex128 |
alloc-profile |
want-zero AllocsPerRun assert: Size(v any) boxes its argument into the interface per call — a CLR heap allocation Go’s non-escaping eface avoids |
TestSizeAllocs/complex64 |
alloc-profile |
want-zero AllocsPerRun assert: Size(v any) boxes its argument into the interface per call — a CLR heap allocation Go’s non-escaping eface avoids; the interned descriptor read behind it is allocation-free but the boxing alone fails the want-zero |
Excluded declarations
Declarations filtered from both sides of the comparison, and therefore not claimed above:
Benchmark, Fuzz and Example declarations the converted host does not execute, plus any
test requiring a capability the managed runtime does not provide — a testing member the host
has not implemented, or a platform behavior it provably cannot reproduce. Each is named with
the capability it needs.
- BenchmarkAppendInts (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkAppendSlice1000Int32s (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkAppendSlice1000Structs (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkAppendStruct (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkAppendUint16 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkAppendUint32 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkAppendUint64 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkLittleEndianAppendUint16 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkLittleEndianAppendUint32 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkLittleEndianAppendUint64 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkLittleEndianPutUint16 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkLittleEndianPutUint32 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkLittleEndianPutUint64 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkPutUint16 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkPutUint32 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkPutUint64 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkPutUvarint32 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkPutUvarint64 (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkReadFloats (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkReadInts (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkReadSlice1000Float32s (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkReadSlice1000Int32s (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkReadSlice1000Structs (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkReadSlice1000Uint8s (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkReadStruct (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkSize (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkWriteFloats (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkWriteInts (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkWriteSlice1000Float32s (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkWriteSlice1000Int32s (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkWriteSlice1000Structs (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkWriteSlice1000Uint8s (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkWriteStruct (benchmark): benchmark execution is deferred to Phase 4D
- ExampleByteOrder_get (example): example execution is deferred to Phase 4D
- ExampleByteOrder_put (example): example execution is deferred to Phase 4D
- ExamplePutUvarint (example): example execution is deferred to Phase 4D
- ExamplePutVarint (example): example execution is deferred to Phase 4D
- ExampleRead (example): example execution is deferred to Phase 4D
- ExampleRead_multi (example): example execution is deferred to Phase 4D
- ExampleUvarint (example): example execution is deferred to Phase 4D
- ExampleVarint (example): example execution is deferred to Phase 4D
- ExampleWrite (example): example execution is deferred to Phase 4D
- ExampleWrite_multi (example): example execution is deferred to Phase 4D