MCPcopy Create free account
hub / github.com/google/nftables / TestAlignmentData

Function TestAlignmentData

alignedbuff/alignedbuff_test.go:7–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5)
6
7func TestAlignmentData(t *testing.T) {
8 if uint16AlignMask == 0 {
9 t.Fatal("zero uint16 alignment mask")
10 }
11 if uint32AlignMask == 0 {
12 t.Fatal("zero uint32 alignment mask")
13 }
14 if uint64AlignMask == 0 {
15 t.Fatal("zero uint64 alignment mask")
16 }
17 if len(padding) == 0 {
18 t.Fatal("zero alignment padding sequence")
19 }
20 if uintSize == 0 {
21 t.Fatal("zero uint size")
22 }
23 if int32AlignMask == 0 {
24 t.Fatal("zero uint32 alignment mask")
25 }
26}
27
28func TestAlignedBuff8(t *testing.T) {
29 b := NewWithData([]byte{0x42})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…