7#include "flutter/fml/mapping.h"
8#include "flutter/testing/testing.h"
16 std::string p_string) {
17 auto string = std::make_shared<std::string>(std::move(p_string));
18 return std::make_shared<fml::NonOwnedMapping>(
19 reinterpret_cast<const uint8_t*
>(string->data()), string->size(),
20 [
string](
auto,
auto) {});
24 return std::string{
reinterpret_cast<const char*
>(mapping.
GetMapping()),
28TEST(ShaderArchiveTest, CanReadAndWriteBlobs) {
42 ASSERT_NE(mapping,
nullptr);
52 ASSERT_NE(hello_vtx,
nullptr);
virtual const uint8_t * GetMapping() const =0
virtual size_t GetSize() const =0
bool AddShader(ArchiveShaderType type, std::string name, std::shared_ptr< fml::Mapping > mapping)
std::shared_ptr< fml::Mapping > CreateMapping() const
size_t GetShaderCount() const
std::shared_ptr< fml::Mapping > GetMapping(ArchiveShaderType type, std::string name) const
const std::string CreateStringFromMapping(const fml::Mapping &mapping)
TEST(AiksCanvasTest, EmptyCullRect)
static std::shared_ptr< fml::Mapping > CreateMappingFromString(std::string p_string)