Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
compiler_test.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_IMPELLER_COMPILER_COMPILER_TEST_H_
6
#define FLUTTER_IMPELLER_COMPILER_COMPILER_TEST_H_
7
8
#include "
flutter/testing/testing.h
"
9
#include "
impeller/base/validation.h
"
10
#include "
impeller/compiler/compiler.h
"
11
#include "
impeller/compiler/source_options.h
"
12
#include "
impeller/compiler/types.h
"
13
14
namespace
impeller
{
15
namespace
compiler {
16
namespace
testing {
17
18
class
CompilerTestBase
:
public
::testing::TestWithParam<TargetPlatform> {
19
public
:
20
CompilerTestBase
();
21
22
~CompilerTestBase
();
23
24
std::unique_ptr<fml::FileMapping>
GetReflectionJson
(
25
const
char
* fixture_name)
const
;
26
27
std::unique_ptr<fml::FileMapping>
GetShaderFile
(
28
const
char
* fixture_name,
29
TargetPlatform
platform)
const
;
30
31
bool
CanCompileAndReflect
(
32
const
char
* fixture_name,
33
SourceType
source_type =
SourceType::kUnknown
,
34
SourceLanguage
source_language =
SourceLanguage::kGLSL
,
35
const
char
* entry_point_name =
"main"
);
36
37
const
Compiler
*
GetCompiler
()
const
;
38
39
private
:
40
std::string intermediates_path_;
41
fml::UniqueFD
intermediates_directory_;
42
std::unique_ptr<Compiler> compiler_;
43
44
CompilerTestBase
(
const
CompilerTestBase
&) =
delete
;
45
46
CompilerTestBase
& operator=(
const
CompilerTestBase
&) =
delete
;
47
};
48
49
class
CompilerTest
:
public
CompilerTestBase
{};
50
51
class
CompilerTestRuntime
:
public
CompilerTestBase
{};
52
53
class
CompilerTestSkSL
:
public
CompilerTestBase
{};
54
55
class
CompilerTestUnknownPlatform
:
public
CompilerTestBase
{};
56
57
}
// namespace testing
58
}
// namespace compiler
59
}
// namespace impeller
60
61
#endif
// FLUTTER_IMPELLER_COMPILER_COMPILER_TEST_H_
fml::UniqueObject< int, internal::os_unix::UniqueFDTraits >
impeller::compiler::Compiler
Definition
compiler.h:25
impeller::compiler::testing::CompilerTestBase
Definition
compiler_test.h:18
impeller::compiler::testing::CompilerTestBase::GetCompiler
const Compiler * GetCompiler() const
Definition
compiler_test.cc:194
impeller::compiler::testing::CompilerTestBase::GetReflectionJson
std::unique_ptr< fml::FileMapping > GetReflectionJson(const char *fixture_name) const
Definition
compiler_test.cc:73
impeller::compiler::testing::CompilerTestBase::GetShaderFile
std::unique_ptr< fml::FileMapping > GetShaderFile(const char *fixture_name, TargetPlatform platform) const
Definition
compiler_test.cc:80
impeller::compiler::testing::CompilerTestBase::~CompilerTestBase
~CompilerTestBase()
Definition
compiler_test.cc:36
impeller::compiler::testing::CompilerTestBase::CompilerTestBase
CompilerTestBase()
Definition
compiler_test.cc:27
impeller::compiler::testing::CompilerTestBase::CanCompileAndReflect
bool CanCompileAndReflect(const char *fixture_name, SourceType source_type=SourceType::kUnknown, SourceLanguage source_language=SourceLanguage::kGLSL, const char *entry_point_name="main")
Definition
compiler_test.cc:88
impeller::compiler::testing::CompilerTest
Definition
compiler_test.h:49
impeller::compiler::testing::CompilerTestRuntime
Definition
compiler_test.h:51
impeller::compiler::testing::CompilerTestSkSL
Definition
compiler_test.h:53
impeller::compiler::testing::CompilerTestUnknownPlatform
Definition
compiler_test.h:55
types.h
compiler.h
impeller::compiler::SourceType
SourceType
Definition
types.h:23
impeller::compiler::SourceType::kUnknown
@ kUnknown
impeller::compiler::SourceLanguage
SourceLanguage
Definition
types.h:44
impeller::compiler::SourceLanguage::kGLSL
@ kGLSL
impeller::compiler::TargetPlatform
TargetPlatform
Definition
types.h:30
impeller
Definition
texture.h:16
source_options.h
testing.h
validation.h
impeller
compiler
compiler_test.h
Generated on Mon May 25 2026 06:07:33 for Flutter Engine Uber Docs by
1.9.8