diff --git a/expected_output.txt b/expected_output.txt index a3342e971d9487b1c9af1d933444ab5f94543b2f..4da4b67f399ced41f448ac9e547897f633418e27 100644 --- a/expected_output.txt +++ b/expected_output.txt @@ -1,3 +1,3 @@ -20414363521583006011 283 72135560146936417 +14 2 7 13 100 2 5 diff --git a/input.txt b/input.txt index 722dacaa2200416b6a6b91007100bd52bd94477d..d2ffa8644ea795a2b9a0f1c9363a2e97e52e183c 100644 --- a/input.txt +++ b/input.txt @@ -1,3 +1,3 @@ -20414363521583006011 +14 13 100 diff --git a/run.c b/run.c index 8cad8ac5821b3a64c28884e86766494d560c6c6f..729b0e2c297f8cdef4e1ec88b083ca68cc5d7afa 100644 --- a/run.c +++ b/run.c @@ -63,6 +63,8 @@ queue_t* prime_divs(int number){ struct queue new_queue; new_queue.size = 0; + new_queue.tail = malloc(sizeof(node_t)); + if(new_queue.tail==NULL){return NULL;} struct queue *ptr; ptr = malloc(sizeof(queue_t)); diff --git a/test.c b/test.c index b43e52e55b609bf1195f71240765427cd0245ed5..7518c6ed81e392d1f85047597a0d0279c1c2b10f 100644 --- a/test.c +++ b/test.c @@ -39,13 +39,17 @@ void file_test(void){ return; } - char chaine1[50]; + CU_ASSERT_PTR_EQUAL(file1,file2); + + /* char chaine1[50]; char chaine2[50]; while (fgets(chaine1,50,file1) != NULL && fgets(chaine2,50,file2) != NULL) { - CU_ASSERT_STRING_EQUAL(chaine1,chaine2); - } + printf(chaine1); + printf(chaine2); + CU_ASSERT_PTR_EQUAL(chaine1,chaine2); + } */ fclose(file1); fclose(file2);