summaryrefslogtreecommitdiffstats
path: root/tests/front-end
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-06-27 11:13:21 -0700
committerGitHub <noreply@github.com>2017-06-27 11:13:21 -0700
commit97f253189af41f117e2de17093904cbb45202d46 (patch)
tree5d58272d219064234c6e90d7271caef5e118a77d /tests/front-end
parent1716208fb62a7f0a8bbe55e597b582066cb51731 (diff)
parent31293d61d3ec80198eab2439ec937d7ba37f6722 (diff)
Merge pull request #46 from tfoleyNV/import-exported
Allow for re-export of an `import` declaration
Diffstat (limited to 'tests/front-end')
-rw-r--r--tests/front-end/import-exported-a.slang5
-rw-r--r--tests/front-end/import-exported-b.slang5
-rw-r--r--tests/front-end/import-exported.slang8
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/front-end/import-exported-a.slang b/tests/front-end/import-exported-a.slang
new file mode 100644
index 000000000..b624241e5
--- /dev/null
+++ b/tests/front-end/import-exported-a.slang
@@ -0,0 +1,5 @@
+//TEST_IGNORE_FILE:
+
+// This file imports other code, and re-exports it to clients of this module.
+
+__exported __import import_exported_b; \ No newline at end of file
diff --git a/tests/front-end/import-exported-b.slang b/tests/front-end/import-exported-b.slang
new file mode 100644
index 000000000..144f62060
--- /dev/null
+++ b/tests/front-end/import-exported-b.slang
@@ -0,0 +1,5 @@
+//TEST_IGNORE_FILE:
+
+// This file defines the code that will be (transitively) imported into `import-exported.slang`
+
+float foo(float x) { return x; } \ No newline at end of file
diff --git a/tests/front-end/import-exported.slang b/tests/front-end/import-exported.slang
new file mode 100644
index 000000000..7c2d911dd
--- /dev/null
+++ b/tests/front-end/import-exported.slang
@@ -0,0 +1,8 @@
+//TEST:SIMPLE:
+
+// Confirming that we can use a re-exported function
+
+// `a` imports `b` (which defines `foo`) and re-exports it
+__import import_exported_a;
+
+float bar(float x) { return foo(x); } \ No newline at end of file