diff options
Diffstat (limited to 'libgo/go/go/build/build_test.go')
-rw-r--r-- | libgo/go/go/build/build_test.go | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/libgo/go/go/build/build_test.go b/libgo/go/go/build/build_test.go index 4d705b6fb28..9f3c83258c7 100644 --- a/libgo/go/go/build/build_test.go +++ b/libgo/go/go/build/build_test.go @@ -1,4 +1,4 @@ -// Copyright 2011 The Go Authors. All rights reserved. +// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -152,28 +152,28 @@ func TestShouldBuild(t *testing.T) { ctx := &Context{BuildTags: []string{"tag1"}} m := map[string]bool{} - if !ctx.shouldBuild([]byte(file1), m) { + if !ctx.shouldBuild([]byte(file1), m, nil) { t.Errorf("shouldBuild(file1) = false, want true") } if !reflect.DeepEqual(m, want1) { - t.Errorf("shoudBuild(file1) tags = %v, want %v", m, want1) + t.Errorf("shouldBuild(file1) tags = %v, want %v", m, want1) } m = map[string]bool{} - if ctx.shouldBuild([]byte(file2), m) { - t.Errorf("shouldBuild(file2) = true, want fakse") + if ctx.shouldBuild([]byte(file2), m, nil) { + t.Errorf("shouldBuild(file2) = true, want false") } if !reflect.DeepEqual(m, want2) { - t.Errorf("shoudBuild(file2) tags = %v, want %v", m, want2) + t.Errorf("shouldBuild(file2) tags = %v, want %v", m, want2) } m = map[string]bool{} ctx = &Context{BuildTags: nil} - if !ctx.shouldBuild([]byte(file3), m) { + if !ctx.shouldBuild([]byte(file3), m, nil) { t.Errorf("shouldBuild(file3) = false, want true") } if !reflect.DeepEqual(m, want3) { - t.Errorf("shoudBuild(file3) tags = %v, want %v", m, want3) + t.Errorf("shouldBuild(file3) tags = %v, want %v", m, want3) } } @@ -302,15 +302,14 @@ func TestShellSafety(t *testing.T) { } func TestImportVendor(t *testing.T) { - t.Skip("skipping; hpack has moved to internal for now; golang.org/issue/14047") testenv.MustHaveGoBuild(t) // really must just have source ctxt := Default ctxt.GOPATH = "" - p, err := ctxt.Import("golang.org/x/net/http2/hpack", filepath.Join(ctxt.GOROOT, "src/net/http"), 0) + p, err := ctxt.Import("golang_org/x/net/http2/hpack", filepath.Join(ctxt.GOROOT, "src/net/http"), 0) if err != nil { - t.Fatalf("cannot find vendored golang.org/x/net/http2/hpack from net/http directory: %v", err) + t.Fatalf("cannot find vendored golang_org/x/net/http2/hpack from net/http directory: %v", err) } - want := "vendor/golang.org/x/net/http2/hpack" + want := "vendor/golang_org/x/net/http2/hpack" if p.ImportPath != want { t.Fatalf("Import succeeded but found %q, want %q", p.ImportPath, want) } @@ -336,7 +335,7 @@ func TestImportVendorParentFailure(t *testing.T) { ctxt := Default ctxt.GOPATH = "" // This import should fail because the vendor/golang.org/x/net/http2 directory has no source code. - p, err := ctxt.Import("golang.org/x/net/http2", filepath.Join(ctxt.GOROOT, "src/net/http"), 0) + p, err := ctxt.Import("golang_org/x/net/http2", filepath.Join(ctxt.GOROOT, "src/net/http"), 0) if err == nil { t.Fatalf("found empty parent in %s", p.Dir) } |