1234567891011121314151617181920212223242526 |
- #include "IteratorDemo.h"
- void testRingQueueManualMutex()
- {
- RingQueueManualMutex<int> queue(5, -1);
- queue.push(1);
- queue.push(2);
- queue.push(3);
- queue.push(4);
- queue.push(5);
- auto old = queue.push(6); // This should remove 1
- SPDLOG_INFO("Old value removed: {}", old);
- // for(auto it = queue.begin(); it != queue.end(); ++it)
- // {
- // SPDLOG_INFO("Value: {}", *it);
- // }
- for(auto it : queue)
- {
- SPDLOG_INFO("Value: {}", it);
- }
- SPDLOG_INFO("RingQueueManualMutex 测试完成");
- }
|