summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/syntax-error-intrinsic.slang
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-02-02 17:45:56 -0500
committerGitHub <noreply@github.com>2021-02-02 14:45:56 -0800
commit17d2b2492d42e54ea4e0d907b4d84aa17f4a6f33 (patch)
treebdcc4b0aba860139a011ca052e505b9202c6152c /tests/diagnostics/syntax-error-intrinsic.slang
parent5d755e584ff6c241f42204430e005b26314ed594 (diff)
Downstream compiler line number test (#1682)
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP diagnostics for line number output. * Small param naming change * Use x macro for pass through compile human name lookup/getting. * WIP on parsing downstream compiler output. * Split out parsing into ParseDiagnosticUtil. Added test result of single line. * Dump out the std output on fail to parse diagnostics. * Change test type for syntax-error-intrinsic.slang be TEST not TEST_DIAGNOSTIC
Diffstat (limited to 'tests/diagnostics/syntax-error-intrinsic.slang')
-rw-r--r--tests/diagnostics/syntax-error-intrinsic.slang20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/diagnostics/syntax-error-intrinsic.slang b/tests/diagnostics/syntax-error-intrinsic.slang
new file mode 100644
index 000000000..dde54b2ad
--- /dev/null
+++ b/tests/diagnostics/syntax-error-intrinsic.slang
@@ -0,0 +1,20 @@
+// 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
+// those tests are made.
+
+//TEST:SIMPLE_LINE:-entry computeMain -target spirv
+//TEST:SIMPLE_LINE:-entry computeMain -target dxil -profile cs_6_0
+//TEST:SIMPLE_LINE:-entry computeMain -target dxbc
+//TEST:SIMPLE_LINE:-entry computeMain -target dll
+//TEST:SIMPLE_LINE:-entry computeMain -target ptx
+
+[shader("compute")]
+[numthreads(4, 1, 1)]
+void computeMain()
+{
+ // Will output what downstream compilers will output as a syntax
+ // error.
+ __SyntaxError();
+} \ No newline at end of file