summaryrefslogtreecommitdiff
path: root/src/lib/net/port_test.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-01-16 14:16:31 -0800
committerRob Pike <r@golang.org>2009-01-16 14:16:31 -0800
commit969365a06e210a3a3c969a99585e868aecc6af8a (patch)
treecd385f6db111dd90dcbaa1a2007e17ae50e043de /src/lib/net/port_test.go
parentcea97fbfc985cf2cbd110c00d2e436b776b271f8 (diff)
downloadgolang-969365a06e210a3a3c969a99585e868aecc6af8a.tar.gz
casify linux syscall dependents, plus a few stragglers
R=rsc DELTA=97 (0 added, 0 deleted, 97 changed) OCL=22971 CL=22973
Diffstat (limited to 'src/lib/net/port_test.go')
-rw-r--r--src/lib/net/port_test.go58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/lib/net/port_test.go b/src/lib/net/port_test.go
index 1d7b4c2c3..0bfff496d 100644
--- a/src/lib/net/port_test.go
+++ b/src/lib/net/port_test.go
@@ -9,43 +9,43 @@ import (
"testing";
)
-type PortTest struct {
+type portTest struct {
netw string;
name string;
port int;
ok bool;
}
-var porttests = []PortTest {
- PortTest{ "tcp", "echo", 7, true },
- PortTest{ "tcp", "discard", 9, true },
- PortTest{ "tcp", "systat", 11, true },
- PortTest{ "tcp", "daytime", 13, true },
- PortTest{ "tcp", "chargen", 19, true },
- PortTest{ "tcp", "ftp-data", 20, true },
- PortTest{ "tcp", "ftp", 21, true },
- PortTest{ "tcp", "ssh", 22, true },
- PortTest{ "tcp", "telnet", 23, true },
- PortTest{ "tcp", "smtp", 25, true },
- PortTest{ "tcp", "time", 37, true },
- PortTest{ "tcp", "domain", 53, true },
- PortTest{ "tcp", "gopher", 70, true },
- PortTest{ "tcp", "finger", 79, true },
- PortTest{ "tcp", "http", 80, true },
+var porttests = []portTest {
+ portTest{ "tcp", "echo", 7, true },
+ portTest{ "tcp", "discard", 9, true },
+ portTest{ "tcp", "systat", 11, true },
+ portTest{ "tcp", "daytime", 13, true },
+ portTest{ "tcp", "chargen", 19, true },
+ portTest{ "tcp", "ftp-data", 20, true },
+ portTest{ "tcp", "ftp", 21, true },
+ portTest{ "tcp", "ssh", 22, true },
+ portTest{ "tcp", "telnet", 23, true },
+ portTest{ "tcp", "smtp", 25, true },
+ portTest{ "tcp", "time", 37, true },
+ portTest{ "tcp", "domain", 53, true },
+ portTest{ "tcp", "gopher", 70, true },
+ portTest{ "tcp", "finger", 79, true },
+ portTest{ "tcp", "http", 80, true },
- PortTest{ "udp", "echo", 7, true },
- PortTest{ "udp", "tacacs", 49, true },
- PortTest{ "udp", "tftp", 69, true },
- PortTest{ "udp", "bootpc", 68, true },
- PortTest{ "udp", "bootps", 67, true },
- PortTest{ "udp", "domain", 53, true },
- PortTest{ "udp", "ntp", 123, true },
- PortTest{ "udp", "snmp", 161, true },
- PortTest{ "udp", "syslog", 514, true },
- PortTest{ "udp", "nfs", 2049, true },
+ portTest{ "udp", "echo", 7, true },
+ portTest{ "udp", "tacacs", 49, true },
+ portTest{ "udp", "tftp", 69, true },
+ portTest{ "udp", "bootpc", 68, true },
+ portTest{ "udp", "bootps", 67, true },
+ portTest{ "udp", "domain", 53, true },
+ portTest{ "udp", "ntp", 123, true },
+ portTest{ "udp", "snmp", 161, true },
+ portTest{ "udp", "syslog", 514, true },
+ portTest{ "udp", "nfs", 2049, true },
- PortTest{ "--badnet--", "zzz", 0, false },
- PortTest{ "tcp", "--badport--", 0, false },
+ portTest{ "--badnet--", "zzz", 0, false },
+ portTest{ "tcp", "--badport--", 0, false },
}
export func TestLookupPort(t *testing.T) {