bufio — validation proof

Go’s own bufio 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 bufio row in Validated Test Packages.

Validated 2026-09-23 · converter f95f88866

80 matched · 1 disclosed — Go 1.24.13, windows/amd64, converted package src/core/bufio.

Measured at Release (tiered JIT off), oracle go version go1.24.13 windows/amd64.

Verdicts

Test go test go2cs
TestBadReader pass pass
TestBlankLines pass pass
TestBufferFull pass pass
TestDontLoopForever pass pass
TestEmptyLinesOK pass pass
TestEmptyTokens pass pass
TestErrAtEOF pass pass
TestHugeBuffer pass pass
TestLargeReader pass pass
TestLineTooLong pass pass
TestLinesAfterRead pass pass
TestNegativeEOFReader pass pass
TestNegativeRead pass pass
TestNewReaderSizeIdempotent pass pass
TestNewWriterSizeIdempotent pass pass
TestNoUnreadByteAfterDiscard pass pass
TestNoUnreadByteAfterPeek pass pass
TestNoUnreadByteAfterWriteTo pass pass
TestNoUnreadRuneAfterDiscard pass pass
TestNoUnreadRuneAfterPeek pass pass
TestNoUnreadRuneAfterWriteTo pass pass
TestNonEOFWithEmptyRead pass pass
TestPartialReadEOF pass pass
TestPeek pass pass
TestPeekThenUnreadRune pass pass
TestReadAfterLines pass pass
TestReadEmptyBuffer pass pass
TestReadLine pass pass
TestReadLineNewlines pass pass
TestReadLineNonNilLineOrError pass pass
TestReadRune pass pass
TestReadStringAllocs pass fail (disclosed)
TestReadWriteRune pass pass
TestReadZero pass pass
TestReadZero/bufsize=100 pass pass
TestReadZero/bufsize=2 pass pass
TestReader pass pass
TestReaderClearError pass pass
TestReaderDiscard pass pass
TestReaderReset pass pass
TestReaderSimple pass pass
TestReaderSize pass pass
TestReaderWriteTo pass pass
TestReaderWriteToErrors pass pass
TestScanByte pass pass
TestScanLineEmptyFinalLine pass pass
TestScanLineEmptyFinalLineWithCR pass pass
TestScanLineNoNewline pass pass
TestScanLineReturnButNoNewline pass pass
TestScanLineTooLong pass pass
TestScanLongLines pass pass
TestScanRune pass pass
TestScanWords pass pass
TestScanWordsExcessiveWhiteSpace pass pass
TestSpace pass pass
TestSplitError pass pass
TestUnreadByte pass pass
TestUnreadByteMultiple pass pass
TestUnreadByteOthers pass pass
TestUnreadRune pass pass
TestUnreadRuneAtEOF pass pass
TestUnreadRuneError pass pass
TestWithNoEmptyTokens pass pass
TestWriteErrors pass pass
TestWriteInvalidRune pass pass
TestWriteString pass pass
TestWriteStringStringWriter pass pass
TestWriter pass pass
TestWriterAppend pass pass
TestWriterReadFrom pass pass
TestWriterReadFromCounts pass pass
TestWriterReadFromErrNoProgress pass pass
TestWriterReadFromErrors pass pass
TestWriterReadFromMustReturnUnderlyingError pass pass
TestWriterReadFromMustSetUnderlyingError pass pass
TestWriterReadFromUntilEOF pass pass
TestWriterReadFromWhileFull pass pass
TestWriterReadFromWithBufferedData pass pass
TestWriterReset pass pass
TestWriterSize pass pass
TestZeroReader 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
TestReadStringAllocs deferred at-most-one AllocsPerRun assert: ReadString returns a Go string built over the reader’s buffered bytes, which in the managed model materializes a fresh byte[] for the @string plus the collectSlices/append working state — Go’s single allocation is the string body alone, produced by a runtime concatenation the CLR has no equivalent for. RELABEL 2026-09-23 (C1, from the i7 reading run at bb54ff0920, Release with tiering off): alloc-profile -> deferred. The run’s own unit note is COUNT, so golib’s counter SAW these objects – the COUNT arm of the 2026-09-05 ladder – and the site family is one a named plan removes: read at src/core/bufio/bufio.cs:516, ReadString’s var buf strings.Builder is emitted heap(new strings.Builder(), out var Ꮡbuf) because Builder.copyCheck stores its own address, so the path mints a ж beside the one buffer Go allocates -- the reading of 2. This supersedes the working-state attribution above, which was never read at a site. RE-SIGNED 2026-09-23 (C1, as ruled at ledger 2026-09-23 03:37 O4): the attribution above is CORRECTED -- the two counted objects are ReadString's ж box (bufio.cs:516) and String()'s ElemRefBox; the buffer is uncounted. The zh-box plan is dropped. The strings.Builder box sits at the identity-keyed boundary -- copyCheck stores and compares the Builder's own address (strings/builder.cs:26-40) -- which the zh-box vetoes exclude (X1/X2, DESIGN-zh-box-reduction.md:162-165; XM-6, DESIGN-zh-box-b-prime.md:583-585; DESIGN-zh-box-three-capabilities.md §6), so zh-box is NOT its plan.

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.