Changeset 8315

Show
Ignore:
Timestamp:
20/12/11 15:54:35 (5 months ago)
Author:
westram
Message:
  • wrapped some UNIT_TESTS / DEBUG code
Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/ARBDB/adGene.cxx

    r8313 r8315  
    7272} 
    7373 
     74#if defined(UNIT_TESTS) 
    7475static GBDATA* GEN_create_nonexisting_gene_rel_gene_data(GBDATA *gb_gene_data, const char *name) { 
    7576    GB_ERROR  error   = GB_push_transaction(gb_gene_data); 
     
    8990    return gb_gene; 
    9091} 
     92#endif 
    9193 
    9294GBDATA* GEN_find_or_create_gene_rel_gene_data(GBDATA *gb_gene_data, const char *name) { 
  • trunk/ARBDB/adhash.cxx

    r8309 r8315  
    384384 
    385385 
    386 static void GBS_string_2_hashtab(GB_HASH *hash, char *data) { // modifies data 
     386#if defined(UNIT_TESTS) 
     387static void GBS_string_2_hashtab(GB_HASH *hash, char *data) { // currently only used in unit tests below 
     388    // modifies data 
    387389    char *p, *d, *dp; 
    388390    int   c; 
     
    424426    } 
    425427} 
     428#endif 
    426429 
    427430static gbs_hash_entry *find_hash_entry(const GB_HASH *hs, const char *key, size_t *index) { 
     
    743746} 
    744747 
     748#if defined(UNIT_TESTS) 
    745749static size_t GBS_hash_count_value(GB_HASH *hs, long val) { 
    746750    size_t hsize    = hs->size; 
     
    759763    return count; 
    760764} 
     765#endif 
    761766 
    762767const char *GBS_hash_next_element_that(GB_HASH *hs, const char *last_key, bool (*condition)(const char *key, long val, void *cd), void *cd) { 
     
    895900} 
    896901 
     902#if defined(UNIT_TESTS) 
    897903static long GBS_numhash_count_elems(GB_NUMHASH *hs) { 
    898904    return hs->nelem; 
    899905} 
     906#endif 
    900907 
    901908static void GBS_erase_numhash(GB_NUMHASH *hs) { 
  • trunk/NTREE/NT_extern.cxx

    r8313 r8315  
    871871} 
    872872 
     873#if defined(DEBUG) 
    873874static void NT_fix_database(AW_window *) { 
    874875    GB_ERROR err = 0; 
     
    876877    if (err) aw_message(err); 
    877878} 
     879#endif 
    878880 
    879881static void relink_pseudo_species_to_organisms(GBDATA *&ref_gb_node, char *&ref_name, GB_HASH *organism_hash) { 
     
    990992// -------------------------------------------------------------------------------------------------- 
    991993 
    992 static void NT_alltree_remove_leafs(AW_window *, AW_CL cl_mode, AW_CL cl_gb_main) { 
     994static void NT_alltree_remove_leafs(AW_window *, AW_CL cl_mode, AW_CL cl_gb_main) { // @@@ test and activate for public 
    993995    GBDATA               *gb_main = (GBDATA*)cl_gb_main; 
    994996    GBT_TREE_REMOVE_TYPE  mode    = (GBT_TREE_REMOVE_TYPE)cl_mode;