mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
testing: update documentation to match current coding style
R=rsc, r CC=golang-dev https://golang.org/cl/823045
This commit is contained in:
parent
094732f7eb
commit
3fbe7f4f41
3 changed files with 10 additions and 10 deletions
|
|
@ -224,11 +224,11 @@ func (s *CheckEqualError) String() string {
|
||||||
//
|
//
|
||||||
// func TestOddMultipleOfThree(t *testing.T) {
|
// func TestOddMultipleOfThree(t *testing.T) {
|
||||||
// f := func(x int) bool {
|
// f := func(x int) bool {
|
||||||
// y := OddMultipleOfThree(x);
|
// y := OddMultipleOfThree(x)
|
||||||
// return y%2 == 1 && y%3 == 0
|
// return y%2 == 1 && y%3 == 0
|
||||||
// }
|
// }
|
||||||
// if err := quick.Check(f, nil); err != nil {
|
// if err := quick.Check(f, nil); err != nil {
|
||||||
// t.Error(err);
|
// t.Error(err)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
func Check(function interface{}, config *Config) (err os.Error) {
|
func Check(function interface{}, config *Config) (err os.Error) {
|
||||||
|
|
|
||||||
|
|
@ -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
|
// receive events must list the send event as a predecessor but there is no
|
||||||
// ordering between the receive events.
|
// ordering between the receive events.
|
||||||
//
|
//
|
||||||
// send := NewEvent("send", nil, Send{c, 1});
|
// send := NewEvent("send", nil, Send{c, 1})
|
||||||
// recv1 := NewEvent("recv 1", []*Event{send}, Recv{c, 1});
|
// recv1 := NewEvent("recv 1", []*Event{send}, Recv{c, 1})
|
||||||
// recv2 := NewEvent("recv 2", []*Event{send}, Recv{c, 1});
|
// recv2 := NewEvent("recv 2", []*Event{send}, Recv{c, 1})
|
||||||
// Perform(0, []*Event{send, recv1, recv2});
|
// Perform(0, []*Event{send, recv1, recv2})
|
||||||
//
|
//
|
||||||
// At first, only the send event would be in the ready set and thus Perform will
|
// 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
|
// send a value to the input channel. Now the two receive events are ready and
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,11 @@
|
||||||
// If a benchmark needs some expensive setup before running, the timer
|
// If a benchmark needs some expensive setup before running, the timer
|
||||||
// may be stopped:
|
// may be stopped:
|
||||||
// func BenchmarkBigLen(b *testing.B) {
|
// func BenchmarkBigLen(b *testing.B) {
|
||||||
// b.StopTimer();
|
// b.StopTimer()
|
||||||
// big := NewBig();
|
// big := NewBig()
|
||||||
// b.StartTimer();
|
// b.StartTimer()
|
||||||
// for i := 0; i < b.N; i++ {
|
// for i := 0; i < b.N; i++ {
|
||||||
// big.Len();
|
// big.Len()
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
package testing
|
package testing
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue