Rename ES2 error tests 'O' through 'P' to .rts.

A few tests were divided into a Runtime Effect-compatible .rts test, and
a Runtime Effect-incompatible .sksl test.

Change-Id: Ib52554892685bdc44fe3622ab314960ee0962b90
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523377
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This commit is contained in:
John Stiles 2022-03-22 09:23:32 -04:00 committed by SkCQ
parent c5e6515e4a
commit 141f2873a9
19 changed files with 61 additions and 56 deletions

View File

@ -66,6 +66,7 @@ sksl_error_tests = [
"/sksl/errors/IncompleteExpression.rts",
"/sksl/errors/IncompleteFunctionCall.rts",
"/sksl/errors/InterfaceBlockMemberReservedName.sksl",
"/sksl/errors/InterfaceBlockPrivateType.sksl",
"/sksl/errors/InterfaceBlockReservedName.sksl",
"/sksl/errors/InterfaceBlockScope.sksl",
"/sksl/errors/InterfaceBlockStorageModifiers.sksl",
@ -98,7 +99,7 @@ sksl_error_tests = [
"/sksl/errors/OpaqueTypeInArray.sksl",
"/sksl/errors/OpaqueTypeInInterfaceBlock.sksl",
"/sksl/errors/OpaqueTypeInStruct.sksl",
"/sksl/errors/OpenArray.sksl",
"/sksl/errors/OpenArray.rts",
"/sksl/errors/Ossfuzz26700.sksl",
"/sksl/errors/Ossfuzz27614.sksl",
"/sksl/errors/Ossfuzz27650.sksl",
@ -134,18 +135,19 @@ sksl_error_tests = [
"/sksl/errors/Ossfuzz44559.sksl",
"/sksl/errors/Ossfuzz44561.sksl",
"/sksl/errors/Ossfuzz44565.sksl",
"/sksl/errors/OverflowFloatLiteral.sksl",
"/sksl/errors/OverflowFloatLiteral.rts",
"/sksl/errors/OverflowInlinedLiteral.sksl",
"/sksl/errors/OverflowIntLiteral.sksl",
"/sksl/errors/OverflowInt64Literal.sksl",
"/sksl/errors/OverflowParamArraySize.sksl",
"/sksl/errors/OverflowInt64Literal.rts",
"/sksl/errors/OverflowIntLiteral.rts",
"/sksl/errors/OverflowParamArraySize.rts",
"/sksl/errors/OverflowShortLiteral.sksl",
"/sksl/errors/OverflowUintLiteral.sksl",
"/sksl/errors/PrecisionQualifiersDisallowed.sksl",
"/sksl/errors/ProgramTooLarge_Globals.sksl",
"/sksl/errors/ProgramTooLarge_Stack.sksl",
"/sksl/errors/PrototypeInFuncBody.sksl",
"/sksl/errors/PrivateTypes.sksl",
"/sksl/errors/PrivateVariables.sksl",
"/sksl/errors/PrivateTypes.rts",
"/sksl/errors/PrivateVariables.rts",
"/sksl/errors/ProgramTooLarge_Globals.rts",
"/sksl/errors/ProgramTooLarge_Stack.rts",
"/sksl/errors/PrototypeInFuncBody.rts",
"/sksl/errors/RedeclareBasicType.sksl",
"/sksl/errors/RedeclareSamplerType.sksl",
"/sksl/errors/RedeclareStruct.sksl",

View File

@ -0,0 +1,7 @@
InterfaceBlock {
$mat g;
};
/*%%*
type '$mat' is private
*%%*/

View File

@ -0,0 +1,7 @@
half4 main(float2 coords) {
coords.r[ = ( coords.g );
}
/*%%*
expected expression, but found '='
*%%*/

View File

@ -1,9 +0,0 @@
void main(inout float4 color) {
color.r[ = ( color.g );
}
/*%%*
shader 'main' must be main() or main(float2)
unknown identifier 'color'
expected expression, but found '='
*%%*/

View File

@ -1,5 +1,5 @@
void main() {
sk_FragColor = half4(3.41e+38);
void func() {
float x = 3.41e+38;
}
/*%%*

View File

@ -1,21 +1,11 @@
// Expect 6 errors
const int intMin = -2147483648;
const int intMinMinusOne = -2147483649; // error
const int intMax = 2147483647;
const int intMaxPlusOne = 2147483648; // error
short4 s4_neg = short4(-32766, -32767, -32769, -32768); // error -32769
short4 s4_pos = short4(32765, 32768, 32766, 32767); // error 32768
int cast_int = int(2147483648.); // error
short cast_short = short(32768.); // error
/*%%*
integer is out of range for type 'int': -2147483649
integer is out of range for type 'int': 2147483648
integer is out of range for type 'short': -32769
integer is out of range for type 'short': 32768
integer is out of range for type 'int': 2147483648
integer is out of range for type 'short': 32768
*%%*/

View File

@ -0,0 +1,9 @@
short4 s4_neg = short4(-32766, -32767, -32769, -32768); // error -32769
short4 s4_pos = short4(32765, 32768, 32766, 32767); // error 32768
short cast_short = short(32768.); // error
/*%%*
integer is out of range for type 'short': -32769
integer is out of range for type 'short': 32768
integer is out of range for type 'short': 32768
*%%*/

View File

@ -1,7 +1,3 @@
InterfaceBlock {
$mat g;
};
struct S {
$bvec bv;
};
@ -12,7 +8,6 @@ void ctor_mat_private() { $mat(0); }
void ctor_literal_private() { $floatLiteral(0); }
/*%%*
type '$mat' is private
type '$bvec' is private
type '$ivec' is private
type '$genType' is private

View File

@ -1,5 +1,5 @@
int $a;
void main(float2 $b) {
void func(float2 $b) {
float $c[2];
bool4 $d;
}

View File

@ -5,7 +5,7 @@ struct S {
half h;
};
void main() {
void func() {
int small;
S big_chungus;
S no_report; // we don't need to report overflows past the first

View File

@ -1,4 +1,4 @@
void main() {
void func() {
float x();
}

View File

@ -0,0 +1,4 @@
### Compilation failed:
error: 2: type '$mat' is private
1 error

View File

@ -1,6 +1,4 @@
### Compilation failed:
error: 1: shader 'main' must be main() or main(float2)
error: 2: unknown identifier 'color'
error: 2: expected expression, but found '='
3 errors
1 error

View File

@ -1,9 +1,6 @@
### Compilation failed:
error: 4: integer is out of range for type 'int': -2147483649
error: 6: integer is out of range for type 'int': 2147483648
error: 8: integer is out of range for type 'short': -32769
error: 9: integer is out of range for type 'short': 32768
error: 11: integer is out of range for type 'int': 2147483648
error: 12: integer is out of range for type 'short': 32768
6 errors
error: 2: integer is out of range for type 'int': -2147483649
error: 4: integer is out of range for type 'int': 2147483648
error: 5: integer is out of range for type 'int': 2147483648
3 errors

View File

@ -0,0 +1,6 @@
### Compilation failed:
error: 1: integer is out of range for type 'short': -32769
error: 2: integer is out of range for type 'short': 32768
error: 3: integer is out of range for type 'short': 32768
3 errors

View File

@ -1,9 +1,8 @@
### Compilation failed:
error: 2: type '$mat' is private
error: 6: type '$bvec' is private
error: 9: type '$ivec' is private
error: 10: type '$genType' is private
error: 11: type '$mat' is private
error: 12: type '$floatLiteral' is private
6 errors
error: 2: type '$bvec' is private
error: 5: type '$ivec' is private
error: 6: type '$genType' is private
error: 7: type '$mat' is private
error: 8: type '$floatLiteral' is private
5 errors