Skip to content

Commit

Permalink
Detect compilation for gtest
Browse files Browse the repository at this point in the history
  • Loading branch information
GabTux committed Mar 27, 2024
1 parent 9ebd7ed commit 709fb08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/ppqsort/parallel/cpp/task_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ namespace ppqsort::impl::cpp {
}

private:
#ifdef GTEST_FLAG
FRIEND_TEST(testThreadPool, PushBusyQueues);
FRIEND_TEST(testThreadPool, PopBusyQueues);
#endif

std::vector<taskType> stack_;
std::mutex mutex_;
Expand Down
3 changes: 2 additions & 1 deletion include/ppqsort/parallel/cpp/thread_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ namespace ppqsort::impl::cpp {
}

private:
#ifdef GTEST_FLAG
FRIEND_TEST(testThreadPool, PushBusyQueues);
FRIEND_TEST(testThreadPool, PopBusyQueues);

#endif

bool get_next_task(const unsigned int id) {
bool found = false;
Expand Down

0 comments on commit 709fb08

Please sign in to comment.