From 372f2d802201583b0af2db2fa023d355812db2b1 Mon Sep 17 00:00:00 2001 From: Luka Krmpotic Date: Thu, 6 Feb 2025 21:33:18 +0000 Subject: [PATCH] unicode/utf8: remove init from utf8_test TestConstants and init test the same thing, remove init, it does not exist in utf16_test.go either. Fixes #71579 Change-Id: Ie0afd640bebde822733b6eac0bf98a17872f4e5f GitHub-Last-Rev: d7224c18376e00038261279abdfa954abc3a8303 GitHub-Pull-Request: golang/go#71582 Reviewed-on: https://go-review.googlesource.com/c/go/+/647335 Commit-Queue: Ian Lance Taylor Reviewed-by: Keith Randall Reviewed-by: Keith Randall Reviewed-by: qiu laidongfeng2 <2645477756@qq.com> Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- src/unicode/utf8/utf8_test.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/unicode/utf8/utf8_test.go b/src/unicode/utf8/utf8_test.go index 69362d2cf1..865167731f 100644 --- a/src/unicode/utf8/utf8_test.go +++ b/src/unicode/utf8/utf8_test.go @@ -12,16 +12,6 @@ import ( . "unicode/utf8" ) -// Validate the constants redefined from unicode. -func init() { - if MaxRune != unicode.MaxRune { - panic("utf8.MaxRune is wrong") - } - if RuneError != unicode.ReplacementChar { - panic("utf8.RuneError is wrong") - } -} - // Validate the constants redefined from unicode. func TestConstants(t *testing.T) { if MaxRune != unicode.MaxRune { -- 2.51.0