MCPcopy
hub / github.com/openacid/slim / TestI16NewErrorArgments

Function TestI16NewErrorArgments

array/int_test.go:730–747  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

728}
729
730func TestI16NewErrorArgments(t *testing.T) {
731 var index []int32
732 eltsData := []int16{12, 15, 19, 120, 300}
733
734 var err error
735
736 index = []int32{1, 5, 9, 203}
737 _, err = array.NewI16(index, eltsData)
738 if err == nil {
739 t.Fatalf("new with wrong index length must error")
740 }
741
742 index = []int32{1, 5, 5, 203, 400}
743 _, err = array.NewI16(index, eltsData)
744 if err == nil {
745 t.Fatalf("new with unsorted index must error")
746 }
747}
748
749func TestI16New(t *testing.T) {
750 var cases = []struct {

Callers

nothing calls this directly

Calls 1

NewI16Function · 0.92

Tested by

no test coverage detected