aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_indexedbheap_spec.lua
blob: a76f94cb331dbe18edef529d295383153e70d84d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local ibh = require"util.indexedbheap";
local h
setup(function ()
	h = ibh.create();
end)
describe("util.indexedbheap", function ()
	pending("item can be moved from end to top", function ()
		h:insert("a", 1);
		h:insert("b", 2);
		h:insert("c", 3);
		local id = h:insert("*", 10);
		h:reprioritize(id, 0);
		assert.same({ 0, "*", id }, { h:pop() });
	end)
end);