From 59ecc75748b4fc796585c949ade2a3d525382be8 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 14 Nov 2022 17:39:59 -0800 Subject: [PATCH] [flutter_tools] add uint compilation test (#115317) * [flutter_tools] add uint compilation test * Update shader_compiler_test.dart --- .../shader_compiler_test.dart | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/flutter_tools/test/integration.shard/shader_compiler_test.dart b/packages/flutter_tools/test/integration.shard/shader_compiler_test.dart index 3dd004c0bf..53a3bb350b 100644 --- a/packages/flutter_tools/test/integration.shard/shader_compiler_test.dart +++ b/packages/flutter_tools/test/integration.shard/shader_compiler_test.dart @@ -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() + .having( + (ShaderCompilerException exception) => exception.message, + 'message', + contains('SkSL does not support unsigned integers'), + ), + )); + }); }