Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
3fbe7f4f
Commit
3fbe7f4f
authored
Apr 11, 2010
by
Christopher Wedgwood
Committed by
Rob Pike
Apr 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing: update documentation to match current coding style
R=rsc, r CC=golang-dev
https://golang.org/cl/823045
parent
094732f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
src/pkg/testing/quick/quick.go
src/pkg/testing/quick/quick.go
+2
-2
src/pkg/testing/script/script.go
src/pkg/testing/script/script.go
+4
-4
src/pkg/testing/testing.go
src/pkg/testing/testing.go
+4
-4
No files found.
src/pkg/testing/quick/quick.go
View file @
3fbe7f4f
...
...
@@ -224,11 +224,11 @@ func (s *CheckEqualError) String() string {
//
// func TestOddMultipleOfThree(t *testing.T) {
// f := func(x int) bool {
// y := OddMultipleOfThree(x)
;
// y := OddMultipleOfThree(x)
// return y%2 == 1 && y%3 == 0
// }
// if err := quick.Check(f, nil); err != nil {
// t.Error(err)
;
// t.Error(err)
// }
// }
func
Check
(
function
interface
{},
config
*
Config
)
(
err
os
.
Error
)
{
...
...
src/pkg/testing/script/script.go
View file @
3fbe7f4f
...
...
@@ -206,10 +206,10 @@ func NewEvent(name string, predecessors []*Event, action action) *Event {
// receive events must list the send event as a predecessor but there is no
// ordering between the receive events.
//
// send := NewEvent("send", nil, Send{c, 1})
;
// recv1 := NewEvent("recv 1", []*Event{send}, Recv{c, 1})
;
// recv2 := NewEvent("recv 2", []*Event{send}, Recv{c, 1})
;
// Perform(0, []*Event{send, recv1, recv2})
;
// send := NewEvent("send", nil, Send{c, 1})
// recv1 := NewEvent("recv 1", []*Event{send}, Recv{c, 1})
// recv2 := NewEvent("recv 2", []*Event{send}, Recv{c, 1})
// Perform(0, []*Event{send, recv1, recv2})
//
// At first, only the send event would be in the ready set and thus Perform will
// send a value to the input channel. Now the two receive events are ready and
...
...
src/pkg/testing/testing.go
View file @
3fbe7f4f
...
...
@@ -29,11 +29,11 @@
// If a benchmark needs some expensive setup before running, the timer
// may be stopped:
// func BenchmarkBigLen(b *testing.B) {
// b.StopTimer()
;
// big := NewBig()
;
// b.StartTimer()
;
// b.StopTimer()
// big := NewBig()
// b.StartTimer()
// for i := 0; i < b.N; i++ {
// big.Len()
;
// big.Len()
// }
// }
package
testing
...
...
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