Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
1bf66f08
Commit
1bf66f08
authored
Feb 28, 2013
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: fix a few more printf arg bugs found by go vet
R=golang-dev, iant CC=golang-dev
https://golang.org/cl/7413045
parent
3dc7f17e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
rat_test.go
src/pkg/math/big/rat_test.go
+1
-1
set_test.go
src/pkg/reflect/set_test.go
+3
-3
strings_test.go
src/pkg/strings/strings_test.go
+1
-1
No files found.
src/pkg/math/big/rat_test.go
View file @
1bf66f08
...
...
@@ -753,7 +753,7 @@ func TestFloat64SpecialCases(t *testing.T) {
// 4. Check exactness using slow algorithm.
if
wasExact
:=
new
(
Rat
)
.
SetFloat64
(
f
)
.
Cmp
(
r
)
==
0
;
wasExact
!=
exact
{
t
.
Errorf
(
"Rat.SetString(%q).Float64().exact = %
b, want %b
"
,
input
,
exact
,
wasExact
)
t
.
Errorf
(
"Rat.SetString(%q).Float64().exact = %
t, want %t
"
,
input
,
exact
,
wasExact
)
}
}
}
...
...
src/pkg/reflect/set_test.go
View file @
1bf66f08
...
...
@@ -81,7 +81,7 @@ func TestImplicitMapConversion(t *testing.T) {
t
.
Errorf
(
"#5 after SetMapIndex(b1, b2): %p (!= %p), %t (map=%v)"
,
x
,
b2
,
ok
,
m
)
}
if
p
:=
mv
.
MapIndex
(
ValueOf
(
b1
))
.
Elem
()
.
Pointer
();
p
!=
uintptr
(
unsafe
.
Pointer
(
b2
))
{
t
.
Errorf
(
"#5 MapIndex(b1) = %
p
want %p"
,
p
,
b2
)
t
.
Errorf
(
"#5 MapIndex(b1) = %
#x
want %p"
,
p
,
b2
)
}
}
{
...
...
@@ -96,7 +96,7 @@ func TestImplicitMapConversion(t *testing.T) {
t
.
Errorf
(
"#6 after SetMapIndex(c1, c2): %p (!= %p), %t (map=%v)"
,
x
,
c2
,
ok
,
m
)
}
if
p
:=
mv
.
MapIndex
(
ValueOf
(
c1
))
.
Pointer
();
p
!=
ValueOf
(
c2
)
.
Pointer
()
{
t
.
Errorf
(
"#6 MapIndex(c1) = %
p
want %p"
,
p
,
c2
)
t
.
Errorf
(
"#6 MapIndex(c1) = %
#x
want %p"
,
p
,
c2
)
}
}
{
...
...
@@ -115,7 +115,7 @@ func TestImplicitMapConversion(t *testing.T) {
t
.
Errorf
(
"#7 after SetMapIndex(b1, b2): %p (!= %p), %t (map=%v)"
,
x
,
b2
,
ok
,
m
)
}
if
p
:=
mv
.
MapIndex
(
ValueOf
(
b1
))
.
Pointer
();
p
!=
uintptr
(
unsafe
.
Pointer
(
b2
))
{
t
.
Errorf
(
"#7 MapIndex(b1) = %
p
want %p"
,
p
,
b2
)
t
.
Errorf
(
"#7 MapIndex(b1) = %
#x
want %p"
,
p
,
b2
)
}
}
...
...
src/pkg/strings/strings_test.go
View file @
1bf66f08
...
...
@@ -967,7 +967,7 @@ var ContainsRuneTests = []struct {
func
TestContainsRune
(
t
*
testing
.
T
)
{
for
_
,
ct
:=
range
ContainsRuneTests
{
if
ContainsRune
(
ct
.
str
,
ct
.
r
)
!=
ct
.
expected
{
t
.
Errorf
(
"ContainsRune(%
s, %s
) = %v, want %v"
,
t
.
Errorf
(
"ContainsRune(%
q, %q
) = %v, want %v"
,
ct
.
str
,
ct
.
r
,
!
ct
.
expected
,
ct
.
expected
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment