mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-20 13:11:34 +08:00
Reorganization directory structure [2/n]
Change-Id: I47962d17d755e80dcd9476e1ed75560f433f6115
This commit is contained in:

committed by
Jaroslaw Chodor

parent
d015d3633f
commit
e8852a68c4
31
opencl/test/unit_test/helpers/queue_helpers_tests.cpp
Normal file
31
opencl/test/unit_test/helpers/queue_helpers_tests.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/helpers/queue_helpers.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "mocks/mock_command_queue.h"
|
||||
#include "mocks/mock_context.h"
|
||||
#include "mocks/mock_event.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
TEST(ReleaseQueueTest, givenCommandQueueWithoutVirtualEventWhenReleaseQueueIsCalledThenCmdQInternalRefCountIsNotDecremented) {
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
MockCommandQueue *cmdQ = new MockCommandQueue;
|
||||
EXPECT_EQ(1, cmdQ->getRefInternalCount());
|
||||
|
||||
EXPECT_EQ(1, cmdQ->getRefInternalCount());
|
||||
|
||||
cmdQ->incRefInternal();
|
||||
EXPECT_EQ(2, cmdQ->getRefInternalCount());
|
||||
|
||||
releaseQueue<CommandQueue>(cmdQ, retVal);
|
||||
|
||||
EXPECT_EQ(1, cmdQ->getRefInternalCount());
|
||||
cmdQ->decRefInternal();
|
||||
}
|
Reference in New Issue
Block a user