skia2/resources/sksl/runtime_errors/IllegalOperators.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

33 lines
907 B
Plaintext

int bit_not(int x) { return ~x; }
int remainder(int x) { return x % 2; }
int remainder_eq(int x) { return x %= 2;}
int shl (int x) { return x << 1; }
int shl_eq(int x) { return x <<= 1; }
int shr (int x) { return x >> 1; }
int shr_eq(int x) { return x >>= 1; }
int bit_and (int x) { return x & 1; }
int bit_and_eq(int x) { return x &= 1; }
int bit_or (int x) { return x | 1; }
int bit_or_eq (int x) { return x |= 1; }
int bit_xor (int x) { return x ^ 1; }
int bit_xor_eq(int x) { return x ^= 1; }
/*%%*
operator '~' is not allowed
operator '%' is not allowed
operator '%=' is not allowed
operator '<<' is not allowed
operator '<<=' is not allowed
operator '>>' is not allowed
operator '>>=' is not allowed
operator '&' is not allowed
operator '&=' is not allowed
operator '|' is not allowed
operator '|=' is not allowed
operator '^' is not allowed
operator '^=' is not allowed
*%%*/