Add check to make sure tox was created successfully

This commit is contained in:
endoffile78 2018-08-21 22:22:39 -05:00 committed by iphydf
parent 21b178396a
commit 76f4ae64b7
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -78,7 +78,9 @@ static void test_save_compatibility(const char *save_path)
options.savedata_length = size;
options.savedata_type = TOX_SAVEDATA_TYPE_TOX_SAVE;
Tox *tox = tox_new(&options, nullptr);
Tox_Err_New err;
Tox *tox = tox_new(&options, &err);
ck_assert_msg(tox, "failed to create tox, error number: %d", err);
free(save_data);