spec/util_smqueue_spec.lua
changeset 12782 6163c8b17ea9
parent 12062 4860da718e87
equal deleted inserted replaced
12781:4d5549de27e6 12782:6163c8b17ea9
     3 	local smqueue
     3 	local smqueue
     4 	setup(function() smqueue = require "util.smqueue"; end)
     4 	setup(function() smqueue = require "util.smqueue"; end)
     5 
     5 
     6 	describe("#new()", function()
     6 	describe("#new()", function()
     7 		it("should work", function()
     7 		it("should work", function()
       
     8 			assert.has_error(function () smqueue.new(-1) end);
       
     9 			assert.has_error(function () smqueue.new(0) end);
       
    10 			assert.not_has_error(function () smqueue.new(1) end);
     8 			local q = smqueue.new(10);
    11 			local q = smqueue.new(10);
     9 			assert.truthy(q);
    12 			assert.truthy(q);
    10 		end)
    13 		end)
    11 	end)
    14 	end)
    12 
    15