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/testing/testing.h"
13 
14 namespace impeller {
15 namespace compiler {
16 namespace testing {
17 
18 class CompilerTest : public ::testing::TestWithParam<TargetPlatform> {
19  public:
20  CompilerTest();
21 
22  ~CompilerTest();
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") const;
36 
37  private:
38  std::string intermediates_path_;
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()
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: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:78
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:86
impeller::compiler::SourceLanguage
SourceLanguage
Definition: types.h:41
impeller::compiler::testing::CompilerTest::CompilerTest
CompilerTest()
Definition: compiler_test.cc:26
impeller::compiler::testing::CompilerTest
Definition: compiler_test.h:18
impeller
Definition: aiks_blend_unittests.cc:18
types.h