fail_unless!(*deq.get(3) == d);
}
- #[deriving_eq]
+ #[deriving(Eq)]
enum Taggy { One(int), Two(int, int), Three(int, int, int), }
- #[deriving_eq]
+ #[deriving(Eq)]
enum Taggypar<T> {
Onepar(int), Twopar(int, int), Threepar(int, int, int),
}
- #[deriving_eq]
+ #[deriving(Eq)]
struct RecCy {
x: int,
y: int,
use core::str;
use core::vec;
-#[deriving_eq]
+#[deriving(Eq)]
pub enum Name {
Long(~str),
Short(char),
}
-#[deriving_eq]
+#[deriving(Eq)]
pub enum HasArg { Yes, No, Maybe, }
-#[deriving_eq]
+#[deriving(Eq)]
pub enum Occur { Req, Optional, Multi, }
/// A description of a possible option
-#[deriving_eq]
+#[deriving(Eq)]
pub struct Opt {
name: Name,
hasarg: HasArg,
return Opt {name: mkname(name), hasarg: Yes, occur: Multi};
}
-#[deriving_eq]
+#[deriving(Eq)]
enum Optval { Val(~str), Given, }
/**
* The result of checking command line arguments. Contains a vector
* of matches and a vector of free strings.
*/
-#[deriving_eq]
+#[deriving(Eq)]
pub struct Matches {
opts: ~[Opt],
vals: ~[~[Optval]],
* The type returned when the command line does not conform to the
* expected format. Pass this value to <fail_str> to get an error message.
*/
-#[deriving_eq]
+#[deriving(Eq)]
pub enum Fail_ {
ArgumentMissing(~str),
UnrecognizedOption(~str),
_ => Some::<~str>(str::from_slice(def)) }
}
-#[deriving_eq]
+#[deriving(Eq)]
pub enum FailType {
ArgumentMissing_,
UnrecognizedOption_,
/** one group of options, e.g., both -h and --help, along with
* their shared description and properties
*/
- #[deriving_eq]
+ #[deriving(Eq)]
pub struct OptGroup {
short_name: ~str,
long_name: ~str,
either::Left(test_opts)
}
-#[deriving_eq]
+#[deriving(Eq)]
pub struct BenchSamples {
ns_iter_samples: ~[f64],
mb_s: uint
}
-#[deriving_eq]
+#[deriving(Eq)]
pub enum TestResult { TrOk, TrFailed, TrIgnored, TrBench(BenchSamples) }
struct ConsoleTestState {