mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-23 07:28:57 +01:00
796c5ad42d
transport/ssh: update go-netssh to new version => supports CloseWrite and Deadlines => build: require Go 1.11 (netssh requires it)
23 lines
447 B
Go
23 lines
447 B
Go
package frameconn
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestIsPublicFrameType(t *testing.T) {
|
|
for i := uint32(0); i < 256; i++ {
|
|
i := i
|
|
t.Run(fmt.Sprintf("^%d", i), func(t *testing.T) {
|
|
assert.False(t, IsPublicFrameType(^i))
|
|
})
|
|
}
|
|
assert.True(t, IsPublicFrameType(0))
|
|
assert.True(t, IsPublicFrameType(1))
|
|
assert.True(t, IsPublicFrameType(255))
|
|
assert.False(t, IsPublicFrameType(rstFrameType))
|
|
}
|
|
|