Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Good General Cauchy Matrices #2

Merged
merged 14 commits into from
Jan 7, 2019
Prev Previous commit
Next Next commit
Use decode_gc for common test
  • Loading branch information
vihu committed Dec 29, 2018
commit 1e6d3fca3e149d377a8e764000d84f678c956d07
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clean:
$(REBAR) clean

test:
$(REBAR) eqc -n 100
$(REBAR) ct --verbose; $(REBAR) eqc -n 100

typecheck:
$(REBAR) dialyzer
Expand Down
10 changes: 5 additions & 5 deletions test/erasure_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ cauchy_test(Config) ->
Data = proplists:get_value(data, Config),
{ok, Shards} = erasure:encode_gc(K, M, Data),
ct:pal("Shards: ~p", [Shards]),
?assertEqual({ok, Data}, erasure:decode(K, M, Shards)),
?assertEqual({ok, Data}, erasure:decode(K, M, lists:sublist(Shards, K))),
?assertEqual({ok, Data}, erasure:decode(K, M, lists:reverse(lists:sublist(Shards, K)))),
?assertMatch({error, _}, erasure:decode(K, M, lists:sublist(Shards, K - 1))),
?assertMatch({error, _}, erasure:decode(K, M, lists:sublist(Shards, K - 1) ++ [hd(Shards)])),
?assertEqual({ok, Data}, erasure:decode_gc(K, M, Shards)),
?assertEqual({ok, Data}, erasure:decode_gc(K, M, lists:sublist(Shards, K))),
?assertEqual({ok, Data}, erasure:decode_gc(K, M, lists:reverse(lists:sublist(Shards, K)))),
?assertMatch({error, _}, erasure:decode_gc(K, M, lists:sublist(Shards, K - 1))),
?assertMatch({error, _}, erasure:decode_gc(K, M, lists:sublist(Shards, K - 1) ++ [hd(Shards)])),
ok.