@@ -56,49 +56,6 @@ func TestIterUsesSourcePatchInsteadOfAltPkg(t *testing.T) {
5656 }
5757}
5858
59- func TestBuildSourcePatchOverlayForInternalSync (t * testing.T ) {
60- overlay , err := buildSourcePatchOverlayForGOROOT (nil , env .LLGoRuntimeDir (), runtime .GOROOT (), sourcePatchBuildContext {
61- goos : runtime .GOOS ,
62- goarch : runtime .GOARCH ,
63- goversion : "go1.26.0" ,
64- })
65- if err != nil {
66- t .Fatal (err )
67- }
68-
69- syncDir := filepath .Join (runtime .GOROOT (), "src" , "internal" , "sync" )
70- patchFile := filepath .Join (syncDir , "z_llgo_patch_hashtriemap.go" )
71- patchSrc , ok := overlay [patchFile ]
72- if ! ok {
73- t .Fatalf ("missing source patch file %s" , patchFile )
74- }
75- if ! strings .Contains (string (patchSrc ), "type HashTrieMap" ) {
76- t .Fatalf ("source patch file %s does not contain HashTrieMap replacement" , patchFile )
77- }
78-
79- stdFile := filepath .Join (syncDir , "hashtriemap.go" )
80- stdSrc , ok := overlay [stdFile ]
81- if ! ok {
82- t .Fatalf ("missing stub overlay for %s" , stdFile )
83- }
84- got := string (stdSrc )
85- if ! strings .Contains (got , "package sync" ) {
86- t .Fatalf ("stub overlay for %s lost package clause" , stdFile )
87- }
88- if strings .Contains (got , "type HashTrieMap" ) {
89- t .Fatalf ("stub overlay for %s still contains original declarations" , stdFile )
90- }
91- }
92-
93- func TestInternalSyncUsesSourcePatchInsteadOfAltPkg (t * testing.T ) {
94- if ! llruntime .HasSourcePatchPkg ("internal/sync" ) {
95- t .Fatal ("internal/sync should be registered as a source patch package" )
96- }
97- if llruntime .HasAltPkg ("internal/sync" ) {
98- t .Fatal ("internal/sync should not remain an alt package" )
99- }
100- }
101-
10259func TestSyncAtomicRemainsAltPkg (t * testing.T ) {
10360 if llruntime .HasSourcePatchPkg ("sync/atomic" ) {
10461 t .Fatal ("sync/atomic should not be registered as a source patch package" )
0 commit comments