diff --git a/tests/ExampleTests.cpp b/tests/ExampleTests.cpp index a661d2fe2c8382e76c3cda075a88b60a2eb230d8..d5bc6d04c439d760f2b1a15b03d1a7e2e2ddaab8 100644 --- a/tests/ExampleTests.cpp +++ b/tests/ExampleTests.cpp @@ -88,22 +88,22 @@ TEST(ExampleTests, test_count_words_in_file) { EXPECT_EQ(6, count_words_in_file("test.txt")); } -//TEST(ExampleTests, test_read_and_count_ngrams) { -// FrequencyCounter counter; -// init_frequency_counter(&counter); -// read_and_count_ngrams(&counter, "test.txt", 2); -// EXPECT_EQ(2, counter.count); -// EXPECT_STREQ("hello world", counter.words[0].word); -// EXPECT_EQ(1, counter.words[0].frequency); -// EXPECT_STREQ("world foo", counter.words[1].word); -// EXPECT_EQ(1, counter.words[1].frequency); -// cleanup_frequency_counter(&counter); -//} - -//TEST(ExampleTests, test_mode_interactive) { -// // this is just to make sure the function does not crash -// mode_interactive(); -//} +TEST(ExampleTests, test_read_and_count_ngrams) { + FrequencyCounter counter; + init_frequency_counter(&counter); + read_and_count_ngrams(&counter, "test.txt", 2); + EXPECT_EQ(2, counter.count); + EXPECT_STREQ("hello world", counter.words[0].word); + EXPECT_EQ(1, counter.words[0].frequency); + EXPECT_STREQ("world foo", counter.words[1].word); + EXPECT_EQ(1, counter.words[1].frequency); + cleanup_frequency_counter(&counter); +} + +TEST(ExampleTests, test_mode_interactive) { + // this is just to make sure the function does not crash + mode_interactive(); +}