Mercurial > prosody-hg
comparison spec/util_smqueue_spec.lua @ 12778:6163c8b17ea9
util.smqueue: Improve tests
Result of mutation testing. One mutant remaining.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 19 Oct 2022 14:34:41 +0200 |
| parents | 4860da718e87 |
| children | 73903352de86 |
comparison
equal
deleted
inserted
replaced
| 12777:4d5549de27e6 | 12778: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 |
