Skip to content

Commit

Permalink
[libc] refs #105 Correcting jobs to string in TestSHA256KnownValue
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykel Arias Torres committed Sep 9, 2019
1 parent 36eeebd commit 536367a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/cgo/tests/check_cipher.bip44.bip44.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void mustDefaultSeed(GoSlice* seed)
GoString_ str = {strTmp, 0};
err = SKY_base58_Hex2String(*seed, &str);
ck_assert_int_eq(err, SKY_OK);
ck_assert_str_eq("24e563fb095d766df3862c70432cc1b2210b24d232da69af7af09d2ec86d28782ce58035bae29994c84081836aebe36a9b46af1578262fefc53e37efbe94be57", str.p);
ck_assert(strncmp(str.p, "24e563fb095d766df3862c70432cc1b2210b24d232da69af7af09d2ec86d28782ce58035bae29994c84081836aebe36a9b46af1578262fefc53e37efbe94be57", 128) == SKY_OK);
}

START_TEST(TestNewCoin)
Expand Down
5 changes: 3 additions & 2 deletions lib/cgo/tests/check_cipher.hash.common.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ START_TEST(TestSHA256KnownValue)
SKY_cipher_SHA256_Hex(&sha, &tmp_output);
registerMemCleanup((void*)tmp_output.p);

ck_assert(strcmp(tmp_output.p, vals[i].output) == SKY_OK);
ck_assert(strncmp(tmp_output.p, vals[i].output, strlen(vals[i].output)) == SKY_OK);
}
}
END_TEST
Expand All @@ -117,7 +117,8 @@ START_TEST(TestSumSHA256)
GoUint8 cbuff[257];
GoSlice b = {bbuff, 0, 257};
cipher__SHA256 h1;
randBytes(&b, 256);
// randBytes(&b, 256);
SKY_cipher_RandByte(256, &b);
SKY_cipher_SumSHA256(b, &h1);
cipher__SHA256 tmp = "";
ck_assert_int_eq(isU8Eq(h1, tmp, 32), 0);
Expand Down

0 comments on commit 536367a

Please sign in to comment.