MCPcopy Index your code
hub / github.com/gonum/plot / TestAxisSmallTick

Function TestAxisSmallTick

axis_test.go:78–91  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

76}
77
78func TestAxisSmallTick(t *testing.T) {
79 d := DefaultTicks{}
80 for i, test := range axisSmallTickTests {
81 ticks := d.Ticks(test.min, test.max)
82 gotLabels := labelsOf(ticks)
83 gotValues := valuesOf(ticks)
84 if !reflect.DeepEqual(gotValues, test.wantValues) {
85 t.Errorf("tick values mismatch %d:\ngot: %v\nwant:%v", i, gotValues, test.wantValues)
86 }
87 if !reflect.DeepEqual(gotLabels, test.wantLabels) {
88 t.Errorf("tick labels mismatch %d:\ngot: %q\nwant:%q", i, gotLabels, test.wantLabels)
89 }
90 }
91}
92
93func valuesOf(ticks []Tick) []float64 {
94 var values []float64

Callers

nothing calls this directly

Calls 3

TicksMethod · 0.95
labelsOfFunction · 0.85
valuesOfFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…