mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-31 17:35:50 +00:00
- Plumbs all descriptors through so that the objects act much more like a real implementation. - Lots of changes to DestroyObjectTests.cpp to update usages and test through the APIs when applicable. - Put in defaults for the mock device and make it as easy to use as possible. Change-Id: I85b243a18ec1872aff0172549aec0f599967ea0e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119821 Reviewed-by: Austin Eng <enga@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Loko Kung <lokokung@google.com>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
// Copyright 2021 The Dawn Authors
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#ifndef SRC_DAWN_TESTS_UNITTESTS_NATIVE_MOCKS_SAMPLERMOCK_H_
|
|
#define SRC_DAWN_TESTS_UNITTESTS_NATIVE_MOCKS_SAMPLERMOCK_H_
|
|
|
|
#include "gmock/gmock.h"
|
|
|
|
#include "dawn/native/Sampler.h"
|
|
#include "dawn/tests/unittests/native/mocks/DeviceMock.h"
|
|
|
|
namespace dawn::native {
|
|
|
|
class SamplerMock : public SamplerBase {
|
|
public:
|
|
SamplerMock(DeviceMock* device, const SamplerDescriptor* descriptor);
|
|
~SamplerMock() override;
|
|
|
|
MOCK_METHOD(void, DestroyImpl, (), (override));
|
|
};
|
|
|
|
} // namespace dawn::native
|
|
|
|
#endif // SRC_DAWN_TESTS_UNITTESTS_NATIVE_MOCKS_SAMPLERMOCK_H_
|