mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-03-11 05:19:13 +00:00
reduced usage of isLocal in favour of checking hoarder.downloadedEmojis
wrote tests to check that, Set checking is 1.5 to 2x faster
This commit is contained in:
@@ -140,4 +140,16 @@ struct PerformanceTests {
|
||||
let _ = hoarder.trie.search(prefix: term)
|
||||
}
|
||||
}
|
||||
|
||||
@Test func testIsLocal() async throws {
|
||||
for emoji in hoarder.emojis {
|
||||
let x = emoji.isLocal
|
||||
}
|
||||
}
|
||||
|
||||
@Test func testDownloadedEmojis() async throws {
|
||||
for emoji in hoarder.emojis {
|
||||
let x = hoarder.downloadedEmojis.contains(emoji.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user