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
aedf121e
Commit
aedf121e
authored
Jan 16, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
casify struct fields in entire tree.
TBR=r OCL=22997 CL=22997
parent
06869eed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
testing.go
src/lib/testing.go
+6
-6
No files found.
src/lib/testing.go
View file @
aedf121e
...
...
@@ -70,12 +70,12 @@ func (t *T) Fatalf(format string, args ...) {
}
export
type
Test
struct
{
n
ame
string
;
f
*
(
*
T
);
N
ame
string
;
F
*
(
*
T
);
}
func
tRunner
(
t
*
T
,
test
*
Test
)
{
test
.
f
(
t
);
test
.
F
(
t
);
t
.
ch
<-
t
;
}
...
...
@@ -87,18 +87,18 @@ export func Main(tests []Test) {
}
for
i
:=
0
;
i
<
len
(
tests
);
i
++
{
if
*
chatty
{
println
(
"=== RUN "
,
tests
[
i
]
.
n
ame
);
println
(
"=== RUN "
,
tests
[
i
]
.
N
ame
);
}
t
:=
new
(
T
);
t
.
ch
=
make
(
chan
*
T
);
go
tRunner
(
t
,
&
tests
[
i
]);
<-
t
.
ch
;
if
t
.
failed
{
println
(
"--- FAIL:"
,
tests
[
i
]
.
n
ame
);
println
(
"--- FAIL:"
,
tests
[
i
]
.
N
ame
);
print
(
t
.
errors
);
ok
=
false
;
}
else
if
*
chatty
{
println
(
"--- PASS:"
,
tests
[
i
]
.
n
ame
);
println
(
"--- PASS:"
,
tests
[
i
]
.
N
ame
);
print
(
t
.
errors
);
}
}
...
...
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