5#ifndef FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_TEST_H_
6#define FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_TEST_H_
10#include "flutter/fml/macros.h"
11#include "flutter/testing/test_args.h"
12#include "flutter/testing/testing.h"
18#include "flutter/fml/platform/darwin/scoped_nsautorelease_pool.h"
24 public ::testing::TestWithParam<PlaygroundBackend> {
30 void SetUp()
override;
38 std::string asset_name)
const override;
47 bool ShouldKeepRendering()
const;
58#define INSTANTIATE_PLAYGROUND_SUITE(playground) \
59 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
61 INSTANTIATE_TEST_SUITE_P( \
63 ::testing::Values(PlaygroundBackend::kMetal, \
64 PlaygroundBackend::kOpenGLES, \
65 PlaygroundBackend::kVulkan), \
66 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
67 return PlaygroundBackendToString(info.param); \
70#define INSTANTIATE_METAL_PLAYGROUND_SUITE(playground) \
71 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
73 INSTANTIATE_TEST_SUITE_P( \
74 Play, playground, ::testing::Values(PlaygroundBackend::kMetal), \
75 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
76 return PlaygroundBackendToString(info.param); \
79#define INSTANTIATE_VULKAN_PLAYGROUND_SUITE(playground) \
80 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
82 INSTANTIATE_TEST_SUITE_P( \
83 Play, playground, ::testing::Values(PlaygroundBackend::kVulkan), \
84 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
85 return PlaygroundBackendToString(info.param); \
88#define INSTANTIATE_OPENGLES_PLAYGROUND_SUITE(playground) \
89 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
91 INSTANTIATE_TEST_SUITE_P( \
92 Play, playground, ::testing::Values(PlaygroundBackend::kOpenGLES), \
93 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
94 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