Skip to content

Commit

Permalink
[flutter_tools] add uint compilation test (#115317)
Browse files Browse the repository at this point in the history
* [flutter_tools] add uint compilation test

* Update shader_compiler_test.dart
  • Loading branch information
jonahwilliams authored Nov 15, 2022
1 parent 8e3ea14 commit 59ecc75
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,23 @@ void main() {
),
));
});

testUsingContext('Compilation error with uint8 uniforms', () async {
const String kShaderWithInput = '''
#version 310 es
layout(location = 0) uniform uint foo;
layout(location = 0) out vec4 fragColor;
void main() {}
''';

expect(() => testCompileShader(kShaderWithInput), throwsA(isA<ShaderCompilerException>()
.having(
(ShaderCompilerException exception) => exception.message,
'message',
contains('SkSL does not support unsigned integers'),
),
));
});
}

0 comments on commit 59ecc75

Please sign in to comment.