skia2/resources/sksl/errors/BooleanArithmetic.sksl
John Stiles a456175a07 Add expected errors to every test file.
This was (crudely) automated with shell scripts:
http://go/paste/5484300603490304

Change-Id: Ic9e1c93112772d303d1158eb26d995f27b439eba
Bug: skia:12665
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505637
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-08 18:20:25 +00:00

55 lines
2.7 KiB
Plaintext

bool2 add_boolean() { return false + true; }
bool2 sub_boolean() { return false - true; }
bool2 mul_boolean() { return false * true; }
bool2 div_boolean() { return false / true; }
bool2 mod_boolean() { return false % true; }
bool2 shl_boolean() { return false << true; }
bool2 shr_boolean() { return false >> true; }
bool2 neg_boolean() { return -false; }
bool2 bitnot_boolean() { return ~false; }
bool2 bitand_boolean() { return false & true; }
bool2 bitor_boolean() { return false | true; }
bool2 bitxor_boolean() { return false ^ true; }
bool2 add_boolean_vec() { return bool2(false, false) + bool2(true, true); }
bool2 sub_boolean_vec() { return bool2(false, false) - bool2(true, true); }
bool2 mul_boolean_vec() { return bool2(false, false) * bool2(true, true); }
bool2 div_boolean_vec() { return bool2(false, false) / bool2(true, true); }
bool2 mod_boolean_vec() { return bool2(false, false) % bool2(true, true); }
bool2 shl_boolean_vec() { return bool2(false, false) << bool2(true, true); }
bool2 shr_boolean_vec() { return bool2(false, false) >> bool2(true, true); }
bool2 not_boolean_vec() { return !bool2(false, false); }
bool2 neg_boolean_vec() { return -bool2(false, false); }
bool2 bitnot_boolean_vec() { return ~bool2(false, false); }
bool2 bitand_boolean_vec() { return bool2(false, false) & bool2(true, true); }
bool2 bitor_boolean_vec() { return bool2(false, false) | bool2(true, true); }
bool2 bitxor_boolean_vec() { return bool2(false, false) ^ bool2(true, true); }
/*%%*
type mismatch: '+' cannot operate on 'bool', 'bool'
type mismatch: '-' cannot operate on 'bool', 'bool'
type mismatch: '*' cannot operate on 'bool', 'bool'
type mismatch: '/' cannot operate on 'bool', 'bool'
type mismatch: '%' cannot operate on 'bool', 'bool'
type mismatch: '<<' cannot operate on 'bool', 'bool'
type mismatch: '>>' cannot operate on 'bool', 'bool'
'-' cannot operate on 'bool'
'~' cannot operate on 'bool'
type mismatch: '&' cannot operate on 'bool', 'bool'
type mismatch: '|' cannot operate on 'bool', 'bool'
type mismatch: '^' cannot operate on 'bool', 'bool'
type mismatch: '+' cannot operate on 'bool2', 'bool2'
type mismatch: '-' cannot operate on 'bool2', 'bool2'
type mismatch: '*' cannot operate on 'bool2', 'bool2'
type mismatch: '/' cannot operate on 'bool2', 'bool2'
type mismatch: '%' cannot operate on 'bool2', 'bool2'
type mismatch: '<<' cannot operate on 'bool2', 'bool2'
type mismatch: '>>' cannot operate on 'bool2', 'bool2'
'!' cannot operate on 'bool2'
'-' cannot operate on 'bool2'
'~' cannot operate on 'bool2'
type mismatch: '&' cannot operate on 'bool2', 'bool2'
type mismatch: '|' cannot operate on 'bool2', 'bool2'
type mismatch: '^' cannot operate on 'bool2', 'bool2'
*%%*/