From 056f71f24cefaf88f2a93714c6678c03ed5f1e0e Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期五, 02 七月 2021 16:54:33 +0800
Subject: [PATCH] fixed to adapt gcc-5.4 & glibc-2.25
---
utest/simple_tests.cpp | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/utest/simple_tests.cpp b/utest/simple_tests.cpp
index 87933ac..c7f277c 100644
--- a/utest/simple_tests.cpp
+++ b/utest/simple_tests.cpp
@@ -29,25 +29,11 @@
SharedMemory shm(shm_name, 1024 * 1024 * 10);
auto Avail = [&]() { return shm.get_free_memory(); };
- offset_ptr<const void> p;
- BOOST_CHECK(!p);
- BOOST_CHECK(p.get() == 0);
- p = 0;
- BOOST_CHECK(!p);
- BOOST_CHECK(p.get() == 0);
- const char *str = "basic";
- p = str;
- BOOST_CHECK(p);
- BOOST_CHECK(p.get() == str);
- p = 0;
- BOOST_CHECK(!p);
- BOOST_CHECK(p.get() == 0);
-
auto init_avail = Avail();
auto BasicTest = [&](int tid, int nloop) {
auto Code = [&](int id) {
- typedef ShmObject<s1000> Int;
+ typedef NamedShmObject<s1000> Int;
std::string name = std::to_string(id);
auto a0 = Avail();
Int i1(shm, name, eOpenOrCreate);
--
Gitblit v1.8.0