Fixed borked tests
This commit is contained in:
parent
e5a8c325a6
commit
bc17954db9
1 changed files with 13 additions and 2 deletions
|
@ -375,7 +375,7 @@ impl Builder {
|
||||||
mod test {
|
mod test {
|
||||||
|
|
||||||
use storage::InternPath;
|
use storage::InternPath;
|
||||||
use tinyvec::TinyVec;
|
use tinyvec::tiny_vec;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -523,14 +523,17 @@ mod test {
|
||||||
let (collection, strings) = setup_test(Vec::from([
|
let (collection, strings) = setup_test(Vec::from([
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
album: Some("ISDN".to_owned()),
|
album: Some("ISDN".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
album: Some("Elysium".to_owned()),
|
album: Some("Elysium".to_owned()),
|
||||||
|
artists: vec!["Stratovarius".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
album: Some("Lifeforms".to_owned()),
|
album: Some("Lifeforms".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
]));
|
]));
|
||||||
|
@ -553,10 +556,12 @@ mod test {
|
||||||
let (collection, strings) = setup_test(Vec::from([
|
let (collection, strings) = setup_test(Vec::from([
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
album: Some("ISDN".to_owned()),
|
album: Some("ISDN".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
album: Some("Lifeforms".to_owned()),
|
album: Some("Lifeforms".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
]));
|
]));
|
||||||
|
@ -578,11 +583,13 @@ mod test {
|
||||||
let (collection, strings) = setup_test(Vec::from([
|
let (collection, strings) = setup_test(Vec::from([
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
album: Some("ISDN".to_owned()),
|
album: Some("ISDN".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
date_added: 2000,
|
date_added: 2000,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
album: Some("Lifeforms".to_owned()),
|
album: Some("Lifeforms".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
date_added: 400,
|
date_added: 400,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
|
@ -748,6 +755,7 @@ mod test {
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
virtual_path: album_path.join("Flak.mp3"),
|
virtual_path: album_path.join("Flak.mp3"),
|
||||||
title: Some("Flak".to_owned()),
|
title: Some("Flak".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
album: Some("Lifeforms".to_owned()),
|
album: Some("Lifeforms".to_owned()),
|
||||||
disc_number: Some(1),
|
disc_number: Some(1),
|
||||||
track_number: Some(3),
|
track_number: Some(3),
|
||||||
|
@ -756,6 +764,7 @@ mod test {
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
virtual_path: album_path.join("Cascade.mp3"),
|
virtual_path: album_path.join("Cascade.mp3"),
|
||||||
title: Some("Cascade".to_owned()),
|
title: Some("Cascade".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
album: Some("Lifeforms".to_owned()),
|
album: Some("Lifeforms".to_owned()),
|
||||||
disc_number: Some(1),
|
disc_number: Some(1),
|
||||||
track_number: Some(1),
|
track_number: Some(1),
|
||||||
|
@ -764,6 +773,7 @@ mod test {
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
virtual_path: album_path.join("Domain.mp3"),
|
virtual_path: album_path.join("Domain.mp3"),
|
||||||
title: Some("Domain".to_owned()),
|
title: Some("Domain".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
album: Some("Lifeforms".to_owned()),
|
album: Some("Lifeforms".to_owned()),
|
||||||
disc_number: Some(2),
|
disc_number: Some(2),
|
||||||
track_number: Some(1),
|
track_number: Some(1),
|
||||||
|
@ -772,6 +782,7 @@ mod test {
|
||||||
scanner::Song {
|
scanner::Song {
|
||||||
virtual_path: album_path.join("Interstat.mp3"),
|
virtual_path: album_path.join("Interstat.mp3"),
|
||||||
title: Some("Interstat".to_owned()),
|
title: Some("Interstat".to_owned()),
|
||||||
|
artists: vec!["FSOL".to_owned()],
|
||||||
album: Some("Lifeforms".to_owned()),
|
album: Some("Lifeforms".to_owned()),
|
||||||
disc_number: Some(2),
|
disc_number: Some(2),
|
||||||
track_number: Some(3),
|
track_number: Some(3),
|
||||||
|
@ -782,7 +793,7 @@ mod test {
|
||||||
let album = collection.get_album(
|
let album = collection.get_album(
|
||||||
&strings,
|
&strings,
|
||||||
AlbumKey {
|
AlbumKey {
|
||||||
artists: TinyVec::new(),
|
artists: tiny_vec![strings.get("FSOL").unwrap()],
|
||||||
name: strings.get("Lifeforms").unwrap(),
|
name: strings.get("Lifeforms").unwrap(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue