mirror of https://github.com/wolfSSL/wolfssl.git
Remove TODO+bad tests
parent
18f4b45129
commit
c56e58db5b
30
tests/api.c
30
tests/api.c
|
@ -31228,10 +31228,6 @@ static int test_wolfSSL_a2i_ASN1_INTEGER(void)
|
|||
BIO_free(out);
|
||||
|
||||
AssertNotNull(fixed = BIO_new(wolfSSL_BIO_s_fixed_mem()));
|
||||
/* TODO: can't create zero length buffer
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 0), 1);
|
||||
AssertIntEQ(i2a_ASN1_INTEGER(fixed, ai), 0);
|
||||
*/
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 1), 1);
|
||||
AssertIntEQ(i2a_ASN1_INTEGER(fixed, ai), 0);
|
||||
BIO_free(fixed);
|
||||
|
@ -32019,10 +32015,6 @@ static int test_wolfSSL_ASN1_STRING_print_ex(void)
|
|||
AssertIntEQ(p_len, 15);
|
||||
BIO_read(bio, (void*)rbuf, 15);
|
||||
AssertStrEQ((char*)rbuf, "Hello wolfSSL!");
|
||||
/* TODO: can't create zero length buffers
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 0), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, asn_str, flags), 0);
|
||||
*/
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 1), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, asn_str, flags), 0);
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 14), 1);
|
||||
|
@ -32035,10 +32027,6 @@ static int test_wolfSSL_ASN1_STRING_print_ex(void)
|
|||
AssertIntEQ(p_len, 9);
|
||||
BIO_read(bio, (void*)rbuf, 9);
|
||||
AssertStrEQ((char*)rbuf, "a\\+\\;\\<\\>");
|
||||
/* TODO: can't create zero length buffers
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 0), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, esc_str, flags), 0);
|
||||
*/
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 1), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, esc_str, flags), 0);
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 8), 1);
|
||||
|
@ -32051,10 +32039,6 @@ static int test_wolfSSL_ASN1_STRING_print_ex(void)
|
|||
AssertIntEQ(p_len, 28);
|
||||
BIO_read(bio, (void*)rbuf, 28);
|
||||
AssertStrEQ((char*)rbuf, "OCTET STRING:Hello wolfSSL!");
|
||||
/* TODO: can't create zero length buffers
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 0), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, asn_str, flags), 0);
|
||||
*/
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 1), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, asn_str, flags), 0);
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 12), 1);
|
||||
|
@ -32069,10 +32053,6 @@ static int test_wolfSSL_ASN1_STRING_print_ex(void)
|
|||
AssertIntEQ(p_len, 31);
|
||||
BIO_read(bio, (void*)rbuf, 31);
|
||||
AssertStrEQ((char*)rbuf, "#48656C6C6F20776F6C6653534C2100");
|
||||
/* TODO: can't create zero length buffers
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 0), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, asn_str, flags), 0);
|
||||
*/
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 1), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, asn_str, flags), 0);
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 30), 1);
|
||||
|
@ -32085,10 +32065,6 @@ static int test_wolfSSL_ASN1_STRING_print_ex(void)
|
|||
AssertIntEQ(p_len, 35);
|
||||
BIO_read(bio, (void*)rbuf, 35);
|
||||
AssertStrEQ((char*)rbuf, "#040F48656C6C6F20776F6C6653534C2100");
|
||||
/* TODO: can't create zero length buffers
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 0), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, asn_str, flags), 0);
|
||||
*/
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 1), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_STRING_print_ex(fixed, asn_str, flags), 0);
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 2), 1);
|
||||
|
@ -32248,7 +32224,7 @@ static int test_wolfSSL_ASN1_GENERALIZEDTIME_print(void)
|
|||
BIO_free(bio);
|
||||
|
||||
AssertNotNull(bio = BIO_new(wolfSSL_BIO_s_fixed_mem()));
|
||||
for (i = 1; i < 20; i++) { /* TODO: can't create zero length buffers */
|
||||
for (i = 1; i < 20; i++) {
|
||||
AssertIntEQ(BIO_set_write_buf_size(bio, i), 1);
|
||||
AssertIntEQ(wolfSSL_ASN1_GENERALIZEDTIME_print(bio, >ime), 0);
|
||||
}
|
||||
|
@ -32690,10 +32666,6 @@ static int test_wolfSSL_ASN1_TIME_print(void)
|
|||
AssertIntEQ(XMEMCMP(buf, "Dec 16 21:17:49 2022 GMT", sizeof(buf) - 1), 0);
|
||||
|
||||
/* Test BIO_write fails. */
|
||||
/* TODO: can't create zero length buffers
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 0), 1);
|
||||
AssertIntEQ(ASN1_TIME_print(fixed, notBefore), 0);
|
||||
*/
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 1), 1);
|
||||
AssertIntEQ(ASN1_TIME_print(fixed, notBefore), 0);
|
||||
AssertIntEQ(BIO_set_write_buf_size(fixed, 23), 1);
|
||||
|
|
Loading…
Reference in New Issue