mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2026-02-06 17:59:48 +08:00
test...
This commit is contained in:
parent
64a0c1a5f2
commit
34ea7095d9
@ -140,7 +140,11 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* not virtual */ ~queue_base(void) {
|
/* not virtual */ ~queue_base(void) {
|
||||||
base_t::close(elems_);
|
if (!this->dismiss_ && (elems_ != nullptr)) {
|
||||||
|
shm::release(elems_, sizeof(Elems));
|
||||||
|
}
|
||||||
|
dismiss_ = true;
|
||||||
|
// base_t::close(elems_);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr elems_t * elems() const noexcept {
|
constexpr elems_t * elems() const noexcept {
|
||||||
|
|||||||
@ -338,7 +338,6 @@ void Unit::test_route() {
|
|||||||
ipc::route cc { "my-ipc-route" };
|
ipc::route cc { "my-ipc-route" };
|
||||||
for (std::size_t i = 0; i < datas.size(); ++i) {
|
for (std::size_t i = 0; i < datas.size(); ++i) {
|
||||||
ipc::buff_t dd = cc.recv();
|
ipc::buff_t dd = cc.recv();
|
||||||
std::cout << "recv: " << (char*)dd.data() << std::endl;
|
|
||||||
QCOMPARE(dd.size(), std::strlen(datas[i]) + 1);
|
QCOMPARE(dd.size(), std::strlen(datas[i]) + 1);
|
||||||
QVERIFY(std::memcmp(dd.data(), datas[i], dd.size()) == 0);
|
QVERIFY(std::memcmp(dd.data(), datas[i], dd.size()) == 0);
|
||||||
}
|
}
|
||||||
@ -358,7 +357,7 @@ void Unit::test_route() {
|
|||||||
t1.join();
|
t1.join();
|
||||||
t2.join();
|
t2.join();
|
||||||
|
|
||||||
// test_prod_cons<ipc::route, 1, 1>();
|
test_prod_cons<ipc::route, 1, 1>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::test_route_rtt() {
|
void Unit::test_route_rtt() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user