util.smqueue: Improve tests
authorKim Alvefur <zash@zash.se>
Wed, 19 Oct 2022 14:34:41 +0200
changeset 12782 6163c8b17ea9
parent 12781 4d5549de27e6
child 12784 2c0c1b18a02b
util.smqueue: Improve tests Result of mutation testing. One mutant remaining.
spec/util_smqueue_spec.lua
--- a/spec/util_smqueue_spec.lua	Wed Oct 19 14:21:13 2022 +0200
+++ b/spec/util_smqueue_spec.lua	Wed Oct 19 14:34:41 2022 +0200
@@ -5,6 +5,9 @@
 
 	describe("#new()", function()
 		it("should work", function()
+			assert.has_error(function () smqueue.new(-1) end);
+			assert.has_error(function () smqueue.new(0) end);
+			assert.not_has_error(function () smqueue.new(1) end);
 			local q = smqueue.new(10);
 			assert.truthy(q);
 		end)