2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2017 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2017-09-19 11:48:47 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "googletest.h"
|
|
|
|
|
|
|
|
|
|
class MockMutex
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
using MutexType = MockMutex;
|
|
|
|
|
|
|
|
|
|
MOCK_METHOD0(lock, void ());
|
|
|
|
|
MOCK_METHOD0(unlock, void ());
|
2017-10-05 17:36:44 +02:00
|
|
|
MOCK_METHOD0(lock_shared, void ());
|
|
|
|
|
MOCK_METHOD0(unlock_shared, void ());
|
2017-09-19 11:48:47 +02:00
|
|
|
};
|
2019-08-15 14:26:35 +02:00
|
|
|
|
2021-06-14 11:47:51 +02:00
|
|
|
class MockMutexNonLocking
|
2019-08-15 14:26:35 +02:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
using MutexType = MockMutexNonLocking;
|
|
|
|
|
|
|
|
|
|
MOCK_METHOD0(lock, void());
|
|
|
|
|
MOCK_METHOD0(unlock, void());
|
|
|
|
|
MOCK_METHOD0(lock_shared, void());
|
|
|
|
|
MOCK_METHOD0(unlock_shared, void());
|
|
|
|
|
};
|