From 121a14b13bc9765f94c6ded75a2ba4c7470cc549 Mon Sep 17 00:00:00 2001 From: Yuchen Liang Date: Sun, 14 Jan 2024 16:32:28 -0500 Subject: [PATCH] better way to retrieve trie answer Signed-off-by: Yuchen Liang --- test/primer/trie_debug_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/primer/trie_debug_test.cpp b/test/primer/trie_debug_test.cpp index 48c2f1770..17757748a 100644 --- a/test/primer/trie_debug_test.cpp +++ b/test/primer/trie_debug_test.cpp @@ -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"; } }