diff options
author | John Stiles <johnstiles@google.com> | 2022-03-21 17:42:49 -0400 |
---|---|---|
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | 2022-03-24 02:09:39 +0000 |
commit | 843619630a0f4126b0572eb093cfaeac4121cd81 (patch) | |
tree | 9b338765231bd9bc153bef162caddea5bafa0473 | |
parent | 099124d46d1d9324519c1652c109afd9e842bd01 (diff) | |
download | skia-843619630a0f4126b0572eb093cfaeac4121cd81.tar.gz |
Rename ES2 error tests from 'C' through 'G' to .rts.
A few tests received minor tweaks to make them Runtime Effect-friendly.
Bug: skia:13042
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I7734390c9fadb53bd74b7b395df611db935fcc0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524098
Reviewed-by: Derek Sollenberger <djsollen@google.com>
-rw-r--r-- | gn/sksl_tests.gni | 30 | ||||
-rw-r--r-- | resources/sksl/errors/CallNonFunction.rts (renamed from resources/sksl/errors/CallNonFunction.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/ComparisonDimensional.rts (renamed from resources/sksl/errors/ComparisonDimensional.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ConstructorArgumentCount.rts (renamed from resources/sksl/errors/ConstructorArgumentCount.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ConstructorTypeMismatch.rts (renamed from resources/sksl/errors/ConstructorTypeMismatch.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ContinueOutsideLoop.rts | 15 | ||||
-rw-r--r-- | resources/sksl/errors/ContinueOutsideLoop.sksl | 7 | ||||
-rw-r--r-- | resources/sksl/errors/DivideByZero.rts (renamed from resources/sksl/errors/DivideByZero.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/DuplicateFunction.rts | 6 | ||||
-rw-r--r-- | resources/sksl/errors/DuplicateFunction.sksl | 6 | ||||
-rw-r--r-- | resources/sksl/errors/DuplicateSymbol.rts (renamed from resources/sksl/errors/DuplicateSymbol.sksl) | 6 | ||||
-rw-r--r-- | resources/sksl/errors/EmptyArray.rts (renamed from resources/sksl/errors/EmptyArray.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/EmptyStruct.rts (renamed from resources/sksl/errors/EmptyStruct.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ErrorsInDeadCode.rts (renamed from resources/sksl/errors/ErrorsInDeadCode.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/FloatRemainder.rts (renamed from resources/sksl/errors/FloatRemainder.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/ForTypeMismatch.rts (renamed from resources/sksl/errors/ForTypeMismatch.sksl) | 2 | ||||
-rw-r--r-- | resources/sksl/errors/FunctionParameterOfVoid.rts (renamed from resources/sksl/errors/FunctionParameterOfVoid.sksl) | 0 | ||||
-rw-r--r-- | resources/sksl/errors/GenericArgumentMismatch.rts (renamed from resources/sksl/errors/GenericArgumentMismatch.sksl) | 0 | ||||
-rw-r--r-- | tests/sksl/errors/ContinueOutsideLoop.glsl | 4 | ||||
-rw-r--r-- | tests/sksl/errors/DuplicateFunction.glsl | 2 | ||||
-rw-r--r-- | tests/sksl/errors/DuplicateSymbol.glsl | 2 |
21 files changed, 45 insertions, 37 deletions
diff --git a/gn/sksl_tests.gni b/gn/sksl_tests.gni index 213e29bc9b..c0bf6592bf 100644 --- a/gn/sksl_tests.gni +++ b/gn/sksl_tests.gni @@ -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", diff --git a/resources/sksl/errors/CallNonFunction.sksl b/resources/sksl/errors/CallNonFunction.rts index 0ce09c6022..0d4af2cbe6 100644 --- a/resources/sksl/errors/CallNonFunction.sksl +++ b/resources/sksl/errors/CallNonFunction.rts @@ -1,4 +1,4 @@ -void main() { +void func() { float x = 3; x(); } diff --git a/resources/sksl/errors/ComparisonDimensional.sksl b/resources/sksl/errors/ComparisonDimensional.rts index 933fa4e879..933fa4e879 100644 --- a/resources/sksl/errors/ComparisonDimensional.sksl +++ b/resources/sksl/errors/ComparisonDimensional.rts diff --git a/resources/sksl/errors/ConstructorArgumentCount.sksl b/resources/sksl/errors/ConstructorArgumentCount.rts index 6977bdf3ba..6977bdf3ba 100644 --- a/resources/sksl/errors/ConstructorArgumentCount.sksl +++ b/resources/sksl/errors/ConstructorArgumentCount.rts diff --git a/resources/sksl/errors/ConstructorTypeMismatch.sksl b/resources/sksl/errors/ConstructorTypeMismatch.rts index 4a54bbf876..4a54bbf876 100644 --- a/resources/sksl/errors/ConstructorTypeMismatch.sksl +++ b/resources/sksl/errors/ConstructorTypeMismatch.rts diff --git a/resources/sksl/errors/ContinueOutsideLoop.rts b/resources/sksl/errors/ContinueOutsideLoop.rts new file mode 100644 index 0000000000..6e557fa9cc --- /dev/null +++ b/resources/sksl/errors/ContinueOutsideLoop.rts @@ -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 +*%%*/ diff --git a/resources/sksl/errors/ContinueOutsideLoop.sksl b/resources/sksl/errors/ContinueOutsideLoop.sksl deleted file mode 100644 index e4b98f2a7c..0000000000 --- a/resources/sksl/errors/ContinueOutsideLoop.sksl +++ /dev/null @@ -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 -*%%*/ diff --git a/resources/sksl/errors/DivideByZero.sksl b/resources/sksl/errors/DivideByZero.rts index 7f72eccbfc..7f72eccbfc 100644 --- a/resources/sksl/errors/DivideByZero.sksl +++ b/resources/sksl/errors/DivideByZero.rts diff --git a/resources/sksl/errors/DuplicateFunction.rts b/resources/sksl/errors/DuplicateFunction.rts new file mode 100644 index 0000000000..1acf05c606 --- /dev/null +++ b/resources/sksl/errors/DuplicateFunction.rts @@ -0,0 +1,6 @@ +void func() {} +void func() {} + +/*%%* +duplicate definition of void func() +*%%*/ diff --git a/resources/sksl/errors/DuplicateFunction.sksl b/resources/sksl/errors/DuplicateFunction.sksl deleted file mode 100644 index 4125e2cad1..0000000000 --- a/resources/sksl/errors/DuplicateFunction.sksl +++ /dev/null @@ -1,6 +0,0 @@ -void main() {} -void main() {} - -/*%%* -duplicate definition of void main() -*%%*/ diff --git a/resources/sksl/errors/DuplicateSymbol.sksl b/resources/sksl/errors/DuplicateSymbol.rts index 8785fcc646..ddf82b178d 100644 --- a/resources/sksl/errors/DuplicateSymbol.sksl +++ b/resources/sksl/errors/DuplicateSymbol.rts @@ -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 *%%*/ diff --git a/resources/sksl/errors/EmptyArray.sksl b/resources/sksl/errors/EmptyArray.rts index 08502e18b5..08502e18b5 100644 --- a/resources/sksl/errors/EmptyArray.sksl +++ b/resources/sksl/errors/EmptyArray.rts diff --git a/resources/sksl/errors/EmptyStruct.sksl b/resources/sksl/errors/EmptyStruct.rts index d0245e89d8..d0245e89d8 100644 --- a/resources/sksl/errors/EmptyStruct.sksl +++ b/resources/sksl/errors/EmptyStruct.rts diff --git a/resources/sksl/errors/ErrorsInDeadCode.sksl b/resources/sksl/errors/ErrorsInDeadCode.rts index 2f297d24f3..2f297d24f3 100644 --- a/resources/sksl/errors/ErrorsInDeadCode.sksl +++ b/resources/sksl/errors/ErrorsInDeadCode.rts diff --git a/resources/sksl/errors/FloatRemainder.sksl b/resources/sksl/errors/FloatRemainder.rts index fd6f360b52..fd6f360b52 100644 --- a/resources/sksl/errors/FloatRemainder.sksl +++ b/resources/sksl/errors/FloatRemainder.rts diff --git a/resources/sksl/errors/ForTypeMismatch.sksl b/resources/sksl/errors/ForTypeMismatch.rts index 590027e57f..82ea19a41f 100644 --- a/resources/sksl/errors/ForTypeMismatch.sksl +++ b/resources/sksl/errors/ForTypeMismatch.rts @@ -1,4 +1,4 @@ -void main() { +void func() { for (int x = 0; x; x++) {} } diff --git a/resources/sksl/errors/FunctionParameterOfVoid.sksl b/resources/sksl/errors/FunctionParameterOfVoid.rts index e5804dafd4..e5804dafd4 100644 --- a/resources/sksl/errors/FunctionParameterOfVoid.sksl +++ b/resources/sksl/errors/FunctionParameterOfVoid.rts diff --git a/resources/sksl/errors/GenericArgumentMismatch.sksl b/resources/sksl/errors/GenericArgumentMismatch.rts index 0dc3470afb..0dc3470afb 100644 --- a/resources/sksl/errors/GenericArgumentMismatch.sksl +++ b/resources/sksl/errors/GenericArgumentMismatch.rts diff --git a/tests/sksl/errors/ContinueOutsideLoop.glsl b/tests/sksl/errors/ContinueOutsideLoop.glsl index e841af8a65..25cbcdc95a 100644 --- a/tests/sksl/errors/ContinueOutsideLoop.glsl +++ b/tests/sksl/errors/ContinueOutsideLoop.glsl @@ -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 diff --git a/tests/sksl/errors/DuplicateFunction.glsl b/tests/sksl/errors/DuplicateFunction.glsl index 7672b0163b..72442d1276 100644 --- a/tests/sksl/errors/DuplicateFunction.glsl +++ b/tests/sksl/errors/DuplicateFunction.glsl @@ -1,4 +1,4 @@ ### Compilation failed: -error: 2: duplicate definition of void main() +error: 2: duplicate definition of void func() 1 error diff --git a/tests/sksl/errors/DuplicateSymbol.glsl b/tests/sksl/errors/DuplicateSymbol.glsl index 9e5cb06293..c39dd6a49b 100644 --- a/tests/sksl/errors/DuplicateSymbol.glsl +++ b/tests/sksl/errors/DuplicateSymbol.glsl @@ -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 |