Flutter Engine
 
Loading...
Searching...
No Matches
test_metal_surface_unittests.mm
Go to the documentation of this file.
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
8
9namespace flutter::testing {
10
11#ifdef SHELL_ENABLE_METAL
12
13TEST(TestMetalSurface, EmptySurfaceIsInvalid) {
15 GTEST_SKIP();
16 }
17
18 TestMetalContext metal_context = TestMetalContext();
19 auto surface = TestMetalSurface::Create(metal_context);
20 ASSERT_NE(surface, nullptr);
21 ASSERT_FALSE(surface->IsValid());
22}
23
24TEST(TestMetalSurface, CanCreateValidTestMetalSurface) {
26 GTEST_SKIP();
27 }
28
29 TestMetalContext metal_context = TestMetalContext();
30 auto surface = TestMetalSurface::Create(metal_context, DlISize(100, 100));
31 ASSERT_NE(surface, nullptr);
32 ASSERT_TRUE(surface->IsValid());
33 ASSERT_NE(surface->GetSurface(), nullptr);
34 ASSERT_NE(surface->GetGrContext(), nullptr);
35}
36
37#endif
38
39} // namespace flutter::testing
static std::unique_ptr< TestMetalSurface > Create(const TestMetalContext &test_metal_context, DlISize surface_size=DlISize())
VkSurfaceKHR surface
Definition main.cc:65
TEST(NativeAssetsManagerTest, NoAvailableAssets)
impeller::ISize32 DlISize