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> {
32 void SetUp()
override;
40 std::string asset_name)
const override;
43 const char* asset_name)
const;
63 bool ShouldKeepRendering()
const override;
79#define INSTANTIATE_PLAYGROUND_SUITE(playground) \
80 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
82 INSTANTIATE_TEST_SUITE_P( \
85 PlaygroundBackend::kMetal, PlaygroundBackend::kMetalSDF, \
86 PlaygroundBackend::kOpenGLES, PlaygroundBackend::kOpenGLESSDF, \
87 PlaygroundBackend::kVulkan), \
88 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
89 return PlaygroundBackendToString(info.param); \
92#define INSTANTIATE_METAL_PLAYGROUND_SUITE(playground) \
93 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
95 INSTANTIATE_TEST_SUITE_P( \
96 Play, playground, ::testing::Values(PlaygroundBackend::kMetal), \
97 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
98 return PlaygroundBackendToString(info.param); \
101#define INSTANTIATE_VULKAN_PLAYGROUND_SUITE(playground) \
102 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
104 INSTANTIATE_TEST_SUITE_P( \
105 Play, playground, ::testing::Values(PlaygroundBackend::kVulkan), \
106 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
107 return PlaygroundBackendToString(info.param); \
110#define INSTANTIATE_OPENGLES_PLAYGROUND_SUITE(playground) \
111 [[maybe_unused]] const char* kYouInstantiated##playground##MultipleTimes = \
113 INSTANTIATE_TEST_SUITE_P( \
114 Play, playground, ::testing::Values(PlaygroundBackend::kOpenGLES), \
115 [](const ::testing::TestParamInfo<PlaygroundTest::ParamType>& info) { \
116 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()
static void SetupTestEnvironment()
testing::GoldenDigestManager * GetGoldenDigestManager() const override
virtual bool IsGoldenTestSuite() const
This method is overridden on a test suite basis and establishes whether a given set of tests is inten...
bool IsGoldenTestSuite() const override
This method is overridden on a test suite basis and establishes whether a given set of tests is inten...