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"
)
const
;
36
37
private
:
38
std::string intermediates_path_;
39
fml::UniqueFD
intermediates_directory_;
40
41
CompilerTestBase
(
const
CompilerTestBase
&) =
delete
;
42
43
CompilerTestBase
& operator=(
const
CompilerTestBase
&) =
delete
;
44
};
45
46
class
CompilerTest
:
public
CompilerTestBase
{};
47
48
class
CompilerTestSkSL
:
public
CompilerTestBase
{};
49
50
class
CompilerTestRuntime
:
public
CompilerTestBase
{};
51
52
}
// namespace testing
53
}
// namespace compiler
54
}
// namespace impeller
55
56
#endif
// FLUTTER_IMPELLER_COMPILER_COMPILER_TEST_H_
fml::UniqueObject< int, internal::os_unix::UniqueFDTraits >
impeller::compiler::testing::CompilerTestBase
Definition
compiler_test.h:18
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") const
Definition
compiler_test.cc:87
impeller::compiler::testing::CompilerTestBase::GetReflectionJson
std::unique_ptr< fml::FileMapping > GetReflectionJson(const char *fixture_name) const
Definition
compiler_test.cc:72
impeller::compiler::testing::CompilerTestBase::GetShaderFile
std::unique_ptr< fml::FileMapping > GetShaderFile(const char *fixture_name, TargetPlatform platform) const
Definition
compiler_test.cc:79
impeller::compiler::testing::CompilerTestBase::~CompilerTestBase
~CompilerTestBase()
Definition
compiler_test.cc:35
impeller::compiler::testing::CompilerTestBase::CompilerTestBase
CompilerTestBase()
Definition
compiler_test.cc:26
impeller::compiler::testing::CompilerTest
Definition
compiler_test.h:46
impeller::compiler::testing::CompilerTestRuntime
Definition
compiler_test.h:50
impeller::compiler::testing::CompilerTestSkSL
Definition
compiler_test.h:48
types.h
compiler.h
impeller::compiler::SourceType
SourceType
Definition
types.h:22
impeller::compiler::SourceType::kUnknown
@ kUnknown
impeller::compiler::SourceLanguage
SourceLanguage
Definition
types.h:43
impeller::compiler::SourceLanguage::kGLSL
@ kGLSL
impeller::compiler::TargetPlatform
TargetPlatform
Definition
types.h:29
impeller
Definition
texture.h:16
source_options.h
testing.h
validation.h
impeller
compiler
compiler_test.h
Generated on Wed Dec 31 2025 04:49:44 for Flutter Engine Uber Docs by
1.9.8