Add some test infrastructure.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3658 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
#include "ssb.db.h"
|
||||
#include "ssb.qjs.h"
|
||||
#include "tests.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
@ -9,7 +10,7 @@
|
||||
#include <sqlite3.h>
|
||||
#include <uv.h>
|
||||
|
||||
static void _tf_ssb_test_id_conversion()
|
||||
void tf_ssb_test_id_conversion(const tf_test_options_t* options)
|
||||
{
|
||||
printf("Testing id conversion.\n");
|
||||
uint8_t bin[k_id_bin_len] = { 0 };
|
||||
@ -64,7 +65,7 @@ static int _ssb_test_count_messages(tf_ssb_t* ssb)
|
||||
return count;
|
||||
}
|
||||
|
||||
static void _tf_ssb_test_ssb()
|
||||
void tf_ssb_test_ssb(const tf_test_options_t* options)
|
||||
{
|
||||
printf("Testing SSB.\n");
|
||||
sqlite3* db0 = NULL;
|
||||
@ -158,7 +159,7 @@ static void _tf_ssb_test_ssb()
|
||||
sqlite3_close(db1);
|
||||
}
|
||||
|
||||
static void _tf_ssb_test_following()
|
||||
void tf_ssb_test_following(const tf_test_options_t* options)
|
||||
{
|
||||
printf("Testing following.\n");
|
||||
sqlite3* db0 = NULL;
|
||||
@ -236,12 +237,3 @@ static void _tf_ssb_test_following()
|
||||
|
||||
sqlite3_close(db0);
|
||||
}
|
||||
|
||||
void tf_ssb_test()
|
||||
{
|
||||
printf("tf_ssb_test() starting.\n");
|
||||
_tf_ssb_test_id_conversion();
|
||||
_tf_ssb_test_ssb();
|
||||
_tf_ssb_test_following();
|
||||
printf("tf_ssb_test() completed successfully.\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user