|
| 1 | +// Copyright 2013 The Flutter Authors. All rights reserved. |
| 2 | +// Use of this source code is governed by a BSD-style license that can be |
| 3 | +// found in the LICENSE file. |
| 4 | + |
| 5 | +#include "flutter/testing/testing.h" |
| 6 | +#include "impeller/renderer/capabilities.h" |
| 7 | + |
| 8 | +#include "gtest/gtest.h" |
| 9 | + |
| 10 | +namespace impeller { |
| 11 | +namespace testing { |
| 12 | + |
| 13 | +#define CAPABILITY_TEST(name, default_value) \ |
| 14 | + TEST(CapabilitiesTest, name) { \ |
| 15 | + auto defaults = CapabilitiesBuilder().Build(); \ |
| 16 | + ASSERT_EQ(defaults->name(), default_value); \ |
| 17 | + auto opposite = CapabilitiesBuilder().Set##name(!default_value).Build(); \ |
| 18 | + ASSERT_EQ(opposite->name(), !default_value); \ |
| 19 | + } |
| 20 | + |
| 21 | +CAPABILITY_TEST(HasThreadingRestrictions, false); |
| 22 | +CAPABILITY_TEST(SupportsOffscreenMSAA, false); |
| 23 | +CAPABILITY_TEST(SupportsSSBO, false); |
| 24 | +CAPABILITY_TEST(SupportsBufferToTextureBlits, false); |
| 25 | +CAPABILITY_TEST(SupportsTextureToTextureBlits, false); |
| 26 | +CAPABILITY_TEST(SupportsFramebufferFetch, false); |
| 27 | +CAPABILITY_TEST(SupportsCompute, false); |
| 28 | +CAPABILITY_TEST(SupportsComputeSubgroups, false); |
| 29 | +CAPABILITY_TEST(SupportsReadFromOnscreenTexture, false); |
| 30 | +CAPABILITY_TEST(SupportsReadFromResolve, false); |
| 31 | +CAPABILITY_TEST(SupportsDecalTileMode, false); |
| 32 | + |
| 33 | +} // namespace testing |
| 34 | +} // namespace impeller |
0 commit comments