aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_cache_spec.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.cache: Pass cache itself to eviction callbackKim Alvefur2023-06-301-2/+1
| | | | | | | Simplifies access to the cache without moving code around a lot given the currently common pattern of local some_cache = cache.new(size, function(k,v) end)
* util.cache: Keep eviction candidate if callback resized to make roomKim Alvefur2023-06-301-0/+21
| | | | | Previously either the old or the new values would be rejected, even if the cache was resized to allow more items.
* util.cache: Add some missing test casesMatthew Wild2022-10-131-0/+52
| | | | Found via mutation testing.
* tests: Remove special-casing of Lua 5.1Kim Alvefur2022-07-021-1/+1
| | | | Part of #1600
* util.cache: Add test for :table (fails on Lua 5.1)Kim Alvefur2021-02-051-0/+24
|
* util.cache tests: Add annotation to fix [luacheck] warningMatthew Wild2018-09-171-1/+1
|
* Port tests to the `busted` test runnerWaqas Hussain2017-09-151-0/+316