Software /
code /
prosody
Comparison
spec/util_smqueue_spec.lua @ 12802:4a8740e01813
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 12 Dec 2022 07:10:54 +0100 |
parent | 12778:6163c8b17ea9 |
comparison
equal
deleted
inserted
replaced
12801:ebd6b4d8bf04 | 12802:4a8740e01813 |
---|---|
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 |