aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/import_fragments.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/import_fragments.i')
-rw-r--r--Examples/test-suite/import_fragments.i18
1 files changed, 18 insertions, 0 deletions
diff --git a/Examples/test-suite/import_fragments.i b/Examples/test-suite/import_fragments.i
new file mode 100644
index 000000000..26b87cdb2
--- /dev/null
+++ b/Examples/test-suite/import_fragments.i
@@ -0,0 +1,18 @@
+%module import_fragments
+
+// Check %fragments forced inclusion does not result in code generation when using %import
+%import "import_fragments_a.i"
+
+%{
+template<typename T>
+struct TemplateA4 {};
+%}
+
+%template(TemplateA4Int) TemplateA4<int>;
+
+%inline %{
+int getImport4() {
+ // Requires the ImportA4 fragment to be generated in order to compile
+ return ImportA4;
+}
+%}