12 #ifndef ARB_UNIT_TEST_H
13 #define ARB_UNIT_TEST_H
17 namespace arb_unit_test {
19 struct test_alignment_data {
25 inline void test_insert_SAI_data(
GBDATA *
gb_main,
ARB_ERROR&
error,
const char *test_aliname, test_alignment_data *ali_data,
int sai_count) {
26 for (
int sp = 0; sp<sai_count && !
error; ++sp) {
27 test_alignment_data& sai = ali_data[sp];
40 inline GBDATA *test_create_DB(
ARB_ERROR& error,
const char *test_aliname, test_alignment_data *ali_data,
int species_count,
bool use_compression) {
50 long ali_len = strlen(ali_data[0].data);
54 for (
int sp = 0; sp<species_count && !
error; ++sp) {
55 test_alignment_data& species = ali_data[sp];
76 #define TEST_SPECIES_COUNT(test_ali_data) ARRAY_ELEMS(test_ali_data)
78 #define TEST_CREATE_DB(error,test_aliname,test_ali_data,compress) \
79 arb_unit_test::test_create_DB(error, test_aliname, test_ali_data, \
80 TEST_SPECIES_COUNT(test_ali_data), compress)
82 #define TEST_DB_INSERT_SAI(gb_main, error,test_aliname,test_ali_data) \
83 arb_unit_test::test_insert_SAI_data(gb_main, error, test_aliname, test_ali_data, \
84 TEST_SPECIES_COUNT(test_ali_data))
91 #error arb_unit_test.h included twice
92 #endif // ARB_UNIT_TEST_H
GBDATA * GB_open(const char *path, const char *opent)
GB_ERROR GB_write_string(GBDATA *gbd, const char *s)
bool GB_allow_compression(GBDATA *gb_main, bool allow_compression)
GB_ERROR GB_push_transaction(GBDATA *gbd)
NOT4PERL GBDATA * GBT_add_data(GBDATA *species, const char *ali_name, const char *key, GB_TYPES type) __ATTR__DEPRECATED_TODO("better use GBT_create_sequence_data()")
GB_ERROR GB_await_error()
GB_ERROR GBT_set_default_alignment(GBDATA *gb_main, const char *alignment_name)
static void error(const char *msg)
GB_ERROR GB_pop_transaction(GBDATA *gbd)
void GB_write_flag(GBDATA *gbd, long flag)
GBDATA * GBT_create_alignment(GBDATA *gb_main, const char *name, long len, long aligned, long security, const char *type, const char *why_created)
GBDATA * GBT_find_or_create_species(GBDATA *gb_main, const char *name, bool markCreated)
GBDATA * GBT_find_or_create_SAI(GBDATA *gb_main, const char *name)
GBDATA * GBT_get_species_data(GBDATA *gb_main)