1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:54:42 -07:00

oracle/testdata: avoid sort.Sort so that my $GOROOT doesn't appear in output

Sorry for the oversight.

Change-Id: Ibb686dbee996b5223bd223fdd3afaab243a7a3ee
Reviewed-on: https://go-review.googlesource.com/7501
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Alan Donovan 2015-03-12 13:23:14 -04:00
parent 8239116d59
commit bf80246757
8 changed files with 66 additions and 55 deletions

View File

@ -12,3 +12,9 @@ func Func() {
const Const = 3
var Var = 0
type Sorter interface {
Len() int
Less(i, j int) bool
Swap(i, j int)
}

View File

@ -5,7 +5,6 @@ package main
// See implements-methods.golden for expected query results.
import _ "lib"
import _ "sort"
func main() {
}

View File

@ -4,42 +4,42 @@
"implements": {
"type": {
"name": "main.F",
"pos": "testdata/src/main/implements-methods-json.go:13:6",
"pos": "testdata/src/main/implements-methods-json.go:12:6",
"kind": "interface"
},
"to": [
{
"name": "*main.C",
"pos": "testdata/src/main/implements-methods-json.go:22:6",
"pos": "testdata/src/main/implements-methods-json.go:21:6",
"kind": "pointer"
},
{
"name": "main.D",
"pos": "testdata/src/main/implements-methods-json.go:23:6",
"pos": "testdata/src/main/implements-methods-json.go:22:6",
"kind": "struct"
},
{
"name": "main.FG",
"pos": "testdata/src/main/implements-methods-json.go:17:6",
"pos": "testdata/src/main/implements-methods-json.go:16:6",
"kind": "interface"
}
],
"method": {
"name": "func (F).f()",
"pos": "testdata/src/main/implements-methods-json.go:14:2"
"pos": "testdata/src/main/implements-methods-json.go:13:2"
},
"to_method": [
{
"name": "method (*C) f()",
"pos": "testdata/src/main/implements-methods-json.go:25:13"
"pos": "testdata/src/main/implements-methods-json.go:24:13"
},
{
"name": "method (D) f()",
"pos": "testdata/src/main/implements-methods-json.go:26:12"
"pos": "testdata/src/main/implements-methods-json.go:25:12"
},
{
"name": "method (FG) f()",
"pos": "testdata/src/main/implements-methods-json.go:18:2"
"pos": "testdata/src/main/implements-methods-json.go:17:2"
}
]
}
@ -49,37 +49,37 @@
"implements": {
"type": {
"name": "main.FG",
"pos": "testdata/src/main/implements-methods-json.go:17:6",
"pos": "testdata/src/main/implements-methods-json.go:16:6",
"kind": "interface"
},
"to": [
{
"name": "*main.D",
"pos": "testdata/src/main/implements-methods-json.go:23:6",
"pos": "testdata/src/main/implements-methods-json.go:22:6",
"kind": "pointer"
}
],
"from": [
{
"name": "main.F",
"pos": "testdata/src/main/implements-methods-json.go:13:6",
"pos": "testdata/src/main/implements-methods-json.go:12:6",
"kind": "interface"
}
],
"method": {
"name": "func (FG).f()",
"pos": "testdata/src/main/implements-methods-json.go:18:2"
"pos": "testdata/src/main/implements-methods-json.go:17:2"
},
"to_method": [
{
"name": "method (*D) f()",
"pos": "testdata/src/main/implements-methods-json.go:26:12"
"pos": "testdata/src/main/implements-methods-json.go:25:12"
}
],
"from_method": [
{
"name": "method (F) f()",
"pos": "testdata/src/main/implements-methods-json.go:14:2"
"pos": "testdata/src/main/implements-methods-json.go:13:2"
}
]
}
@ -89,31 +89,31 @@
"implements": {
"type": {
"name": "main.FG",
"pos": "testdata/src/main/implements-methods-json.go:17:6",
"pos": "testdata/src/main/implements-methods-json.go:16:6",
"kind": "interface"
},
"to": [
{
"name": "*main.D",
"pos": "testdata/src/main/implements-methods-json.go:23:6",
"pos": "testdata/src/main/implements-methods-json.go:22:6",
"kind": "pointer"
}
],
"from": [
{
"name": "main.F",
"pos": "testdata/src/main/implements-methods-json.go:13:6",
"pos": "testdata/src/main/implements-methods-json.go:12:6",
"kind": "interface"
}
],
"method": {
"name": "func (FG).g() []int",
"pos": "testdata/src/main/implements-methods-json.go:19:2"
"pos": "testdata/src/main/implements-methods-json.go:18:2"
},
"to_method": [
{
"name": "method (*D) g() []int",
"pos": "testdata/src/main/implements-methods-json.go:28:13"
"pos": "testdata/src/main/implements-methods-json.go:27:13"
}
],
"from_method": [
@ -129,24 +129,24 @@
"implements": {
"type": {
"name": "*main.C",
"pos": "testdata/src/main/implements-methods-json.go:22:6",
"pos": "testdata/src/main/implements-methods-json.go:21:6",
"kind": "pointer"
},
"from": [
{
"name": "main.F",
"pos": "testdata/src/main/implements-methods-json.go:13:6",
"pos": "testdata/src/main/implements-methods-json.go:12:6",
"kind": "interface"
}
],
"method": {
"name": "func (*C).f()",
"pos": "testdata/src/main/implements-methods-json.go:25:13"
"pos": "testdata/src/main/implements-methods-json.go:24:13"
},
"from_method": [
{
"name": "method (F) f()",
"pos": "testdata/src/main/implements-methods-json.go:14:2"
"pos": "testdata/src/main/implements-methods-json.go:13:2"
}
]
}
@ -156,37 +156,37 @@
"implements": {
"type": {
"name": "main.D",
"pos": "testdata/src/main/implements-methods-json.go:23:6",
"pos": "testdata/src/main/implements-methods-json.go:22:6",
"kind": "struct"
},
"from": [
{
"name": "main.F",
"pos": "testdata/src/main/implements-methods-json.go:13:6",
"pos": "testdata/src/main/implements-methods-json.go:12:6",
"kind": "interface"
}
],
"fromptr": [
{
"name": "main.FG",
"pos": "testdata/src/main/implements-methods-json.go:17:6",
"pos": "testdata/src/main/implements-methods-json.go:16:6",
"kind": "interface"
}
],
"method": {
"name": "func (D).f()",
"pos": "testdata/src/main/implements-methods-json.go:26:12"
"pos": "testdata/src/main/implements-methods-json.go:25:12"
},
"from_method": [
{
"name": "method (F) f()",
"pos": "testdata/src/main/implements-methods-json.go:14:2"
"pos": "testdata/src/main/implements-methods-json.go:13:2"
}
],
"fromptr_method": [
{
"name": "method (FG) f()",
"pos": "testdata/src/main/implements-methods-json.go:18:2"
"pos": "testdata/src/main/implements-methods-json.go:17:2"
}
]
}
@ -196,24 +196,24 @@
"implements": {
"type": {
"name": "*main.D",
"pos": "testdata/src/main/implements-methods-json.go:23:6",
"pos": "testdata/src/main/implements-methods-json.go:22:6",
"kind": "pointer"
},
"from": [
{
"name": "main.F",
"pos": "testdata/src/main/implements-methods-json.go:13:6",
"pos": "testdata/src/main/implements-methods-json.go:12:6",
"kind": "interface"
},
{
"name": "main.FG",
"pos": "testdata/src/main/implements-methods-json.go:17:6",
"pos": "testdata/src/main/implements-methods-json.go:16:6",
"kind": "interface"
}
],
"method": {
"name": "func (*D).g() []int",
"pos": "testdata/src/main/implements-methods-json.go:28:13"
"pos": "testdata/src/main/implements-methods-json.go:27:13"
},
"from_method": [
{
@ -222,7 +222,7 @@
},
{
"name": "method (FG) g() []int",
"pos": "testdata/src/main/implements-methods-json.go:19:2"
"pos": "testdata/src/main/implements-methods-json.go:18:2"
}
]
}
@ -232,24 +232,24 @@
"implements": {
"type": {
"name": "main.sorter",
"pos": "testdata/src/main/implements-methods-json.go:30:6",
"pos": "testdata/src/main/implements-methods-json.go:29:6",
"kind": "slice"
},
"from": [
{
"name": "sort.Interface",
"pos": "/usr/local/google/home/adonovan/go/src/sort/sort.go:12:6",
"name": "lib.Sorter",
"pos": "testdata/src/lib/lib.go:16:6",
"kind": "interface"
}
],
"method": {
"name": "func (sorter).Len() int",
"pos": "testdata/src/main/implements-methods-json.go:32:15"
"pos": "testdata/src/main/implements-methods-json.go:31:15"
},
"from_method": [
{
"name": "method (sort.Interface) Len() int",
"pos": "/usr/local/google/home/adonovan/go/src/sort/sort.go:14:2"
"name": "method (lib.Sorter) Len() int",
"pos": "testdata/src/lib/lib.go:17:2"
}
]
}
@ -259,7 +259,7 @@
"implements": {
"type": {
"name": "main.I",
"pos": "testdata/src/main/implements-methods-json.go:36:6",
"pos": "testdata/src/main/implements-methods-json.go:35:6",
"kind": "interface"
},
"to": [
@ -271,7 +271,7 @@
],
"method": {
"name": "func (I).Method(*int) *int",
"pos": "testdata/src/main/implements-methods-json.go:37:2"
"pos": "testdata/src/main/implements-methods-json.go:36:2"
},
"to_method": [
{

View File

@ -5,7 +5,6 @@ package main
// See implements-methods.golden for expected query results.
import _ "lib"
import _ "sort"
func main() {
}

View File

@ -29,7 +29,7 @@ concrete method func (*D).g() []int
-------- @implements Len --------
concrete method func (sorter).Len() int
implements method (sort.Interface).Len
implements method (lib.Sorter).Len
-------- @implements I.Method --------
abstract method func (I).Method(*int) *int

View File

@ -5,7 +5,6 @@ package main
// See implements.golden for expected query results.
import _ "lib"
import _ "sort"
func main() {
}

View File

@ -36,7 +36,7 @@ pointer type *main.D
-------- @implements sorter --------
slice type main.sorter
implements sort.Interface
implements lib.Sorter
-------- @implements I --------
interface type main.I

View File

@ -7,11 +7,15 @@ import of package "hash/fnv"
-------- @describe ref-pkg-import --------
import of package "lib"
const Const untyped int = 3
func Func func()
type Type int
const Const untyped int = 3
func Func func()
type Sorter interface{...}
method (Sorter) Len() int
method (Sorter) Less(i int, j int) bool
method (Sorter) Swap(i int, j int)
type Type int
method (Type) Method(x *int) *int
var Var int
var Var int
-------- @describe ref-const --------
reference to const lib.Const untyped int
@ -41,9 +45,13 @@ this *int may point to these objects:
-------- @describe ref-pkg --------
reference to package "lib"
const Const untyped int = 3
func Func func()
type Type int
const Const untyped int = 3
func Func func()
type Sorter interface{...}
method (Sorter) Len() int
method (Sorter) Less(i int, j int) bool
method (Sorter) Swap(i int, j int)
type Type int
method (Type) Method(x *int) *int
var Var int
var Var int