skia2/resources/sksl/runtime_errors/LoopExpressionErrors.rts
John Stiles 6dda78ac7b Add SkSL error tests for runtime_errors directory.
This enables the SkSL error testing logic for runtime effects. The core
logic is identical, only the ProgramKind differs.

(Error creation scripts: http://go/paste/6413797460803584 with some
light post-processing)

Change-Id: I877205b3cc1014b50ccccf6037a2f4034c07543e
Bug: skia:12665
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506538
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-10 14:24:39 +00:00

24 lines
802 B
Plaintext

// Expect 7 errors
void no_expression() { for (int i = 0; i < 1;) {} }
void expression_equals() { for (int i = 0; i < 1; i = 1) {} }
void expression_equal_plus() { for (int i = 0; i < 1; i = i + 1) {} }
void expression_times_eq() { for (int i = 1; i < 2; i *= 2) {} }
void expression_bad_unary() { for (int i = 0; i < 1; -i) {} }
uniform int u;
void expression_uniform_val() { for (int i = 0; i < 1; i += u) {} }
void expression_param_val(int p) { for (int i = 0; i < 1; i += p) {} }
/*%%*
missing loop expression
invalid operator in loop expression
loop index must be modified by a constant expression
invalid operator in loop expression
invalid operator in loop expression
loop index must be modified by a constant expression
loop index must be modified by a constant expression
*%%*/