updating the ui

restTrie function
build trie and searching trie tests
This commit is contained in:
neon443
2025-11-04 10:54:35 +00:00
parent 63a979d796
commit ea96fbbf5a
3 changed files with 45 additions and 18 deletions

View File

@@ -127,4 +127,17 @@ struct PerformanceTests {
try! await fakeDownloadAllStickers()
await hoarder.deleteAllStickers()
}
@Test func buildTrie() async throws {
hoarder.resetTrie()
hoarder.buildTrie()
}
@Test func testSearching() async throws {
try! await buildTrie()
let terms = ["h", "j", "s", "2", "heavysob", "hs", "asjasdklf", "a", "w", "t", "h", "z", "b", "c", "m", "n"]
for term in terms {
let _ = hoarder.trie.search(prefix: term)
}
}
}