Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
tests
FlattenableNameToFactory.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2018 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#include "
include/core/SkFlattenable.h
"
9
#include "
tests/Test.h
"
10
11
DEF_TEST
(FlattenableNameToFactory, r) {
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
}
SkFlattenable.h
Test.h
DEF_TEST
#define DEF_TEST(name, reporter)
Definition
Test.h:312
ERRORF
#define ERRORF(r,...)
Definition
Test.h:293
SkFlattenable::NameToFactory
static Factory NameToFactory(const char name[])
Definition
SkFlattenable.cpp:101
Generated on Fri Apr 26 2024 06:17:41 for Flutter Engine by
1.9.8