]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/imports: remove test dependency on json internals
authorDamien Neil <dneil@google.com>
Tue, 15 Apr 2025 18:17:03 +0000 (11:17 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 15 Apr 2025 22:43:46 +0000 (15:43 -0700)
commit64371adcf4f431adc1f6afab4d7e61bb9b5eff72
tree66ab6f8b33d549ab1f8d534bdcd65150d17d11a9
parentfcd73b0ac307c2a639bd28939b0f5ea4b6bb3c6c
cmd/go/internal/imports: remove test dependency on json internals

TestScan loads encoding/json and verifies that various imports
match expectations. The new v2 encoding/json violates these
expectations. Since this test is testing the ScanDir function,
not encoding/json, change it to use a test package with defined
imports instead.

Change-Id: I68a0813ccf37daadbd6ea52872a8ac132141e82a
Reviewed-on: https://go-review.googlesource.com/c/go/+/665795
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
src/cmd/go/internal/imports/scan_test.go
src/cmd/go/internal/imports/testdata/test/child/child.go [new file with mode: 0644]
src/cmd/go/internal/imports/testdata/test/tags.txt [new file with mode: 0644]
src/cmd/go/internal/imports/testdata/test/test.go [new file with mode: 0644]
src/cmd/go/internal/imports/testdata/test/test_test.go [new file with mode: 0644]
src/cmd/go/internal/imports/testdata/test/want.txt [new file with mode: 0644]