Rename ES2 error tests from 'C' through 'G' to .rts.
A few tests received minor tweaks to make them Runtime Effect-friendly. Change-Id: I9b4f66b0974c41d38324dfbb31ac9849338f600a Bug: skia:13042 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523186 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Arman Uguray <armansito@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
This commit is contained in:
parent
1c5020d295
commit
2fdcca2777
@ -43,25 +43,25 @@ sksl_error_tests = [
|
||||
"/sksl/errors/BitShiftFloatVector.rts",
|
||||
"/sksl/errors/BooleanArithmetic.sksl",
|
||||
"/sksl/errors/BreakOutsideLoop.rts",
|
||||
"/sksl/errors/CallNonFunction.sksl",
|
||||
"/sksl/errors/CallNonFunction.rts",
|
||||
"/sksl/errors/CanExitWithoutReturningValue.sksl",
|
||||
"/sksl/errors/ComparisonDimensional.sksl",
|
||||
"/sksl/errors/ConstructorArgumentCount.sksl",
|
||||
"/sksl/errors/ConstructorTypeMismatch.sksl",
|
||||
"/sksl/errors/ContinueOutsideLoop.sksl",
|
||||
"/sksl/errors/DivideByZero.sksl",
|
||||
"/sksl/errors/ComparisonDimensional.rts",
|
||||
"/sksl/errors/ConstructorArgumentCount.rts",
|
||||
"/sksl/errors/ConstructorTypeMismatch.rts",
|
||||
"/sksl/errors/ContinueOutsideLoop.rts",
|
||||
"/sksl/errors/DivideByZero.rts",
|
||||
"/sksl/errors/DoTypeMismatch.sksl",
|
||||
"/sksl/errors/DuplicateFunction.sksl",
|
||||
"/sksl/errors/DuplicateFunction.rts",
|
||||
"/sksl/errors/DuplicateOutput.sksl",
|
||||
"/sksl/errors/DuplicateSymbol.sksl",
|
||||
"/sksl/errors/EmptyArray.sksl",
|
||||
"/sksl/errors/EmptyStruct.sksl",
|
||||
"/sksl/errors/ErrorsInDeadCode.sksl",
|
||||
"/sksl/errors/FloatRemainder.sksl",
|
||||
"/sksl/errors/DuplicateSymbol.rts",
|
||||
"/sksl/errors/EmptyArray.rts",
|
||||
"/sksl/errors/EmptyStruct.rts",
|
||||
"/sksl/errors/ErrorsInDeadCode.rts",
|
||||
"/sksl/errors/FloatRemainder.rts",
|
||||
"/sksl/errors/ForInitStmt.sksl",
|
||||
"/sksl/errors/ForTypeMismatch.sksl",
|
||||
"/sksl/errors/FunctionParameterOfVoid.sksl",
|
||||
"/sksl/errors/GenericArgumentMismatch.sksl",
|
||||
"/sksl/errors/ForTypeMismatch.rts",
|
||||
"/sksl/errors/FunctionParameterOfVoid.rts",
|
||||
"/sksl/errors/GenericArgumentMismatch.rts",
|
||||
"/sksl/errors/PrecisionQualifiersDisallowed.sksl",
|
||||
"/sksl/errors/IfTypeMismatch.sksl",
|
||||
"/sksl/errors/InVarWithInitializerExpression.sksl",
|
||||
|
@ -1,4 +1,4 @@
|
||||
void main() {
|
||||
void func() {
|
||||
float x = 3;
|
||||
x();
|
||||
}
|
15
resources/sksl/errors/ContinueOutsideLoop.rts
Normal file
15
resources/sksl/errors/ContinueOutsideLoop.rts
Normal file
@ -0,0 +1,15 @@
|
||||
void outside_for() {
|
||||
for (int x=0; x<10; ++x) {}
|
||||
continue;
|
||||
}
|
||||
|
||||
void inside_switch() {
|
||||
switch (1) {
|
||||
default: continue;
|
||||
}
|
||||
}
|
||||
|
||||
/*%%*
|
||||
continue statement must be inside a loop
|
||||
continue statement must be inside a loop
|
||||
*%%*/
|
@ -1,7 +0,0 @@
|
||||
void outside_for() { for (;;) {} continue; }
|
||||
void inside_switch() { switch (1) { default: continue; } }
|
||||
|
||||
/*%%*
|
||||
continue statement must be inside a loop
|
||||
continue statement must be inside a loop
|
||||
*%%*/
|
6
resources/sksl/errors/DuplicateFunction.rts
Normal file
6
resources/sksl/errors/DuplicateFunction.rts
Normal file
@ -0,0 +1,6 @@
|
||||
void func() {}
|
||||
void func() {}
|
||||
|
||||
/*%%*
|
||||
duplicate definition of void func()
|
||||
*%%*/
|
@ -1,6 +0,0 @@
|
||||
void main() {}
|
||||
void main() {}
|
||||
|
||||
/*%%*
|
||||
duplicate definition of void main()
|
||||
*%%*/
|
@ -1,13 +1,13 @@
|
||||
int x;
|
||||
int x;
|
||||
|
||||
int main;
|
||||
void main() {
|
||||
int func;
|
||||
void func() {
|
||||
int y,y;
|
||||
}
|
||||
|
||||
/*%%*
|
||||
symbol 'x' was already defined
|
||||
symbol 'main' was already defined
|
||||
symbol 'func' was already defined
|
||||
symbol 'y' was already defined
|
||||
*%%*/
|
@ -1,4 +1,4 @@
|
||||
void main() {
|
||||
void func() {
|
||||
for (int x = 0; x; x++) {}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 1: continue statement must be inside a loop
|
||||
error: 2: continue statement must be inside a loop
|
||||
error: 3: continue statement must be inside a loop
|
||||
error: 8: continue statement must be inside a loop
|
||||
2 errors
|
||||
|
@ -1,4 +1,4 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: duplicate definition of void main()
|
||||
error: 2: duplicate definition of void func()
|
||||
1 error
|
||||
|
@ -1,6 +1,6 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 2: symbol 'x' was already defined
|
||||
error: 5: symbol 'main' was already defined
|
||||
error: 5: symbol 'func' was already defined
|
||||
error: 6: symbol 'y' was already defined
|
||||
3 errors
|
||||
|
Loading…
Reference in New Issue
Block a user