mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-13 14:12:31 +00:00
Add tests for encoder methods
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
This commit is contained in:
parent
03a3122c36
commit
68ff71c889
1 changed files with 11 additions and 0 deletions
11
tests/io.rs
11
tests/io.rs
|
@ -59,6 +59,9 @@ macro_rules! add_tags {
|
|||
println!("Setting composer");
|
||||
tag.set_composer("Serial-ATA1");
|
||||
|
||||
println!("Setting encoder");
|
||||
tag.set_encoder("Lofty");
|
||||
|
||||
println!("Setting album title");
|
||||
tag.set_album_title("foo album title");
|
||||
|
||||
|
@ -148,6 +151,9 @@ macro_rules! verify_write {
|
|||
println!("Verifying genre");
|
||||
assert_eq!(tag.genre(), Some("Country"));
|
||||
|
||||
println!("Verifying encoder");
|
||||
assert_eq!(tag.encoder(), Some("Lofty"));
|
||||
|
||||
println!("Verifying album title");
|
||||
assert_eq!(tag.album_title(), Some("foo album title"));
|
||||
|
||||
|
@ -265,6 +271,11 @@ macro_rules! remove_tags {
|
|||
assert!(tag.bpm().is_none());
|
||||
tag.remove_bpm();
|
||||
|
||||
println!("Removing encoder");
|
||||
tag.remove_encoder();
|
||||
assert!(tag.encoder().is_none());
|
||||
tag.remove_encoder();
|
||||
|
||||
println!("Removing album title");
|
||||
tag.remove_album_title();
|
||||
assert!(tag.album_title().is_none());
|
||||
|
|
Loading…
Reference in a new issue