@@ -84,12 +84,6 @@ func main() {
84
84
}
85
85
86
86
func TestHoverIntLiteral (t * testing.T ) {
87
- // TODO(rfindley): this behavior doesn't actually make sense for vars. It is
88
- // misleading to format their value when it is (of course) variable.
89
- //
90
- // Instead, we should allow hovering on numeric literals.
91
- t .Skip ("golang/go#58220: broken due to new hover logic" )
92
-
93
87
const source = `
94
88
-- main.go --
95
89
package main
@@ -106,13 +100,13 @@ func main() {
106
100
Run (t , source , func (t * testing.T , env * Env ) {
107
101
env .OpenFile ("main.go" )
108
102
hexExpected := "58190"
109
- got , _ := env .Hover (env .RegexpSearch ("main.go" , "hex " ))
103
+ got , _ := env .Hover (env .RegexpSearch ("main.go" , "0xe " ))
110
104
if got != nil && ! strings .Contains (got .Value , hexExpected ) {
111
105
t .Errorf ("Hover: missing expected field '%s'. Got:\n %q" , hexExpected , got .Value )
112
106
}
113
107
114
108
binExpected := "73"
115
- got , _ = env .Hover (env .RegexpSearch ("main.go" , "bigBin " ))
109
+ got , _ = env .Hover (env .RegexpSearch ("main.go" , "0b1 " ))
116
110
if got != nil && ! strings .Contains (got .Value , binExpected ) {
117
111
t .Errorf ("Hover: missing expected field '%s'. Got:\n %q" , binExpected , got .Value )
118
112
}
0 commit comments