diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c4073cc801cf55c72bed78a13c18161f84c5d00..57158c20a20966731d42a75921337e8d67bf9220 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,8 +32,8 @@ test: - pwd - ls -l - cat tests/test.txt - - cp tests/test.txt build/bin - - cp tests/stopWords.txt build/bin + - cp tests/test.txt build + - cp tests/stopWords.txt build - cd build - ls -l - ls -l bin diff --git a/tests/ExampleTests.cpp b/tests/ExampleTests.cpp index 29f69b60422b7bfca8551c8ea48141f7229c1bcf..2c4d77d03db743730f98d6b06718b8a8606f4fb2 100644 --- a/tests/ExampleTests.cpp +++ b/tests/ExampleTests.cpp @@ -26,7 +26,7 @@ TEST(ExampleTests, test_read_and_count_words) { if (getcwd(cwd, sizeof(cwd)) != NULL) { printf("Current working directory: %s\n", cwd); } - read_and_count_words(&counter, "./tests/test.txt"); + read_and_count_words(&counter, "test.txt"); EXPECT_EQ(3, counter.count); EXPECT_STREQ("hello", counter.words[0].word); EXPECT_EQ(3, counter.words[0].frequency); @@ -41,7 +41,7 @@ TEST(ExampleTests, test_read_and_count_words) { TEST(ExampleTests, test_sort_words_by_frequency) { FrequencyCounter counter; init_frequency_counter(&counter); - read_and_count_words(&counter, "./test.txt"); + read_and_count_words(&counter, "test.txt"); sort_words_by_frequency(&counter); EXPECT_EQ(3, counter.count); EXPECT_STREQ("hello", counter.words[0].word); @@ -53,9 +53,9 @@ TEST(ExampleTests, test_sort_words_by_frequency) { TEST(ExampleTests, test_write_results) { FrequencyCounter counter; init_frequency_counter(&counter); - read_and_count_words(&counter, "./test.txt"); + read_and_count_words(&counter, "test.txt"); sort_words_by_frequency(&counter); - write_results(&counter, "./output.txt"); + write_results(&counter, "output.txt"); cleanup_frequency_counter(&counter); // check the output file FILE *f = fopen("./output.txt", "r");