Skip to content

Commit

Permalink
#37 Updates 'index_sar' test file -> redirect_stderr.
Browse files Browse the repository at this point in the history
  • Loading branch information
ezorita committed May 18, 2018
1 parent 8f0bd4c commit 0ad6497
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test_index_sar.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ test_sar_build
char * seq_5 = "$TgAgcatGGC$acTCGA$";
int64_t sar_5[] = {18,11,0,17,12,3,6,10,5,15,13,16,2,9,4,8,14,1,7};

redirect_stderr();

sym_t * sym = sym_new_dna();
test_assert_critical(sym != NULL);

Expand Down Expand Up @@ -127,13 +129,17 @@ test_sar_build
txt_free(txt);
sym_free(sym);
free(sa_buf);

unredirect_stderr();
}


void
test_sar_get
(void)
{
redirect_stderr();

sym_t * sym = sym_new_dna();
test_assert_critical(sym != NULL);
txt_t * txt = txt_new(sym);
Expand Down Expand Up @@ -171,13 +177,17 @@ test_sar_get
sar_free(sar);
txt_free(txt);
sym_free(sym);

unredirect_stderr();
}


void
test_sar_get_range
(void)
{
redirect_stderr();

int64_t ref_sa[] = {18,11,0,17,12,3,6,10,5,15,13,16,2,9,4,8,14,1,7};
int64_t * sa_buf = malloc(30*sizeof(int64_t));
test_assert_critical(sa_buf != NULL);
Expand Down Expand Up @@ -207,13 +217,17 @@ test_sar_get_range
txt_free(txt);
sym_free(sym);
free(sa_buf);

unredirect_stderr();
}


void
test_sar_file
(void)
{
redirect_stderr();

int64_t ref_sa[] = {18,11,0,17,12,3,6,10,5,15,13,16,2,9,4,8,14,1,7};
int64_t * sa_buf = malloc(30*sizeof(int64_t));
test_assert_critical(sa_buf != NULL);
Expand Down Expand Up @@ -272,6 +286,8 @@ test_sar_file
txt_free(txt);
sym_free(sym);
free(sa_buf);

unredirect_stderr();
}

// Define test cases to be run (for export).
Expand Down

0 comments on commit 0ad6497

Please sign in to comment.