@@ -106,14 +106,14 @@ GTEST_TEST(ConstructTreeFromMarkerPreorder, PreorderTraversal)
106106 // I
107107 // / \
108108
109- auto preorder = std::vector<char >{' H' , ' B' , ' F' , NULL , NULL , ' E' , ' A' , NULL , NULL , NULL ,
110- ' C' , NULL , ' D' , NULL , ' G' , ' I' , NULL , NULL , NULL };
109+ auto preorder = std::vector<char >{' H' , ' B' , ' F' , ' \0 ' , ' \0 ' , ' E' , ' A' , ' \0 ' , ' \0 ' , ' \0 ' ,
110+ ' C' , ' \0 ' , ' D' , ' \0 ' , ' G' , ' I' , ' \0 ' , ' \0 ' , ' \0 ' };
111111
112112 auto root = ConstructBinarySearchTree::ConstructTreeFromMarkerPreorder (preorder);
113113 auto tree = BinarySearchTree::Tree<char >{};
114114 auto result = std::vector<char >{};
115115 tree.PreorderTraversal (root, result);
116- preorder.erase (std::ranges::remove (preorder, NULL ).begin (), preorder.end ());
116+ preorder.erase (std::ranges::remove (preorder, ' \0 ' ).begin (), preorder.end ());
117117
118118 ASSERT_EQ (static_cast <int >(preorder.size ()), static_cast <int >(result.size ()))
119119 << " Vectors input and result are of unequal length" ;
0 commit comments