Lines Matching refs:mQueue
39 delete mQueue; in TearDown()
44 mQueue = new (std::nothrow) MessageQueueSync(kNumElementsInQueue); in SetUp()
45 ASSERT_NE(nullptr, mQueue); in SetUp()
46 ASSERT_TRUE(mQueue->isValid()); in SetUp()
47 mNumMessagesMax = mQueue->getQuantumCount(); in SetUp()
51 MessageQueueSync* mQueue = nullptr; member in SynchronizedReadWrites
58 delete mQueue; in TearDown()
63 mQueue = new (std::nothrow) MessageQueueUnsync(kNumElementsInQueue); in SetUp()
64 ASSERT_NE(nullptr, mQueue); in SetUp()
65 ASSERT_TRUE(mQueue->isValid()); in SetUp()
66 mNumMessagesMax = mQueue->getQuantumCount(); in SetUp()
70 MessageQueueUnsync* mQueue = nullptr; member in UnsynchronizedWrite
77 delete mQueue; in TearDown()
81 mQueue = new (std::nothrow) MessageQueueSync(kNumElementsInQueue); in SetUp()
82 ASSERT_NE(nullptr, mQueue); in SetUp()
83 ASSERT_TRUE(mQueue->isValid()); in SetUp()
84 mNumMessagesMax = mQueue->getQuantumCount(); in SetUp()
92 MessageQueueSync* mQueue; member in BlockingReadWrites
100 delete mQueue; in TearDown()
104 mQueue = new (std::nothrow) MessageQueueSync(kNumElementsInQueue, in SetUp()
106 ASSERT_NE(nullptr, mQueue); in SetUp()
107 ASSERT_TRUE(mQueue->isValid()); in SetUp()
108 mNumMessagesMax = mQueue->getQuantumCount(); in SetUp()
110 auto evFlagWordPtr = mQueue->getEventFlagWord(); in SetUp()
118 MessageQueueSync* mQueue; member in QueueSizeOdd
225 std::thread Reader(ReaderThreadBlocking, mQueue, &mFw); in TEST_F()
233 ASSERT_TRUE(mQueue->write(data, dataLen)); in TEST_F()
262 std::thread Reader(ReaderThreadBlocking2, mQueue, &mFw); in TEST_F()
263 bool ret = mQueue->writeBlocking(data, in TEST_F()
308 bool ret = mQueue->writeBlocking(data, in TEST_F()
326 ASSERT_TRUE(mQueue->write(data, dataLen)); in TEST_F()
328 ASSERT_TRUE(mQueue->read(readData, dataLen)); in TEST_F()
344 ASSERT_TRUE(mQueue->beginWrite(dataLen, &tx)); in TEST_F()
348 ASSERT_TRUE(mQueue->commitWrite(dataLen)); in TEST_F()
352 ASSERT_TRUE(mQueue->beginRead(dataLen, &tx)); in TEST_F()
356 ASSERT_TRUE(mQueue->commitRead(dataLen)); in TEST_F()
372 ASSERT_TRUE(mQueue->beginWrite(dataLen, &tx)); in TEST_F()
383 ASSERT_TRUE(mQueue->commitWrite(dataLen)); in TEST_F()
387 ASSERT_TRUE(mQueue->beginRead(dataLen, &tx)); in TEST_F()
399 ASSERT_TRUE(mQueue->commitRead(dataLen)); in TEST_F()
408 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
412 ASSERT_FALSE(mQueue->read(readData, dataLen)); in TEST_F()
420 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
425 ASSERT_FALSE(mQueue->beginRead(dataLen, &tx)); in TEST_F()
439 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
443 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
444 ASSERT_EQ(0UL, mQueue->availableToWrite()); in TEST_F()
445 ASSERT_FALSE(mQueue->write(&data[0], 1)); in TEST_F()
448 ASSERT_TRUE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
457 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
461 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
462 ASSERT_EQ(0UL, mQueue->availableToWrite()); in TEST_F()
465 ASSERT_FALSE(mQueue->beginWrite(1, &tx)); in TEST_F()
482 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
484 ASSERT_TRUE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
494 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
500 ASSERT_FALSE(mQueue->write(&data[0], dataLen)); in TEST_F()
502 ASSERT_FALSE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
504 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
515 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
516 ASSERT_FALSE(mQueue->write(&data[0], 1)); in TEST_F()
518 ASSERT_TRUE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
528 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
533 ASSERT_FALSE(mQueue->beginWrite(dataLen, &tx)); in TEST_F()
553 ASSERT_TRUE(mQueue->write(data, dataLen)); in TEST_F()
556 ASSERT_TRUE(mQueue->read(readData + i * chunkSize, chunkSize)); in TEST_F()
573 ASSERT_TRUE(mQueue->write(data + i * chunkSize, chunkSize)); in TEST_F()
576 ASSERT_TRUE(mQueue->read(readData, dataLen)); in TEST_F()
591 ASSERT_TRUE(mQueue->write(&data[0], numMessages)); in TEST_F()
592 ASSERT_TRUE(mQueue->read(&readData[0], numMessages)); in TEST_F()
593 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
594 ASSERT_TRUE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
611 ASSERT_TRUE(mQueue->write(&data[0], dataLen)); in TEST_F()
612 ASSERT_TRUE(mQueue->read(&readData[0], dataLen)); in TEST_F()
618 ASSERT_TRUE(mQueue->beginWrite(mNumMessagesMax, &tx)); in TEST_F()
627 ASSERT_TRUE(mQueue->commitWrite(mNumMessagesMax)); in TEST_F()
629 ASSERT_TRUE(mQueue->beginRead(mNumMessagesMax, &tx)); in TEST_F()
637 ASSERT_TRUE(mQueue->commitRead(mNumMessagesMax)); in TEST_F()
651 ASSERT_TRUE(mQueue->write(data, dataLen)); in TEST_F()
653 ASSERT_TRUE(mQueue->read(readData, dataLen)); in TEST_F()
661 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
665 ASSERT_FALSE(mQueue->read(readData, dataLen)); in TEST_F()
673 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
677 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
678 ASSERT_EQ(0UL, mQueue->availableToWrite()); in TEST_F()
679 ASSERT_TRUE(mQueue->write(&data[0], 1)); in TEST_F()
682 ASSERT_FALSE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
691 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
693 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
696 ASSERT_TRUE(mQueue->beginWrite(1, &tx)); in TEST_F()
702 ASSERT_TRUE(mQueue->commitWrite(1)); in TEST_F()
705 ASSERT_FALSE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
716 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
718 ASSERT_TRUE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
728 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
733 ASSERT_FALSE(mQueue->write(&data[0], dataLen)); in TEST_F()
735 ASSERT_FALSE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
737 ASSERT_EQ(0UL, mQueue->availableToRead()); in TEST_F()
748 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
749 ASSERT_TRUE(mQueue->write(&data[0], 1)); in TEST_F()
751 ASSERT_FALSE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()
764 ASSERT_TRUE(mQueue->write(data, dataLen)); in TEST_F()
767 ASSERT_TRUE(mQueue->read(readData + i * chunkSize, chunkSize)); in TEST_F()
784 ASSERT_TRUE(mQueue->write(data + i * chunkSize, chunkSize)); in TEST_F()
788 ASSERT_TRUE(mQueue->read(readData, dataLen)); in TEST_F()
804 ASSERT_TRUE(mQueue->write(&data[0], numMessages)); in TEST_F()
805 ASSERT_TRUE(mQueue->read(&readData[0], numMessages)); in TEST_F()
806 ASSERT_TRUE(mQueue->write(&data[0], mNumMessagesMax)); in TEST_F()
807 ASSERT_TRUE(mQueue->read(&readData[0], mNumMessagesMax)); in TEST_F()