Skip to content

Commit

Permalink
feat(test): add non-empty test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanaasagi committed Jul 29, 2023
1 parent 6a5afde commit 162d4de
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
extern crate machine_uid;
use machine_uid;

#[test]
fn test_get() {
let id = machine_uid::get().unwrap();
for _ in 1..100 {
let id2 = machine_uid::get().unwrap();
assert_eq!(id, id2);
}
let id = machine_uid::get().unwrap();
for _ in 1..100 {
let id2 = machine_uid::get().unwrap();
assert_eq!(id, id2);
}
}

#[test]
fn test_not_empty() {
let id = machine_uid::get().unwrap();
assert_ne!(id, String::new());
}

0 comments on commit 162d4de

Please sign in to comment.