mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(queue): add TSPriorityQueue and TSTimerPriority
This commit is contained in:
parent
2200aab4c2
commit
2e82693829
9 changed files with 264 additions and 0 deletions
16
test/Queue.cpp
Normal file
16
test/Queue.cpp
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue