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::kOpenGLESSDF, \
67 PlaygroundBackend::kVulkan), \
68 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
69 return PlaygroundBackendToString(info.param); \
72#define INSTANTIATE_METAL_PLAYGROUND_SUITE(playground) \
73 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
75 INSTANTIATE_TEST_SUITE_P( \
76 Play, playground, ::testing::Values(PlaygroundBackend::kMetal), \
77 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
78 return PlaygroundBackendToString(info.param); \
81#define INSTANTIATE_VULKAN_PLAYGROUND_SUITE(playground) \
82 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
84 INSTANTIATE_TEST_SUITE_P( \
85 Play, playground, ::testing::Values(PlaygroundBackend::kVulkan), \
86 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
87 return PlaygroundBackendToString(info.param); \
90#define INSTANTIATE_OPENGLES_PLAYGROUND_SUITE(playground) \
91 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
93 INSTANTIATE_TEST_SUITE_P( \
94 Play, playground, ::testing::Values(PlaygroundBackend::kOpenGLES), \
95 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
96 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()