internal/testing/sample: deprecate legacyUnitForPackage
legacyUnitForPackage is deprecated in favor of UnitForPackage.
legacyUnitForModuleRoot is also renamed to UnitForModuleRoot.
For golang/go#39629
Change-Id: I73f781e570552656262f9982bb2a018937598306
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/265002
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/internal/frontend/unit_main_test.go b/internal/frontend/unit_main_test.go
index d7a847f..7e08f6c 100644
--- a/internal/frontend/unit_main_test.go
+++ b/internal/frontend/unit_main_test.go
@@ -102,11 +102,11 @@
return m
}
- pkg1 := sample.UnitForPackage("path.to/foo", "bar")
- pkg2 := sample.UnitForPackage("path2.to/foo", "bar2")
+ pkg1 := sample.UnitForPackage("path.to/foo/bar", "path.to/foo", sample.VersionString, "bar", true)
+ pkg2 := sample.UnitForPackage("path2.to/foo/bar2", "path.to/foo", sample.VersionString, "bar", true)
pkg2.Imports = []string{pkg1.Path}
- pkg3 := sample.UnitForPackage("path3.to/foo", "bar3")
+ pkg3 := sample.UnitForPackage("path3.to/foo/bar3", "path.to/foo", sample.VersionString, "bar3", true)
pkg3.Imports = []string{pkg2.Path, pkg1.Path}
testModules := []*internal.Module{