mu_assert("Impossible to execute a kr alignment with the sequence 0",kr_align(sequences,tmp));
mu_assert("Impossible to execute a kr alignment with the sequence 0",kr_align(sequences,tmp));
destroy_buffer(sequences_buffer);
destroy_buffer(sequences_buffer);
free(sequences);
free(sequences);
fclose(tmp);
tmp=fopen(tmp_file,"r");
tmp=fopen(tmp_file,"r");
size_tbuff_size=1024;
size_tbuff_size=1024;
char*buffer=malloc(buff_size*sizeof(char));
char*buffer=malloc(buff_size*sizeof(char));
mu_assert("0 lines in output",getline(&buffer,&buff_size,tmp)==0);
intlines=getline(&buffer,&buff_size,tmp);
mu_assert("0 lines in output",lines!=-1);
mu_assert("test allele 2 not found at position 964",strcmp(buffer,"Test_overlapping Must find allele 2x2 but not the 1 and 3 (1 nucleotide missing)\trbsC_S_2\t+\t964\n")==0);
mu_assert("test allele 2 not found at position 964",strcmp(buffer,"Test_overlapping Must find allele 2x2 but not the 1 and 3 (1 nucleotide missing)\trbsC_S_2\t+\t964\n")==0);
mu_assert("not enougth lines in output",getline(&buffer,&buff_size,tmp)==0);
mu_assert("not enougth lines in output",getline(&buffer,&buff_size,tmp)!=-1);
mu_assert("test allele 2 not found at position 1929",strcmp(buffer,"Test_overlapping Must find allele 2x2 but not the 1 and 3 (1 nucleotide missing)\trbsC_S_2\t+\t1929\n")==0);
mu_assert("test allele 2 not found at position 1929",strcmp(buffer,"Test_overlapping Must find allele 2x2 but not the 1 and 3 (1 nucleotide missing)\trbsC_S_2\t+\t1929\n")==0);
mu_assert("not enougth lines in output",getline(&buffer,&buff_size,tmp)==0);
mu_assert("not enougth lines in output",getline(&buffer,&buff_size,tmp)!=-1);
mu_assert("test allele 3 not found at position 2895",strcmp(buffer,"Test_overlapping Must find allele 2x2 but not the 1 and 3 (1 nucleotide missing)\trbsC_S_3\t-\t2895\n")==0);
mu_assert("test allele 3 not found at position 2895",strcmp(buffer,"Test_overlapping Must find allele 2x2 but not the 1 and 3 (1 nucleotide missing)\trbsC_S_3\t-\t3829\n")==0);
mu_assert("Too much matches on test_seq_overlapp.fasta",getline(&buffer,&buff_size,tmp)!=0);
mu_assert("Too much matches on test_seq_overlapp.fasta",getline(&buffer,&buff_size,tmp)!=0);