mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
Make the templates of mocking api flexible
Rename mock_webgpu to mock_api and define the function "GetProcTableAndDevice" to "GetProcTable" for removing the special arguments "WGPUDevice* device" that can be got with "GetNewDevice()". BUG=dawn:1201 Change-Id: I4fc47e4497ba4b6d280cc8af8605f1d93f43497e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72761 Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Junwei Fu <junwei.fu@intel.com>
This commit is contained in:
@@ -38,8 +38,8 @@ server::MemoryTransferService* WireTest::GetServerMemoryTransferService() {
|
||||
|
||||
void WireTest::SetUp() {
|
||||
DawnProcTable mockProcs;
|
||||
WGPUDevice mockDevice;
|
||||
api.GetProcTableAndDevice(&mockProcs, &mockDevice);
|
||||
api.GetProcTable(&mockProcs);
|
||||
WGPUDevice mockDevice = api.GetNewDevice();
|
||||
|
||||
// This SetCallback call cannot be ignored because it is done as soon as we start the server
|
||||
EXPECT_CALL(api, OnDeviceSetUncapturedErrorCallback(_, _, _)).Times(Exactly(1));
|
||||
|
||||
Reference in New Issue
Block a user