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

Function TestPrepareMathParametersSinglePoint

fbclock/daemon/helpers_test.go:98–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

96}
97
98func TestPrepareMathParametersSinglePoint(t *testing.T) {
99 dataPoints := []*DataPoint{
100 {MasterOffsetNS: 42.0, PathDelayNS: 123.0, FreqAdjustmentPPB: 999.0, ClockAccuracyNS: 10.0},
101 }
102
103 got := prepareMathParameters(dataPoints)
104 require.Equal(t, []float64{42.0}, got["offset"])
105 require.Equal(t, []float64{123.0}, got["delay"])
106 require.Equal(t, []float64{999.0}, got["freq"])
107 require.Equal(t, []float64{10.0}, got["clockaccuracy"])
108 require.Empty(t, got["freqchange"])
109 require.Empty(t, got["freqchangeabs"])
110}
111
112func TestMapOfInterface(t *testing.T) {
113 input := map[string][]float64{

Callers

nothing calls this directly

Calls 2

prepareMathParametersFunction · 0.85
EmptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…