1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-28 16:10:27 +08:00

TUN-528: Move cloudflared into a separate repo

This commit is contained in:
Areg Harutyunyan
2018-05-01 18:45:06 -05:00
parent e8c621a648
commit d06fc520c7
4726 changed files with 1763680 additions and 0 deletions

31
vendor/zombiezen.com/go/capnproto2/address_test.go generated vendored Normal file
View File

@@ -0,0 +1,31 @@
package capnp
import (
"testing"
)
func TestAddressElement(t *testing.T) {
tests := []struct {
a Address
i int32
sz Size
out Address
ok bool
}{
{0, 0, 0, 0, true},
{0, 1, 0, 0, true},
{0, 1, 8, 8, true},
{0, 2, 8, 16, true},
{24, 1, 0, 24, true},
{24, 1, 8, 32, true},
{24, 2, 8, 40, true},
{0, 0x7fffffff, 3, 0, false},
{0xffffffff, 0x7fffffff, 0xffffffff, 0, false},
}
for _, test := range tests {
out, ok := test.a.element(test.i, test.sz)
if ok != test.ok || (ok && out != test.out) {
t.Errorf("%#v.element(%d, %d) = %#v, %t; want %#v, %t", test.a, test.i, test.sz, out, ok, test.out, test.ok)
}
}
}