feat(queue): add TSPriorityQueue and TSTimerPriority

This commit is contained in:
fallenoak 2020-12-06 23:28:15 -06:00
parent 2200aab4c2
commit 2e82693829
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
9 changed files with 264 additions and 0 deletions

16
test/Queue.cpp Normal file
View file

@ -0,0 +1,16 @@
#include "storm/Queue.hpp"
#include "test/Test.hpp"
struct TestPriority : TSTimerPriority<uint32_t> {
};
struct TestElement {
TestPriority m_priority;
};
TEST_CASE("TSPriorityQueue", "[queue]") {
SECTION("constructs correctly") {
auto queue = TSPriorityQueue<TestElement>(offsetof(TestElement, m_priority));
REQUIRE(queue.Dequeue() == nullptr);
}
}