MCPcopy Create free account
hub / github.com/facebook/time / TestBytesToPacketError

Function TestBytesToPacketError

ntp/protocol/ntp_test.go:115–120  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

113// so a new field left unwired, or a wrong byte offset, would silently drop or
114// corrupt a value; the whole-struct compare catches it.
115func TestPacketHeaderRoundTrip(t *testing.T) {
116 p := &Packet{
117 Settings: 0x23, Stratum: 2, Poll: 6, Precision: -25,
118 RootDelay: 0x11111111, RootDispersion: 0x22222222, ReferenceID: 0x33333333,
119 RefTimeSec: 0x44444444, RefTimeFrac: 0x55555555,
120 OrigTimeSec: 0x66666666, OrigTimeFrac: 0x77777777,
121 RxTimeSec: 0x88888888, RxTimeFrac: 0x99999999,
122 TxTimeSec: 0xAAAAAAAA, TxTimeFrac: 0xBBBBBBBB,
123 }

Callers

nothing calls this directly

Calls 1

BytesToPacketFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…