Flutter Engine
The Flutter Engine
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
9#include "tests/Test.h"
10
11DEF_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}
DEF_TEST(FlattenableNameToFactory, r)
#define ERRORF(r,...)
Definition: Test.h:293
static Factory NameToFactory(const char name[])