Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit e4909ed

Browse files
committed
gps: Add PackageTree.TrimHiddenPackages tests
1 parent adedbf9 commit e4909ed

File tree

13 files changed

+373
-0
lines changed

13 files changed

+373
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package onlyfromtests
6+
7+
import (
8+
"sort"
9+
10+
_ "varied/_secondorder"
11+
12+
"github.com/golang/dep/internal/gps"
13+
)
14+
15+
var (
16+
M = sort.Strings
17+
_ = gps.Solve
18+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package onlyfromtests
6+
7+
import (
8+
"os"
9+
"sort"
10+
)
11+
12+
var (
13+
_ = sort.Strings
14+
_ = os.PathSeparator
15+
)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package frommain
6+
7+
import (
8+
"sort"
9+
10+
"github.com/golang/dep/internal/gps"
11+
)
12+
13+
var (
14+
M = sort.Strings
15+
_ = gps.Solve
16+
)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package never
6+
7+
import (
8+
"sort"
9+
10+
"github.com/golang/dep/internal/gps"
11+
)
12+
13+
var (
14+
M = sort.Strings
15+
_ = gps.Solve
16+
)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package secondorder
6+
7+
import "hash"
8+
9+
var (
10+
H = hash.Hash
11+
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package always
6+
7+
import _ "varied/.onlyfromtests"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package dotslash
6+
7+
import (
8+
"../github.com/golang/dep/internal/gps"
9+
)
10+
11+
var (
12+
A = gps.Solver
13+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package main
6+
7+
import (
8+
_ "varied/_frommain"
9+
"varied/simple"
10+
)
11+
12+
var (
13+
_ = simple.S
14+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package main
6+
7+
import (
8+
"net/http"
9+
)
10+
11+
var (
12+
_ = http.Client
13+
)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2017 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package simple
6+
7+
import "varied/simple/testdata"
8+
9+
var (
10+
_ = testdata.H
11+
)

0 commit comments

Comments
 (0)