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
13
14namespace impeller {
15namespace compiler {
16namespace testing {
17
18class CompilerTestBase : public ::testing::TestWithParam<TargetPlatform> {
19 public:
21
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
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
50
52
54
56
57} // namespace testing
58} // namespace compiler
59} // namespace impeller
60
61#endif // FLUTTER_IMPELLER_COMPILER_COMPILER_TEST_H_
std::unique_ptr< fml::FileMapping > GetReflectionJson(const char *fixture_name) const
std::unique_ptr< fml::FileMapping > GetShaderFile(const char *fixture_name, TargetPlatform platform) const
bool CanCompileAndReflect(const char *fixture_name, SourceType source_type=SourceType::kUnknown, SourceLanguage source_language=SourceLanguage::kGLSL, const char *entry_point_name="main")