5#ifndef FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_TEST_H_
6#define FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_TEST_H_
15#include "third_party/abseil-cpp/absl/status/statusor.h"
24 public ::testing::TestWithParam<PlaygroundBackend> {
30 void SetUp()
override;
38 std::string asset_name)
const override;
41 const char* asset_name)
const;
48 bool ShouldKeepRendering()
const override;
59#define INSTANTIATE_PLAYGROUND_SUITE(playground) \
60 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
62 INSTANTIATE_TEST_SUITE_P( \
65 PlaygroundBackend::kMetal, PlaygroundBackend::kMetalSDF, \
66 PlaygroundBackend::kOpenGLES, PlaygroundBackend::kVulkan), \
67 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
68 return PlaygroundBackendToString(info.param); \
71#define INSTANTIATE_METAL_PLAYGROUND_SUITE(playground) \
72 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
74 INSTANTIATE_TEST_SUITE_P( \
75 Play, playground, ::testing::Values(PlaygroundBackend::kMetal), \
76 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
77 return PlaygroundBackendToString(info.param); \
80#define INSTANTIATE_VULKAN_PLAYGROUND_SUITE(playground) \
81 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
83 INSTANTIATE_TEST_SUITE_P( \
84 Play, playground, ::testing::Values(PlaygroundBackend::kVulkan), \
85 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
86 return PlaygroundBackendToString(info.param); \
89#define INSTANTIATE_OPENGLES_PLAYGROUND_SUITE(playground) \
90 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
92 INSTANTIATE_TEST_SUITE_P( \
93 Play, playground, ::testing::Values(PlaygroundBackend::kOpenGLES), \
94 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
95 return PlaygroundBackendToString(info.param); \
std::unique_ptr< fml::Mapping > OpenAssetAsMapping(std::string asset_name) const override
std::string GetWindowTitle() const override
absl::StatusOr< RuntimeStage::Map > OpenAssetAsRuntimeStage(const char *asset_name) const
PlaygroundBackend GetBackend() const
virtual ~PlaygroundTest()