Flutter Engine
The Flutter Engine
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
8#include "flutter/fml/macros.h"
9#include "flutter/testing/testing.h"
14
15namespace impeller {
16namespace compiler {
17namespace testing {
18
19class CompilerTest : public ::testing::TestWithParam<TargetPlatform> {
20 public:
22
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
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_
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