Skip to content

Commit

Permalink
JSON:ThreadId naming changes updated in Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HaseenaSainul committed Sep 9, 2024
1 parent e7e7aeb commit 25b4cdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Tests/unit/core/test_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace Core {
ThreadClass(const ThreadClass&) = delete;
ThreadClass& operator=(const ThreadClass&) = delete;

ThreadClass(volatile bool& threadDone, std::mutex& mutex, std::condition_variable& cv, ::ThreadId parentTid)
ThreadClass(volatile bool& threadDone, std::mutex& mutex, std::condition_variable& cv, ::thread_id parentTid)
: ::Thunder::Core::Thread(::Thunder::Core::Thread::DefaultStackSize(), _T("Test"))
, _done(threadDone)
, _threadMutex(mutex)
Expand Down Expand Up @@ -66,7 +66,7 @@ namespace Core {
volatile bool& _done;
std::mutex& _threadMutex;
std::condition_variable& _threadCV;
::ThreadId _parentTid;
::thread_id _parentTid;
};

class Job : public ::Thunder::Core::IDispatch {
Expand Down Expand Up @@ -97,7 +97,7 @@ namespace Core {

private:
static bool _threadDone;
static ::ThreadId _parentTPid;
static ::thread_id _parentTPid;

public:
static std::mutex _mutex;
Expand All @@ -107,11 +107,11 @@ namespace Core {
bool Job::_threadDone = false;
std::mutex Job::_mutex;
std::condition_variable Job::_cv;
::ThreadId Job::_parentTPid = ::Thunder::Core::Thread::ThreadId();
::thread_id Job::_parentTPid = ::Thunder::Core::Thread::ThreadId();

TEST(Core_Thread, DISABLED_SimpleThread)
{
::ThreadId parentTid = ::Thunder::Core::Thread::ThreadId();
::thread_id parentTid = ::Thunder::Core::Thread::ThreadId();
volatile bool threadDone = false;
std::mutex mutex;
std::condition_variable cv;
Expand Down
4 changes: 2 additions & 2 deletions Tests/unit/core/test_workerpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ namespace Core {
const uint8_t MaxSize = 15;
bool isPoolId = false;
char id[MaxSize];
sprintf(id, "%x", static_cast<::ThreadId>(pthread_self()));
sprintf(id, "%x", static_cast<::thread_id>(pthread_self()));
for (uint8_t index = 0; index < _threadsCount + 2; index++) {
char workerId[MaxSize];
sprintf(workerId, "%x", static_cast<::ThreadId>(::Thunder::Core::IWorkerPool::Instance().Id(index)));
sprintf(workerId, "%x", static_cast<::thread_id>(::Thunder::Core::IWorkerPool::Instance().Id(index)));

if (strcpy(workerId, id)) {
isPoolId = true;
Expand Down

0 comments on commit 25b4cdd

Please sign in to comment.