Commit 02cb736e authored by Scott Abbey's avatar Scott Abbey

Add tests

parent fd4fd04c
......@@ -19,3 +19,19 @@ pub fn parse_version(version: &str) -> Version {
patch: captures.at(3).unwrap().parse().unwrap(),
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn parse_version_core_01() {
let version = "1.2.3";
let parsed = parse_version(version);
assert_eq!(1, parsed.major);
assert_eq!(2, parsed.minor);
assert_eq!(3, parsed.patch);
}
}
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