| 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 std::string intermediates_path_;
40 fml::UniqueFD intermediates_directory_;
41
42 CompilerTest(const CompilerTest&) = delete;
43
44 CompilerTest& operator=(const CompilerTest&) = delete;
45 };
46
47 } // namespace testing
48 } // namespace compiler
49 } // namespace impeller
50
51 #endif // FLUTTER_IMPELLER_COMPILER_COMPILER_TEST_H_
impeller::compiler::testing::CompilerTest::~CompilerTest
~CompilerTest()
Definition: compiler_test.cc:34
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:71
validation.h
impeller::compiler::TargetPlatform
TargetPlatform
Definition: types.h:29
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:78
compiler.h
impeller::compiler::SourceType
SourceType
Definition: types.h:22
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:86
impeller::compiler::SourceLanguage
SourceLanguage
Definition: types.h:42
impeller::compiler::testing::CompilerTest::CompilerTest
CompilerTest()
Definition: compiler_test.cc:26
impeller::compiler::testing::CompilerTest
Definition: compiler_test.h:19
impeller
Definition: aiks_blur_unittests.cc:20
types.h