aboutsummaryrefslogtreecommitdiff
path: root/tests/module/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/module/mod.rs')
-rw-r--r--tests/module/mod.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/module/mod.rs b/tests/module/mod.rs
new file mode 100644
index 0000000..0fe3e5b
--- /dev/null
+++ b/tests/module/mod.rs
@@ -0,0 +1,18 @@
+mod declaration {
+ use linkme::distributed_slice;
+
+ #[distributed_slice]
+ pub static SLICE: [i32] = [..];
+
+ #[test]
+ fn test_mod_slice() {
+ assert!(!SLICE.is_empty());
+ }
+}
+
+mod usage {
+ use linkme::distributed_slice;
+
+ #[distributed_slice(super::declaration::SLICE)]
+ pub static N: i32 = 9;
+}