mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-15 08:06:19 +00:00
Guards explicit device.destroy() until tested.
Bug: dawn:628 Change-Id: Ib6a6be0e5467d3cdd6432834d6f9d5c2000b18be Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/76340 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Loko Kung <lokokung@google.com>
This commit is contained in:
@@ -19,6 +19,10 @@
|
||||
#include "utils/ComboRenderPipelineDescriptor.h"
|
||||
#include "utils/WGPUHelpers.h"
|
||||
|
||||
namespace {
|
||||
using testing::HasSubstr;
|
||||
} // anonymous namespace
|
||||
|
||||
class UnsafeAPIValidationTest : public ValidationTest {
|
||||
protected:
|
||||
WGPUDevice CreateTestDevice() override {
|
||||
@@ -49,6 +53,12 @@ TEST_F(UnsafeAPIValidationTest, 1DTextures) {
|
||||
ASSERT_DEVICE_ERROR(device.CreateTexture(&desc));
|
||||
}
|
||||
|
||||
// Check that explicit user device.destroy() is disallowed as part of unsafe APIs.
|
||||
// TODO(crbug.com/dawn/628) Remove when CTS testing is in place and passing.
|
||||
TEST_F(UnsafeAPIValidationTest, ExplicitDeviceDestroy) {
|
||||
ASSERT_DEVICE_ERROR(device.Destroy(), HasSubstr("Explicit device.destroy() is disallowed"));
|
||||
}
|
||||
|
||||
// Check that pipeline overridable constants are disallowed as part of unsafe APIs.
|
||||
// TODO(dawn:1041) Remove when implementation for all backend is added
|
||||
TEST_F(UnsafeAPIValidationTest, PipelineOverridableConstants) {
|
||||
|
||||
Reference in New Issue
Block a user