Compare commits
6 Commits
main
...
v0.4.4-52-
| Author | SHA1 | Date | |
|---|---|---|---|
|
7c1b3a437f
|
|||
|
3d1e360c4d
|
|||
|
6df220ad73
|
|||
|
ff1c7c9a59
|
|||
|
4459d89eab
|
|||
|
a28de5a712
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -104,7 +104,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icarus_meta"
|
||||
version = "0.4.5"
|
||||
version = "0.4.4"
|
||||
dependencies = [
|
||||
"imghdr",
|
||||
"infer",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "icarus_meta"
|
||||
version = "0.4.5"
|
||||
version = "0.4.4"
|
||||
edition = "2024"
|
||||
rust-version = "1.90"
|
||||
|
||||
|
||||
@@ -43,25 +43,16 @@ mod tests {
|
||||
match test_util::util::file_exists(&dir, &filename) {
|
||||
Ok(_) => {
|
||||
let filepath = test_util::util::get_full_path(&dir, &filename).unwrap();
|
||||
let new_filepath = test_util::util::generate_newfilepath(&dir).unwrap();
|
||||
match super::get_duration(&filepath) {
|
||||
Ok(duration) => {
|
||||
let song_duration: u64 = 41;
|
||||
let fetched_song_duration = duration.as_secs();
|
||||
|
||||
match test_util::util::copy_file(&filepath, &new_filepath) {
|
||||
Ok(_) => match super::get_duration(&new_filepath) {
|
||||
Ok(duration) => {
|
||||
test_util::util::remove_file(&new_filepath).unwrap();
|
||||
|
||||
let song_duration: u64 = 41;
|
||||
let fetched_song_duration = duration.as_secs();
|
||||
|
||||
assert_eq!(
|
||||
song_duration, fetched_song_duration,
|
||||
"Durations should match, but they don't {song_duration} {fetched_song_duration} ({duration:?})"
|
||||
);
|
||||
}
|
||||
Err(err) => {
|
||||
assert!(false, "Error: {err:?}");
|
||||
}
|
||||
},
|
||||
assert_eq!(
|
||||
song_duration, fetched_song_duration,
|
||||
"Durations should match, but they don't {song_duration} {fetched_song_duration} ({duration:?})"
|
||||
);
|
||||
}
|
||||
Err(err) => {
|
||||
assert!(false, "Error: {err:?}");
|
||||
}
|
||||
@@ -84,10 +75,8 @@ mod tests {
|
||||
let new_filepath = test_util::util::generate_newfilepath(&dir).unwrap();
|
||||
|
||||
match test_util::util::copy_file(&filepath, &new_filepath) {
|
||||
Ok(_) => match super::get_song_properties(&new_filepath) {
|
||||
Ok(_) => match super::get_song_properties(&filepath) {
|
||||
Ok(song_properties) => {
|
||||
test_util::util::remove_file(&new_filepath).unwrap();
|
||||
|
||||
let song_duration: u64 = 41;
|
||||
let bitrate: u32 = 1;
|
||||
let overall_bitrate: u32 = 3;
|
||||
|
||||
Reference in New Issue
Block a user