about summary refs log tree commit diff
path: root/tests/source
diff options
context:
space:
mode:
authorGaëtan Cassiers <gaetan.cassiers@gmail.com>2015-07-01 21:13:10 +0200
committerGaëtan Cassiers <gaetan.cassiers@gmail.com>2015-07-03 11:12:21 +0200
commit3de366d282de6de5dd1d69c40ea32f98a051fc66 (patch)
tree613436a1cacf9d061edeca905abd2c9ac9a20530 /tests/source
parent83290f15ada755a71f3cfc0c66c3631a66d6b461 (diff)
Format modules into separate files
Diffstat (limited to 'tests/source')
-rw-r--r--tests/source/mod-2.rs3
-rw-r--r--tests/source/nestedmod/mod.rs12
-rw-r--r--tests/source/nestedmod/mod2a.rs4
-rw-r--r--tests/source/nestedmod/mod2b.rs3
-rw-r--r--tests/source/nestedmod/mod2c.rs3
-rw-r--r--tests/source/nestedmod/submod2/a.rs6
-rw-r--r--tests/source/nestedmod/submod2/mod.rs5
7 files changed, 36 insertions, 0 deletions
diff --git a/tests/source/mod-2.rs b/tests/source/mod-2.rs
new file mode 100644
index 00000000000..75b560ce93f
--- /dev/null
+++ b/tests/source/mod-2.rs
@@ -0,0 +1,3 @@
+// Some nested mods
+
+mod nestedmod;
diff --git a/tests/source/nestedmod/mod.rs b/tests/source/nestedmod/mod.rs
new file mode 100644
index 00000000000..23dfa444257
--- /dev/null
+++ b/tests/source/nestedmod/mod.rs
@@ -0,0 +1,12 @@
+
+mod mod2a;
+mod mod2b;
+
+mod mymod1 {
+          use mod2a::{Foo,Bar};
+}
+
+#[path="mod2c.rs"]
+mod mymod2;
+
+mod submod2;
diff --git a/tests/source/nestedmod/mod2a.rs b/tests/source/nestedmod/mod2a.rs
new file mode 100644
index 00000000000..5df457a8316
--- /dev/null
+++ b/tests/source/nestedmod/mod2a.rs
@@ -0,0 +1,4 @@
+// This is an empty file containing only
+// comments
+
+// ...................
diff --git a/tests/source/nestedmod/mod2b.rs b/tests/source/nestedmod/mod2b.rs
new file mode 100644
index 00000000000..f128e2da6db
--- /dev/null
+++ b/tests/source/nestedmod/mod2b.rs
@@ -0,0 +1,3 @@
+
+#[path="mod2a.rs"]
+mod c;
diff --git a/tests/source/nestedmod/mod2c.rs b/tests/source/nestedmod/mod2c.rs
new file mode 100644
index 00000000000..eda6b233e4b
--- /dev/null
+++ b/tests/source/nestedmod/mod2c.rs
@@ -0,0 +1,3 @@
+// A standard mod
+
+fn a(   )     {}
diff --git a/tests/source/nestedmod/submod2/a.rs b/tests/source/nestedmod/submod2/a.rs
new file mode 100644
index 00000000000..0eaf08f0d2c
--- /dev/null
+++ b/tests/source/nestedmod/submod2/a.rs
@@ -0,0 +1,6 @@
+// Yet Another mod
+// Nested
+
+use c::a;
+
+fn foo(    ) {    }
diff --git a/tests/source/nestedmod/submod2/mod.rs b/tests/source/nestedmod/submod2/mod.rs
new file mode 100644
index 00000000000..52f8be91022
--- /dev/null
+++ b/tests/source/nestedmod/submod2/mod.rs
@@ -0,0 +1,5 @@
+// Another mod
+
+mod a;
+
+use a::a;