Skip to content

Commit 59ecc75

Browse files
[flutter_tools] add uint compilation test (#115317)
* [flutter_tools] add uint compilation test * Update shader_compiler_test.dart
1 parent 8e3ea14 commit 59ecc75

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/flutter_tools/test/integration.shard/shader_compiler_test.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,23 @@ void main() {
136136
),
137137
));
138138
});
139+
140+
testUsingContext('Compilation error with uint8 uniforms', () async {
141+
const String kShaderWithInput = '''
142+
#version 310 es
143+
144+
layout(location = 0) uniform uint foo;
145+
layout(location = 0) out vec4 fragColor;
146+
147+
void main() {}
148+
''';
149+
150+
expect(() => testCompileShader(kShaderWithInput), throwsA(isA<ShaderCompilerException>()
151+
.having(
152+
(ShaderCompilerException exception) => exception.message,
153+
'message',
154+
contains('SkSL does not support unsigned integers'),
155+
),
156+
));
157+
});
139158
}

0 commit comments

Comments
 (0)