Fix release tests.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3876 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-05-21 01:38:13 +00:00
parent 787e929747
commit 939e13c3c8
5 changed files with 29 additions and 9 deletions

View File

@ -22,9 +22,13 @@ void tf_ssb_test_id_conversion(const tf_test_options_t* options)
(void)bin;
(void)str;
(void)k_id;
assert(tf_ssb_id_str_to_bin(bin, k_id));
assert(tf_ssb_id_bin_to_str(str, sizeof(str), bin));
assert(strcmp(str, k_id) == 0);
bool b = tf_ssb_id_str_to_bin(bin, k_id);
(void)b;
assert(b);
b = tf_ssb_id_bin_to_str(str, sizeof(str), bin);
assert(b);
b = strcmp(str, k_id) == 0;
assert(b);
}
typedef struct _test_t {
@ -107,8 +111,11 @@ void tf_ssb_test_ssb(const tf_test_options_t* options)
sqlite3* db0 = NULL;
sqlite3* db1 = NULL;
assert(sqlite3_open(":memory:", &db0) == SQLITE_OK);
assert(sqlite3_open(":memory:", &db1) == SQLITE_OK);
int r = sqlite3_open(":memory:", &db0);
(void)r;
assert(r == SQLITE_OK);
r = sqlite3_open(":memory:", &db1);
assert(r == SQLITE_OK);
uv_loop_t loop = { 0 };
uv_loop_init(&loop);
@ -166,8 +173,10 @@ void tf_ssb_test_ssb(const tf_test_options_t* options)
tf_ssb_append_message(ssb0, message);
JS_FreeValue(context, message);
assert(tf_ssb_db_blob_get(ssb0, blob_id, NULL, NULL));
assert(!tf_ssb_db_blob_get(ssb1, blob_id, NULL, NULL));
b = tf_ssb_db_blob_get(ssb0, blob_id, NULL, NULL);
assert(b);
b = !tf_ssb_db_blob_get(ssb1, blob_id, NULL, NULL);
assert(b);
tf_ssb_server_open(ssb0, 12347);
uint8_t id0bin[k_id_bin_len];
@ -234,7 +243,9 @@ void tf_ssb_test_following(const tf_test_options_t* options)
{
printf("Testing following.\n");
sqlite3* db0 = NULL;
assert(sqlite3_open(":memory:", &db0) == SQLITE_OK);
int r = sqlite3_open(":memory:", &db0);
(void)r;
assert(r == SQLITE_OK);
uv_loop_t loop = { 0 };
uv_loop_init(&loop);