Commit 17daf48d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0983b672
......@@ -51,16 +51,6 @@ type T struct {
enc proto.Encoding // encoding to use for messages exchange
}
// bin returns payload for raw binary data as it would-be encoded by t.enc .
// XXX place
func (t *T) bin(data string) []byte {
switch t.enc {
case 'N': return []byte(data)
case 'M': return msgp.AppendBytes(nil, []byte(data))
default: panic("bug")
}
}
// Verify tests f for all possible environments.
func Verify(t *testing.T, f func(*T)) {
// for each encoding
......@@ -71,6 +61,14 @@ func Verify(t *testing.T, f func(*T)) {
}
}
// bin returns payload for raw binary data as it would-be encoded by t.enc .
func (t *T) bin(data string) []byte {
switch t.enc {
case 'N': return []byte(data)
case 'M': return msgp.AppendBytes(nil, []byte(data))
default: panic("bug")
}
}
func xclose(c io.Closer) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment