Skip to content

Commit

Permalink
better way to retrieve trie answer
Browse files Browse the repository at this point in the history
Signed-off-by: Yuchen Liang <yuchenl3@andrew.cmu.edu>
  • Loading branch information
yliang412 committed Jan 14, 2024
1 parent a5c45ee commit 121a14b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/primer/trie_debug_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ TEST(TrieDebugger, TestCase) {

// (1) How many children nodes are there on the root?
// Replace `CASE_1_YOUR_ANSWER` in `trie_answer.h` with the correct answer.
if (CASE_1_YOUR_ANSWER != Case1CorrectAnswer()) {
if (CASE_1_YOUR_ANSWER != Case1CorrectAnswer(trie)) {
ASSERT_TRUE(false) << "case 1 not correct";
}

// (2) How many children nodes are there on the node of prefix `9`?
// Replace `CASE_2_YOUR_ANSWER` in `trie_answer.h` with the correct answer.
if (CASE_2_YOUR_ANSWER != Case2CorrectAnswer()) {
if (CASE_2_YOUR_ANSWER != Case2CorrectAnswer(trie)) {
ASSERT_TRUE(false) << "case 2 not correct";
}

// (3) What's the value for `969`?
// Replace `CASE_3_YOUR_ANSWER` in `trie_answer.h` with the correct answer.
if (CASE_3_YOUR_ANSWER != Case3CorrectAnswer()) {
if (CASE_3_YOUR_ANSWER != Case3CorrectAnswer(trie)) {
ASSERT_TRUE(false) << "case 3 not correct";
}
}
Expand Down

0 comments on commit 121a14b

Please sign in to comment.