]> Cypherpunks repositories - gostls13.git/commitdiff
testing: update documentation to match current coding style
authorChristopher Wedgwood <cw@f00f.org>
Sun, 11 Apr 2010 17:18:49 +0000 (10:18 -0700)
committerRob Pike <r@golang.org>
Sun, 11 Apr 2010 17:18:49 +0000 (10:18 -0700)
R=rsc, r
CC=golang-dev
https://golang.org/cl/823045

src/pkg/testing/quick/quick.go
src/pkg/testing/script/script.go
src/pkg/testing/testing.go

index ae5cff6e2274930cf5efd5f422730b12e22d11c3..da35d64db5b87f2d8353eb235e264f2c2bd34f32 100644 (file)
@@ -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) {
index 9a41a467f3532d11868f9f2cce76e3b11d082441..3dbfbd5ff6dafd4b0b9a59d92b4e6895a9fa01b7 100644 (file)
@@ -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
index 5bdbd8aa270dbdd4cde61e7069681d2320e39fe9..763b65b05c5bf1bb552cc8194e2b7d926ad5d1aa 100644 (file)
 // 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