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 
DEF_TEST(FlattenableNameToFactory,r)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 }
25