Skip to content

Commit

Permalink
fix(dependency): fix IWebGPUCoreDp->pollEvents type
Browse files Browse the repository at this point in the history
  • Loading branch information
yyc-git committed Sep 15, 2020
1 parent 7facf78 commit fc070bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let exec = () => {
->Result.mapSuccess(((window, swapChain)) => {
WebGPUCoreDpRunAPI.unsafeGet().swapChain.present(swapChain);

WebGPUCoreDpRunAPI.unsafeGet().window.pollEvents((), window);
WebGPUCoreDpRunAPI.unsafeGet().window.pollEvents(window);
})
->WonderBsMost.Most.just;
};
17 changes: 3 additions & 14 deletions test/run/cloud_picture/integration/endRenderCPJob_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,14 @@ let _ =
});
testPromise("poll events", () => {
let (window, swapChain) = _prepare();
let pollEventsStubData =
createEmptyStub(refJsObjToSandbox(sandbox^))
->SinonCPTool.createTwoArgsEmptyStubData;
let pollEvents = createEmptyStub(refJsObjToSandbox(sandbox^));

WebGPUDependencyTool.build(
~sandbox,
~pollEvents=pollEventsStubData->SinonCPTool.getDpFunc,
(),
)
WebGPUDependencyTool.build(~sandbox, ~pollEvents, ())
->WebGPUDependencyTool.set;

DirectorCPTool.initAndRender(
~handleSuccessFunc=
() => {
pollEventsStubData
->SinonCPTool.getStub
->expect
->SinonCPTool.toCalledWith(((), window))
},
() => {pollEvents->expect->SinonCPTool.toCalledWith([|window|])},
(),
);
});
Expand Down

0 comments on commit fc070bc

Please sign in to comment.