Adding unit tests for string traversal functions