summaryrefslogtreecommitdiff
path: root/tests/diagnostics/bad-operator-call.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-08-14 16:23:19 -0700
committerGitHub <noreply@github.com>2023-08-14 16:23:19 -0700
commit661d6198bbb9857d3fdc6df477e0742ed0b0765c (patch)
tree974a57cfa2e43624e91502e9e652a0cc78105b3a /tests/diagnostics/bad-operator-call.slang
parent0403e0556b470f6b316153caea2dc6f5c314da5b (diff)
Support per field matrix layout (#3101)
* Support per field matrix layout * Fix warnings. * Fix. * Fix tests. * Fix spiv gen. * Fix. * More test fixes. * Fix. * Run only GPU tests on self-hosted servers. * Remove -use-glsl-matrix-layout-modifier. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/diagnostics/bad-operator-call.slang')
-rw-r--r--tests/diagnostics/bad-operator-call.slang26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/diagnostics/bad-operator-call.slang b/tests/diagnostics/bad-operator-call.slang
index 1455d1cc3..2764d27ae 100644
--- a/tests/diagnostics/bad-operator-call.slang
+++ b/tests/diagnostics/bad-operator-call.slang
@@ -1,6 +1,6 @@
// bad-operator-call.slang
-//DIAGNOSTIC_TEST(windows):SIMPLE:
+//DIAGNOSTIC_TEST(windows):SIMPLE(filecheck=CHECK):
// Test that bad calls to operators produce reasonable diagnostic messages.
@@ -13,22 +13,22 @@ struct S {}
void test()
{
int a;
- S b;
-
- a += b;
-
- a = a + b;
-
+ S b;
+ // CHECK:{{.*}}.slang(18): error {{.*}}: no overload for '+=' applicable to arguments of type (int, S)
+ a += b;
+ // CHECK:{{.*}}.slang(20): error {{.*}}: no overload for '+' applicable to arguments of type (int, S)
+ a = a + b;
+ // CHECK:{{.*}}.slang(22): error {{.*}}: no overload for '~' applicable to arguments of type (S)
a = ~b;
vector<int, 4> c;
- vector<float, 3> d;
-
+ vector<float, 3> d;
+ // CHECK:{{.*}}.slang(27): error {{.*}}: argument passed to parameter '0' must be l-value.
a += c;
- c = a + c;
-
- d += c;
-
+ c = a + c;
+ // CHECK:{{.*}}.slang(31): error {{.*}}: no overload for '+=' applicable to arguments of type (vector<float,3>, vector<int,4>)
+ d += c;
+ // CHECK:{{.*}}.slang(33): error {{.*}}: no overload for '+' applicable to arguments of type (vector<int,4>, vector<float,3>)
d = c + d;
} \ No newline at end of file