Skip to content

Commit

Permalink
[test] refs fibercrypto#5 Finalized suite test TestNewGenericAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykel Arias Torres committed Mar 27, 2020
1 parent 0290e0f commit 3cf8907
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/cgo/tests/check_util.cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,21 @@ START_TEST(TestNewGenericAddress) {
tests[0].want.Address.p = "2kvLEyXwAYvHfJuFCkjnYNRTUfHPyWgVwKt";
tests[0].want.Address.n = 35;

for (int i = 0; i < 1; i++) {
printf("Load %d\n", i);
tests[1].name = "valid_Addrs2";
tests[1].args.p = "R6aHqKWSQfvpdo2fGSrq4F1RYXkBWR9HHJ";
tests[1].args.n = 34;
tests[1].want.Address.p = "R6aHqKWSQfvpdo2fGSrq4F1RYXkBWR9HHJ";
tests[1].want.Address.n = 34;

tests[2].name = "invalid_Addrs";
tests[2].args.p = "";
tests[2].args.n = 0;
tests[2].want.Address.p = "";
tests[2].want.Address.n = 0;

for (int i = 0; i < 3; i++) {
test_case tt = tests[i];
printf("Load %s iteration # %d\n", tt.name, i);
util__GenericAddress got;
GoUint32_ err = FC_util_NewGenericAddress(tt.args, &got);
ck_assert_int_eq(err, FC_OK);
Expand Down

0 comments on commit 3cf8907

Please sign in to comment.