Skip to content

Commit

Permalink
ThreadBack: simplify entryFnRet_toBackFn
Browse files Browse the repository at this point in the history
  • Loading branch information
fchn289 committed Jul 10, 2023
1 parent cb71023 commit ce9c368
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ut/thread_back/ThreadBackTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ TEST_F(ThreadBackTest, GOLD_backFn_in_mainThread)
}
TEST_F(ThreadBackTest, entryFnRet_toBackFn)
{
const size_t maxThread = 2000; // req: multi & performance(2000 may timeout wait_for(0s))
const size_t maxThread = 2; // req: test entryFn ret true / false
for (size_t idxThread = 0; idxThread < maxThread; ++idxThread)
{
ThreadBack::newThread(
// MT_ThreadEntryFN
[idxThread]() -> bool
{
return idxThread % 5 != 0; // ret true / false
return idxThread % 2 != 0; // ret true / false
},
// ThreadBackFN
[idxThread](bool aRet)
{
EXPECT_EQ(idxThread % 5 != 0, aRet); // req: check true & false
EXPECT_EQ(idxThread % 2 != 0, aRet); // req: check true & false
}
);
}
Expand Down

0 comments on commit ce9c368

Please sign in to comment.