From 5b49974bd6ddd248b5ee1b1e29c0acfc3c422a3a Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Mon, 12 Jun 2017 12:42:17 -0700 Subject: Rename tests from `*.spire` to `*.slang` Many of the existing test cases were being skipped on accident, because their file names used `.spire` and the test tool was now looking for `.slang` --- tests/front-end/parser-decls.slang | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 tests/front-end/parser-decls.slang (limited to 'tests/front-end/parser-decls.slang') diff --git a/tests/front-end/parser-decls.slang b/tests/front-end/parser-decls.slang new file mode 100644 index 000000000..bc5a2b13b --- /dev/null +++ b/tests/front-end/parser-decls.slang @@ -0,0 +1,60 @@ +//TEST:SIMPLE: +// test that we can parse all the expected kinds of declarations + +// global-scope `using` is another test + +/* Note(tfoley): disabled during syntax transition +// pipeline +pipeline P +{ + +} +*/ + +// empty declaration +; + +// struct type +struct Pair +{ + int head; + float tail; + +// Note(tfoley): semicolon is expected/required +// here for compatibility with HLSL (C-style +// declarators). +// +// TODO: this could be removed if we treat +// HLSL as a "compatibility mode" +}; + +// function at global scope +float tail(Pair p) { return p.tail; } + +/* Note(tfoley): disabled during syntax transition + +// module +module M +{ + // component declarations + + // using declarations + +} + +// a module can "inherit" from a pipeline +module M2 + targets P +{ +} + +// shader +shader S +{ + // component declarations + + // using declarations + +} + +*/ \ No newline at end of file -- cgit v1.2.3