main_test.go 377 B

123456789101112131415161718
  1. // +build !appengine
  2. package internal
  3. import (
  4. "go/build"
  5. "path/filepath"
  6. "testing"
  7. )
  8. func TestFindMainPath(t *testing.T) {
  9. // Tests won't have package main, instead they have testing.tRunner
  10. want := filepath.Join(build.Default.GOROOT, "src", "testing", "testing.go")
  11. got := findMainPath()
  12. if want != got {
  13. t.Errorf("findMainPath: want %s, got %s", want, got)
  14. }
  15. }