forked from hswaw/hscloud
15 lines
320 B
Go
15 lines
320 B
Go
package ident
|
|
|
|
import "testing"
|
|
|
|
// TestRequestEncode exercises the (simple) functionality of Reequest.encode.
|
|
func TestRequestEncode(t *testing.T) {
|
|
r := Request{
|
|
ClientPort: 123,
|
|
ServerPort: 234,
|
|
}
|
|
if want, got := "234,123\r\n", string(r.encode()); want != got {
|
|
t.Errorf("Wanted %q, got %q", want, got)
|
|
}
|
|
}
|