| Flutter Impeller |

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/fml/macros.h"
9 #include "flutter/testing/testing.h"
10 #include "impeller/base/validation.h"
11 #include "impeller/compiler/compiler.h"
12 #include "impeller/compiler/source_options.h"
13 #include "impeller/compiler/types.h"
14
15 namespace impeller {
16 namespace compiler {
17 namespace testing {
18
19 class CompilerTest : public ::testing::TestWithParam<TargetPlatform> {
20 public:
21 CompilerTest();
22
23 ~CompilerTest();
24
25 std::unique_ptr<fml::FileMapping> GetReflectionJson(
26 const char* fixture_name) const;
27
28 std::unique_ptr<fml::FileMapping> GetShaderFile(
29 const char* fixture_name,
30 TargetPlatform platform) const;
31
32 bool CanCompileAndReflect(
33 const char* fixture_name,
34 SourceType source_type = SourceType::kUnknown,
35 SourceLanguage source_language = SourceLanguage::kGLSL,
36 const char* entry_point_name = "main") const;
37
38 private:
39 fml::UniqueFD intermediates_directory_;
40
41 CompilerTest(const CompilerTest&) = delete;
42
43 CompilerTest& operator=(const CompilerTest&) = delete;
44 };
45
46 } // namespace testing
47 } // namespace compiler
48 } // namespace impeller
49
50 #endif // FLUTTER_IMPELLER_COMPILER_COMPILER_TEST_H_
impeller::compiler::testing::CompilerTest::~CompilerTest
~CompilerTest()
impeller::compiler::SourceType::kUnknown
@ kUnknown
impeller::compiler::testing::CompilerTest::GetReflectionJson
std::unique_ptr< fml::FileMapping > GetReflectionJson(const char *fixture_name) const
Definition: compiler_test.cc:61
validation.h
impeller::compiler::TargetPlatform
TargetPlatform
Definition: types.h:28
impeller::compiler::SourceLanguage::kGLSL
@ kGLSL
source_options.h
impeller::compiler::testing::CompilerTest::GetShaderFile
std::unique_ptr< fml::FileMapping > GetShaderFile(const char *fixture_name, TargetPlatform platform) const
Definition: compiler_test.cc:68
compiler.h
impeller::compiler::SourceType
SourceType
Definition: types.h:21
impeller::compiler::testing::CompilerTest::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:76
impeller::compiler::SourceLanguage
SourceLanguage
Definition: types.h:41
impeller::compiler::testing::CompilerTest::CompilerTest
CompilerTest()
Definition: compiler_test.cc:23
impeller::compiler::testing::CompilerTest
Definition: compiler_test.h:19
impeller
Definition: aiks_context.cc:10
types.h