Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
FlattenableNameToFactory.cpp File Reference
#include "include/core/SkFlattenable.h"
#include "tests/Test.h"

Go to the source code of this file.

Functions

 DEF_TEST (FlattenableNameToFactory, r)
 

Function Documentation

◆ DEF_TEST()

DEF_TEST ( FlattenableNameToFactory  ,
 
)

Definition at line 11 of file FlattenableNameToFactory.cpp.

11 {
12 if (!SkFlattenable::NameToFactory("SkImageShader")) {
13 ERRORF(r, "SkFlattenable::NameToFactory() fails with SkImageShader.");
14 }
15 if (SkFlattenable::NameToFactory("AAA-non-existent")) {
16 ERRORF(r, "SkFlattenable::NameToFactory() succeeds with AAA-non-existent.");
17 }
18 if (SkFlattenable::NameToFactory("SkNonExistent")) {
19 ERRORF(r, "SkFlattenable::NameToFactory() succeeds with SkNonExistent");
20 }
21 if (SkFlattenable::NameToFactory("ZZZ-non-existent")) {
22 ERRORF(r, "SkFlattenable::NameToFactory() succeeds with ZZZ-non-existent.");
23 }
24}
#define ERRORF(r,...)
Definition Test.h:293
static Factory NameToFactory(const char name[])