Commit 61667b29 authored by jamesge's avatar jamesge

more accurate assertion

parent 9320f1c0
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment