about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-14 22:37:13 -0700
committerbors <bors@rust-lang.org>2013-06-14 22:37:13 -0700
commitc83bceddbb497464f8e4e1990f7518b009cd61ca (patch)
tree2a42d3da27ac3e20f6d9507aa184ac199a3f055b /src/test
parent1ba6fa477743bf6b8340b6d83987f1e243a509ae (diff)
parent8431e609ea47ff7a396888233baf23159c620dca (diff)
downloadrust-c83bceddbb497464f8e4e1990f7518b009cd61ca.tar.gz
rust-c83bceddbb497464f8e4e1990f7518b009cd61ca.zip
auto merge of #7121 : huonw/rust/rand-call, r=pnkfelix
r? @pnkfelix
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/deriving-global.rs41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/test/run-pass/deriving-global.rs b/src/test/run-pass/deriving-global.rs
new file mode 100644
index 00000000000..3d5bacee71c
--- /dev/null
+++ b/src/test/run-pass/deriving-global.rs
@@ -0,0 +1,41 @@
+// xfail-test #7103 `extern mod` does not work on windows
+
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern mod extra; // {En,De}codable
+mod submod {
+    // if any of these are implemented without global calls for any
+    // function calls, then being in a submodule will (correctly)
+    // cause errors about unrecognised module `std` (or `extra`)
+    #[deriving(Eq, Ord, TotalEq, TotalOrd,
+               IterBytes,
+               Clone, DeepClone,
+               ToStr, Rand,
+               Encodable, Decodable)]
+    enum A { A1(uint), A2(int) }
+
+    #[deriving(Eq, Ord, TotalEq, TotalOrd,
+               IterBytes,
+               Clone, DeepClone,
+               ToStr, Rand,
+               Encodable, Decodable)]
+    struct B { x: uint, y: int }
+
+    #[deriving(Eq, Ord, TotalEq, TotalOrd,
+               IterBytes,
+               Clone, DeepClone,
+               ToStr, Rand,
+               Encodable, Decodable)]
+    struct C(uint, int);
+
+}
+
+fn main() {}