Flutter Engine
The Flutter Engine
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
14namespace impeller {
15namespace compiler {
16namespace testing {
17
18class CompilerTest : 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") 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_
bool CanCompileAndReflect(const char *fixture_name, SourceType source_type=SourceType::kUnknown, SourceLanguage source_language=SourceLanguage::kGLSL, const char *entry_point_name="main") const
std::unique_ptr< fml::FileMapping > GetReflectionJson(const char *fixture_name) const
std::unique_ptr< fml::FileMapping > GetShaderFile(const char *fixture_name, TargetPlatform platform) const