unicode/utf16 — validation proof
Go’s own unicode/utf16 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 unicode/utf16 row in
Validated Test Packages.
Validated 2026-08-04 · converter f6e9c0cf0
8 matched · 1 disclosed — Go 1.23.1, windows/amd64, converted package
src/core/unicode/utf16.
Verdicts
| Test | go test |
go2cs |
|---|---|---|
TestAllocationsDecode |
pass | fail (disclosed) |
TestAppendRune |
pass | pass |
TestConstants |
pass | pass |
TestDecode |
pass | pass |
TestDecodeRune |
pass | pass |
TestEncode |
pass | pass |
TestEncodeRune |
pass | pass |
TestIsSurrogate |
pass | pass |
TestRuneLen |
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 |
|---|---|---|
TestAllocationsDecode |
alloc-profile |
want-zero AllocsPerRun assert: Decode returns a []rune that the managed runtime heap-allocates where Go’s escape analysis stack-allocates the non-escaping result (the test is guarded by testenv.SkipIfOptimizationOff precisely because the zero-alloc outcome depends on the optimizer); a malloc-counting shim would fail identically. TestDecode proves the decoded output is correct — only the allocation profile diverges |
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.
- BenchmarkAppendRuneValidASCII (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkAppendRuneValidJapaneseChars (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkDecodeRune (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkDecodeValidASCII (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkDecodeValidJapaneseChars (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkEncodeRune (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkEncodeValidASCII (benchmark): benchmark execution is deferred to Phase 4D
- BenchmarkEncodeValidJapaneseChars (benchmark): benchmark execution is deferred to Phase 4D