MCPcopy Create free account
hub / github.com/akalin/gopar / TestCoderPAR2VandermondeNewCoderError

Function TestCoderPAR2VandermondeNewCoderError

rsec16/coder_test.go:38–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestCoderPAR2VandermondeNewCoderError(t *testing.T) {
39 // Ideally, we'd test that NewCoder(32768, 65535) succeeds,
40 // but doing so would probably take even longer than 15
41 // seconds.
42 _, err := newCoderPAR2Vandermonde(32769, 65535)
43 require.Equal(t, errors.New("too many data shards"), err)
44
45 _, err = newCoderPAR2Vandermonde(32768, 65536)
46 require.Equal(t, errors.New("too many parity shards"), err)
47}
48
49func makeReconstructionMatrixNaive(dataShards int, availableRows, missingRows, usedParityRows []int, parityMatrix gf2p16.Matrix) (gf2p16.Matrix, error) {
50 m := gf2p16.NewMatrixFromFunction(dataShards, dataShards, func(i, j int) gf2p16.T {

Callers

nothing calls this directly

Calls 1

newCoderPAR2VandermondeFunction · 0.85

Tested by

no test coverage detected