MCPcopy Create free account
hub / github.com/Azure/peerd / TestLess

Function TestLess

tests/random/math/reverse_test.go:33–48  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestLess(t *testing.T) {
34 data := []float64{1, 2, 3, 4, 5}
35
36 r := ReverseFloat64Slice(data)
37 res := r.Less(0, 1)
38
39 if res != false {
40 t.Errorf("expected: %v, got: %v", false, res)
41 }
42
43 res = r.Less(1, 0)
44
45 if res != true {
46 t.Errorf("expected: %v, got: %v", true, res)
47 }
48}
49
50func TestSwap(t *testing.T) {
51 data := []float64{1, 2, 3, 4, 5}

Callers

nothing calls this directly

Calls 2

ReverseFloat64SliceTypeAlias · 0.85
LessMethod · 0.80

Tested by

no test coverage detected