Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
4dd9d496
Unverified
Commit
4dd9d496
authored
Aug 09, 2022
by
Zachary Anderson
Committed by
GitHub
Aug 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Adds test of impellerc output file mode (#109190)
parent
87f16844
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
shader_compiler_test.dart
...er_tools/test/integration.shard/shader_compiler_test.dart
+56
-0
No files found.
packages/flutter_tools/test/integration.shard/shader_compiler_test.dart
0 → 100644
View file @
4dd9d496
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/build_system/targets/shader_compiler.dart'
;
import
'package:flutter_tools/src/globals.dart'
as
globals
;
import
'../src/common.dart'
;
import
'../src/context.dart'
;
void
main
(
)
{
late
BufferLogger
logger
;
setUp
(()
{
logger
=
BufferLogger
.
test
();
});
testUsingContext
(
'impellerc .iplr output has correct permissions'
,
()
async
{
if
(
globals
.
platform
.
isWindows
)
{
return
;
}
final
String
flutterRoot
=
getFlutterRoot
();
final
String
inkSparklePath
=
globals
.
fs
.
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
,
'lib'
,
'src'
,
'material'
,
'shaders'
,
'ink_sparkle.frag'
);
final
Directory
tmpDir
=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'shader_compiler_test.'
,
);
final
String
inkSparkleOutputPath
=
globals
.
fs
.
path
.
join
(
tmpDir
.
path
,
'ink_sparkle.frag'
,
);
final
ShaderCompiler
shaderCompiler
=
ShaderCompiler
(
processManager:
globals
.
processManager
,
logger:
logger
,
fileSystem:
globals
.
fs
,
artifacts:
globals
.
artifacts
!,
);
final
bool
compileResult
=
await
shaderCompiler
.
compileShader
(
input:
globals
.
fs
.
file
(
inkSparklePath
),
outputPath:
inkSparkleOutputPath
,
target:
ShaderTarget
.
sksl
,
);
final
File
resultFile
=
globals
.
fs
.
file
(
inkSparkleOutputPath
);
expect
(
compileResult
,
true
);
expect
(
resultFile
.
existsSync
(),
true
);
final
int
expectedMode
=
int
.
parse
(
'644'
,
radix:
8
);
expect
(
resultFile
.
statSync
().
mode
&
expectedMode
,
equals
(
expectedMode
));
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment