Commit c16f3b87 authored by Scott Abbey's avatar Scott Abbey

Update tests

parent 786b09cb
......@@ -109,6 +109,7 @@ impl fmt::Display for Identifier {
#[cfg(test)]
mod tests {
use common::is_alpha_numeric;
use version;
use super::*;
......@@ -230,7 +231,7 @@ mod tests {
let parsed = version::parse(version).unwrap();
let expected_pre = Some(vec![Identifier::AlphaNumeric(String::from("pre"))]);
let expected_pre = vec![Identifier::AlphaNumeric(String::from("pre"))];
assert_eq!(expected_pre, parsed.pre);
}
......@@ -240,7 +241,7 @@ mod tests {
let parsed = version::parse(version).unwrap();
let expected_pre = Some(vec![Identifier::AlphaNumeric(String::from("alpha1"))]);
let expected_pre = vec![Identifier::AlphaNumeric(String::from("alpha1"))];
assert_eq!(expected_pre, parsed.pre);
}
......@@ -250,8 +251,8 @@ mod tests {
let parsed = version::parse(version).unwrap();
let expected_pre = Some(vec![Identifier::AlphaNumeric(String::from("pre")),
Identifier::Numeric(0)]);
let expected_pre = vec![Identifier::AlphaNumeric(String::from("pre")),
Identifier::Numeric(0)];
assert_eq!(expected_pre, parsed.pre);
}
......@@ -261,7 +262,7 @@ mod tests {
let parsed = version::parse(version).unwrap();
let expected_build = Some(vec![Identifier::AlphaNumeric(String::from("build"))]);
let expected_build = vec![Identifier::AlphaNumeric(String::from("build"))];
assert_eq!(expected_build, parsed.build);
}
......@@ -271,7 +272,7 @@ mod tests {
let parsed = version::parse(version).unwrap();
let expected_build = Some(vec![Identifier::AlphaNumeric(String::from("build5"))]);
let expected_build = vec![Identifier::AlphaNumeric(String::from("build5"))];
assert_eq!(expected_build, parsed.build);
}
......@@ -281,10 +282,10 @@ mod tests {
let parsed = version::parse(version).unwrap();
let expected_pre = Some(vec![Identifier::AlphaNumeric(String::from("alpha1"))]);
let expected_pre = vec![Identifier::AlphaNumeric(String::from("alpha1"))];
assert_eq!(expected_pre, parsed.pre);
let expected_build = Some(vec![Identifier::AlphaNumeric(String::from("build5"))]);
let expected_build = vec![Identifier::AlphaNumeric(String::from("build5"))];
assert_eq!(expected_build, parsed.build);
}
......@@ -294,14 +295,14 @@ mod tests {
let parsed = version::parse(version).unwrap();
let expected_pre = Some(vec![Identifier::Numeric(1),
Identifier::AlphaNumeric(String::from("alpha1")),
Identifier::Numeric(9)]);
let expected_pre = vec![Identifier::Numeric(1),
Identifier::AlphaNumeric(String::from("alpha1")),
Identifier::Numeric(9)];
assert_eq!(expected_pre, parsed.pre);
let expected_build = Some(vec![Identifier::AlphaNumeric(String::from("build5")),
Identifier::Numeric(7),
Identifier::AlphaNumeric(String::from("3aedf"))]);
let expected_build = vec![Identifier::AlphaNumeric(String::from("build5")),
Identifier::Numeric(7),
Identifier::AlphaNumeric(String::from("3aedf"))];
assert_eq!(expected_build, parsed.build);
}
......@@ -311,11 +312,11 @@ mod tests {
let parsed = version::parse(version).unwrap();
let expected_pre = Some(vec![Identifier::AlphaNumeric(String::from("beta")),
Identifier::Numeric(1)]);
let expected_pre = vec![Identifier::AlphaNumeric(String::from("beta")),
Identifier::Numeric(1)];
assert_eq!(expected_pre, parsed.pre);
let expected_build = Some(vec![Identifier::AlphaNumeric(String::from("0851523"))]);
let expected_build = vec![Identifier::AlphaNumeric(String::from("0851523"))];
assert_eq!(expected_build, parsed.build);
}
......@@ -329,7 +330,7 @@ mod tests {
assert_eq!(0, parsed.minor);
assert_eq!(0, parsed.patch);
let expected_pre = Some(vec![Identifier::AlphaNumeric(String::from("WIP"))]);
let expected_pre = vec![Identifier::AlphaNumeric(String::from("WIP"))];
assert_eq!(expected_pre, parsed.pre);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment