summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/diagnostics/syntax-error-intrinsic.slang17
-rw-r--r--tests/diagnostics/syntax-error-intrinsic.slang.expected1
-rw-r--r--tests/diagnostics/syntax-error-op-line-2.slang27
-rw-r--r--tests/diagnostics/syntax-error-op-line-2.slang.expected1
-rw-r--r--tests/diagnostics/syntax-error-op-line-3.slang32
-rw-r--r--tests/diagnostics/syntax-error-op-line-3.slang.expected1
-rw-r--r--tests/diagnostics/syntax-error-op-line.slang19
-rw-r--r--tests/diagnostics/syntax-error-op-line.slang.expected1
8 files changed, 49 insertions, 50 deletions
diff --git a/tests/diagnostics/syntax-error-intrinsic.slang b/tests/diagnostics/syntax-error-intrinsic.slang
index f369c22d5..695edfd0e 100644
--- a/tests/diagnostics/syntax-error-intrinsic.slang
+++ b/tests/diagnostics/syntax-error-intrinsic.slang
@@ -1,20 +1,21 @@
// syntax-error-intrinsic.slang
// NOTE! That although this is a 'diagnostic' like test, it tests using downstream compiler
-// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that
+// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that
// those tests are made.
-//TEST:SIMPLE_LINE:-entry computeMain -target spirv -emit-spirv-via-glsl
-//TEST:SIMPLE_LINE:-entry computeMain -target dxil -profile cs_6_0
-//TEST:SIMPLE_LINE:-entry computeMain -target dxbc
-//TEST:SIMPLE_LINE:-entry computeMain -target shader-dll
-//TEST:SIMPLE_LINE:-entry computeMain -target ptx
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target spirv -emit-spirv-via-glsl
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxil -profile cs_6_0
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxbc
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target shader-dll
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target ptx
[shader("compute")]
[numthreads(4, 1, 1)]
void computeMain()
{
- // Will output what downstream compilers will output as a syntax
+ // Will output what downstream compilers will output as a syntax
// error.
+ //CHK:([[#@LINE+1]]): error
__SyntaxError();
-} \ No newline at end of file
+}
diff --git a/tests/diagnostics/syntax-error-intrinsic.slang.expected b/tests/diagnostics/syntax-error-intrinsic.slang.expected
deleted file mode 100644
index d6b24041c..000000000
--- a/tests/diagnostics/syntax-error-intrinsic.slang.expected
+++ /dev/null
@@ -1 +0,0 @@
-19
diff --git a/tests/diagnostics/syntax-error-op-line-2.slang b/tests/diagnostics/syntax-error-op-line-2.slang
index 097349424..294b8809f 100644
--- a/tests/diagnostics/syntax-error-op-line-2.slang
+++ b/tests/diagnostics/syntax-error-op-line-2.slang
@@ -1,24 +1,25 @@
// syntax-error-op-line-2.slang
// NOTE! That although this is a 'diagnostic' like test, it tests using downstream compiler
-// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that
+// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that
// those tests are made.
-//TEST:SIMPLE_LINE:-entry computeMain -target spirv -emit-spirv-via-glsl
-//TEST:SIMPLE_LINE:-entry computeMain -target dxil -profile cs_6_0
-//TEST:SIMPLE_LINE:-entry computeMain -target dxbc
-//TEST:SIMPLE_LINE:-entry computeMain -target shader-dll
-//TEST:SIMPLE_LINE:-entry computeMain -target ptx
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target spirv -emit-spirv-via-glsl
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxil -profile cs_6_0
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxbc
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target shader-dll
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target ptx
-// Here the thing being checked is error reporting around return, and +=
+// Here the thing being checked is error reporting around return, and +=
int doSomething(int a)
{
a += a;
-
- return a
- +=
+
+ return a
+ +=
__SyntaxError();
+ //CHK:([[#@LINE-1]]): error
}
[shader("compute")]
@@ -26,8 +27,8 @@ int doSomething(int a)
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
int id = int(dispatchThreadID.x);
-
+
int v = int(dispatchThreadID.y);
-
+
v += doSomething(id);
-} \ No newline at end of file
+}
diff --git a/tests/diagnostics/syntax-error-op-line-2.slang.expected b/tests/diagnostics/syntax-error-op-line-2.slang.expected
deleted file mode 100644
index aabe6ec39..000000000
--- a/tests/diagnostics/syntax-error-op-line-2.slang.expected
+++ /dev/null
@@ -1 +0,0 @@
-21
diff --git a/tests/diagnostics/syntax-error-op-line-3.slang b/tests/diagnostics/syntax-error-op-line-3.slang
index 51b2bded7..248df721d 100644
--- a/tests/diagnostics/syntax-error-op-line-3.slang
+++ b/tests/diagnostics/syntax-error-op-line-3.slang
@@ -1,27 +1,27 @@
// syntax-error-op-line-3.slang
// NOTE! That although this is a 'diagnostic' like test, it tests using downstream compiler
-// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that
+// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that
// those tests are made.
-//TEST:SIMPLE_LINE:-entry computeMain -target spirv -emit-spirv-via-glsl
-//TEST:SIMPLE_LINE:-entry computeMain -target dxil -profile cs_6_0
-//TEST:SIMPLE_LINE:-entry computeMain -target dxbc
-//TEST:SIMPLE_LINE:-entry computeMain -target shader-dll
-//TEST:SIMPLE_LINE:-entry computeMain -target ptx
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target spirv -emit-spirv-via-glsl
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxil -profile cs_6_0
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxbc
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target shader-dll
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target ptx
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
RWStructuredBuffer<int> outputBuffer;
-// Here the thing being checked is error reporting around return, and +=
+// Here the thing being checked is error reporting around return, and +=
[__unsafeForceInlineEarly]
int doSomething(int a)
{
a += a;
-
- return a
- +=
+
+ return a
+ +=
__SyntaxError();
}
@@ -30,12 +30,12 @@ int doSomething(int a)
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
int id = int(dispatchThreadID.x);
-
+
int v = int(dispatchThreadID.y);
-
-
-
+
+
+ //CHK:([[#@LINE+1]]): error
v += doSomething(id);
-
+
outputBuffer[id] = v;
-} \ No newline at end of file
+}
diff --git a/tests/diagnostics/syntax-error-op-line-3.slang.expected b/tests/diagnostics/syntax-error-op-line-3.slang.expected
deleted file mode 100644
index e522732c7..000000000
--- a/tests/diagnostics/syntax-error-op-line-3.slang.expected
+++ /dev/null
@@ -1 +0,0 @@
-38
diff --git a/tests/diagnostics/syntax-error-op-line.slang b/tests/diagnostics/syntax-error-op-line.slang
index 5459575c9..00c91aeb5 100644
--- a/tests/diagnostics/syntax-error-op-line.slang
+++ b/tests/diagnostics/syntax-error-op-line.slang
@@ -1,22 +1,23 @@
// syntax-error-op-line.slang
// NOTE! That although this is a 'diagnostic' like test, it tests using downstream compiler
-// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that
+// the downstream compiler being present is a requirement, so we mark as a 'TEST' so that
// those tests are made.
-//TEST:SIMPLE_LINE:-entry computeMain -target spirv -emit-spirv-via-glsl
-//TEST:SIMPLE_LINE:-entry computeMain -target dxil -profile cs_6_0
-//TEST:SIMPLE_LINE:-entry computeMain -target dxbc
-//TEST:SIMPLE_LINE:-entry computeMain -target shader-dll
-//TEST:SIMPLE_LINE:-entry computeMain -target ptx
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target spirv -emit-spirv-via-glsl
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxil -profile cs_6_0
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target dxbc
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target shader-dll
+//TEST:SIMPLE(filecheck=CHK):-entry computeMain -target ptx
[shader("compute")]
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
int id = int(dispatchThreadID.x);
-
+
int v = int(dispatchThreadID.y);
-
+
+ //CHK:([[#@LINE+1]]): error
v += id + __SyntaxError();
-} \ No newline at end of file
+}
diff --git a/tests/diagnostics/syntax-error-op-line.slang.expected b/tests/diagnostics/syntax-error-op-line.slang.expected
deleted file mode 100644
index aabe6ec39..000000000
--- a/tests/diagnostics/syntax-error-op-line.slang.expected
+++ /dev/null
@@ -1 +0,0 @@
-21