Skip to content

Commit

Permalink
proper tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lordofwizard committed Oct 17, 2024
1 parent d809429 commit 4d2a6a2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,16 @@ mod tests {
let version = latest_java_version();
assert_eq!(version, "23");
}

#[test]
fn test_latest_java_version_failed() {
let version = latest_java_version();
assert_ne!(version, "unknown");
}
#[test]
fn test_version_is_int() {
let version = latest_java_version();
let version = version.parse::<u32>();
assert!(version.is_ok());
}
}

0 comments on commit 4d2a6a2

Please sign in to comment.