5#ifndef FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_TEST_H_
6#define FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_TEST_H_
10#include "flutter/testing/test_args.h"
11#include "flutter/testing/testing.h"
16#include "flutter/fml/platform/darwin/scoped_nsautorelease_pool.h"
22 public ::testing::TestWithParam<PlaygroundBackend> {
28 void SetUp()
override;
36 std::string asset_name)
const override;
45 bool ShouldKeepRendering()
const;
56#define INSTANTIATE_PLAYGROUND_SUITE(playground) \
57 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
59 INSTANTIATE_TEST_SUITE_P( \
61 ::testing::Values(PlaygroundBackend::kMetal, \
62 PlaygroundBackend::kOpenGLES, \
63 PlaygroundBackend::kVulkan), \
64 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
65 return PlaygroundBackendToString(info.param); \
68#define INSTANTIATE_METAL_PLAYGROUND_SUITE(playground) \
69 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
71 INSTANTIATE_TEST_SUITE_P( \
72 Play, playground, ::testing::Values(PlaygroundBackend::kMetal), \
73 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
74 return PlaygroundBackendToString(info.param); \
77#define INSTANTIATE_VULKAN_PLAYGROUND_SUITE(playground) \
78 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
80 INSTANTIATE_TEST_SUITE_P( \
81 Play, playground, ::testing::Values(PlaygroundBackend::kVulkan), \
82 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
83 return PlaygroundBackendToString(info.param); \
86#define INSTANTIATE_OPENGLES_PLAYGROUND_SUITE(playground) \
87 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
89 INSTANTIATE_TEST_SUITE_P( \
90 Play, playground, ::testing::Values(PlaygroundBackend::kOpenGLES), \
91 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
92 return PlaygroundBackendToString(info.param); \
std::unique_ptr< fml::Mapping > OpenAssetAsMapping(std::string asset_name) const override
std::string GetWindowTitle() const override
PlaygroundBackend GetBackend() const
virtual ~PlaygroundTest()
RuntimeStage::Map OpenAssetAsRuntimeStage(const char *asset_name) const
std::map< RuntimeStageBackend, std::shared_ptr< RuntimeStage > > Map