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-10-25 · converter 3e3f18925
143 matched · 3 disclosed — Go 1.26.10, windows/amd64, converted package
src/core/encoding/binary.
Measured at Release (tiered JIT off), oracle go version go1.26.10 windows/amd64.
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 | pass |
TestSizeAllocs/[]binary.Struct |
pass | pass |
TestSizeAllocs/[]binary.Struct#01 |
pass | pass |
TestSizeAllocs/binary.Struct |
pass | pass |
TestSizeAllocs/bool |
pass | pass |
TestSizeAllocs/complex128 |
pass | pass |
TestSizeAllocs/complex64 |
pass | pass |
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 this conversion does not 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.
The Class column says which kind each one is: a deferred entry is an assertion the managed
CLR can meet, pinned against the named plan that will retire it; every other class is one it
provably cannot satisfy.
| Test | Class | Pinned reason |
|---|---|---|
TestAppendAllocs |
deferred |
Want-zero AllocsPerRun assert: Go’s binary.Append writes through pre-sized memory without allocating. The converted reflect walk counts golib-runtime objects per run: 75 at go1.24.13 and 9 at go1.26.10 on windows and linux (identical test body). Boxing field values into any is not among them: golib’s counter never charges a CLR box (AllocationCounter.cs:50-53), and the value-typed TestSizeAllocs subtests read exactly zero on Windows. The counted sites are not yet attributed; the candidates are on binary.cs’s reflect path. |
TestSizeAllocs |
aggregate |
no failure text of its own — the roll-up of this test’s disclosed subtests |
TestSizeAllocs/*binary.Struct |
deferred |
Want-zero AllocsPerRun assert on Size of a *Struct: Go’s non-escaping interface argument allocates nothing. Boxing the pointer argument is not the cause: golib’s counter never charges a CLR box (AllocationCounter.cs:50-53), and the value-typed TestSizeAllocs subtests read exactly zero on Windows. At go1.26.10 golib’s counter charges no object on this path and the measurable figure is bytes, 192 per run on windows and linux; the candidate site is binary.cs’s Indirect over ValueOf. |
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