Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1845)

Delta Between Two Patch Sets: src/pkg/net/parse_test.go

Issue 7193044: all: use t.Skip{,f} (Closed)
Left Patch Set: Created 12 years, 2 months ago
Right Patch Set: diff -r 76dc0d7cec07 https://go.googlecode.com/hg/ Created 12 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/net/net_test.go ('k') | src/pkg/net/protoconn_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package net 5 package net
6 6
7 import ( 7 import (
8 "bufio" 8 "bufio"
9 "os" 9 "os"
10 "runtime" 10 "runtime"
11 "testing" 11 "testing"
12 ) 12 )
13 13
14 func TestReadLine(t *testing.T) { 14 func TestReadLine(t *testing.T) {
15 // /etc/services file does not exist on windows and Plan 9. 15 // /etc/services file does not exist on windows and Plan 9.
16 switch runtime.GOOS { 16 switch runtime.GOOS {
17 case "plan9", "windows": 17 case "plan9", "windows":
18 » » t.Logf("skipping test on %q", runtime.GOOS) 18 » » t.Skipf("skipping test on %q", runtime.GOOS)
19 » » return
20 } 19 }
21 filename := "/etc/services" // a nice big file 20 filename := "/etc/services" // a nice big file
22 21
23 fd, err := os.Open(filename) 22 fd, err := os.Open(filename)
24 if err != nil { 23 if err != nil {
25 t.Fatalf("open %s: %v", filename, err) 24 t.Fatalf("open %s: %v", filename, err)
26 } 25 }
27 br := bufio.NewReader(fd) 26 br := bufio.NewReader(fd)
28 27
29 file, err := open(filename) 28 file, err := open(filename)
(...skipping 13 matching lines...) Expand all
43 t.Fatalf("%s:%d (#%d)\nbufio => %q, %v\nnet => %q, %v", 42 t.Fatalf("%s:%d (#%d)\nbufio => %q, %v\nnet => %q, %v",
44 filename, lineno, byteno, bline, berr, line, ok) 43 filename, lineno, byteno, bline, berr, line, ok)
45 } 44 }
46 if !ok { 45 if !ok {
47 break 46 break
48 } 47 }
49 lineno++ 48 lineno++
50 byteno += len(line) + 1 49 byteno += len(line) + 1
51 } 50 }
52 } 51 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b