This is an automated email from the ASF dual-hosted git repository. jamesge pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
commit 61667b29b7d944eae8702c0ddf330c4975894c25 Author: jamesge <[email protected]> AuthorDate: Mon Nov 30 21:32:26 2020 +0800 more accurate assertion --- test/baidu_thread_local_unittest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/baidu_thread_local_unittest.cpp b/test/baidu_thread_local_unittest.cpp index 7ffe0f5..01209b6 100644 --- a/test/baidu_thread_local_unittest.cpp +++ b/test/baidu_thread_local_unittest.cpp @@ -166,17 +166,17 @@ void fun2() { } void fun3(void* arg) { - get_oss() << "fun3(" << arg << ")" << std::endl; + get_oss() << "fun3(" << (uintptr_t)arg << ")" << std::endl; } void fun4(void* arg) { - get_oss() << "fun4(" << arg << ")" << std::endl; + get_oss() << "fun4(" << (uintptr_t)arg << ")" << std::endl; } static void check_result() { // Don't use gtest function since this function might be invoked when the main // thread quits, instances required by gtest functions are likely destroyed. - assert (get_oss().str() == "fun4(0)\nfun3(0x2)\nfun2\n"); + assert(get_oss().str() == "fun4(0)\nfun3(2)\nfun2\n"); } TEST_F(BaiduThreadLocalTest, call_order_and_cancel) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
