Skip to content

Commit 93130e5

Browse files
committed
Tests: Update TagLib MP4 tests for recent changes
1 parent 93d00d0 commit 93130e5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/taglib/test_mp4.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ fn test_freeform() {
157157
name: Cow::Borrowed("iTunNORM"),
158158
}));
159159

160-
f.ilst_mut().unwrap().insert_atom(Atom::new(
160+
f.ilst_mut().unwrap().insert(Atom::new(
161161
AtomIdent::Freeform {
162162
mean: Cow::Borrowed("org.kde.TagLib"),
163163
name: Cow::Borrowed("Foo"),
@@ -177,7 +177,7 @@ fn test_freeform() {
177177
assert_eq!(
178178
f.ilst()
179179
.unwrap()
180-
.atom(&AtomIdent::Freeform {
180+
.get(&AtomIdent::Freeform {
181181
mean: Cow::Borrowed("org.kde.TagLib"),
182182
name: Cow::Borrowed("Foo"),
183183
})
@@ -200,7 +200,7 @@ fn test_save_existing_when_ilst_is_last() {
200200

201201
let ilst = f.ilst_mut().unwrap();
202202
assert_eq!(
203-
ilst.atom(&AtomIdent::Freeform {
203+
ilst.get(&AtomIdent::Freeform {
204204
mean: Cow::Borrowed("com.apple.iTunes"),
205205
name: Cow::Borrowed("replaygain_track_minmax"),
206206
})
@@ -220,7 +220,7 @@ fn test_save_existing_when_ilst_is_last() {
220220
let ilst = f.ilst().unwrap();
221221

222222
assert_eq!(
223-
ilst.atom(&AtomIdent::Freeform {
223+
ilst.get(&AtomIdent::Freeform {
224224
mean: Cow::Borrowed("com.apple.iTunes"),
225225
name: Cow::Borrowed("replaygain_track_minmax"),
226226
})
@@ -252,7 +252,7 @@ fn test_covr_read() {
252252
let f = Mp4File::read_from(&mut file, ParseOptions::new()).unwrap();
253253
let tag = f.ilst().unwrap();
254254
assert!(tag.contains(&AtomIdent::Fourcc(*b"covr")));
255-
let mut covrs = tag.atom(&AtomIdent::Fourcc(*b"covr")).unwrap().data();
255+
let mut covrs = tag.get(&AtomIdent::Fourcc(*b"covr")).unwrap().data();
256256
let Some(AtomData::Picture(picture1)) = covrs.next() else {
257257
unreachable!()
258258
};
@@ -291,7 +291,7 @@ fn test_covr_write() {
291291
let tag = f.ilst().unwrap();
292292
assert!(tag.contains(&AtomIdent::Fourcc(*b"covr")));
293293

294-
let mut covrs = tag.atom(&AtomIdent::Fourcc(*b"covr")).unwrap().data();
294+
let mut covrs = tag.get(&AtomIdent::Fourcc(*b"covr")).unwrap().data();
295295
let Some(AtomData::Picture(picture1)) = covrs.next() else {
296296
unreachable!()
297297
};
@@ -318,7 +318,7 @@ fn test_covr_read2() {
318318
let f = Mp4File::read_from(&mut file, ParseOptions::new()).unwrap();
319319
let tag = f.ilst().unwrap();
320320
assert!(tag.contains(&AtomIdent::Fourcc(*b"covr")));
321-
let mut covrs = tag.atom(&AtomIdent::Fourcc(*b"covr")).unwrap().data();
321+
let mut covrs = tag.get(&AtomIdent::Fourcc(*b"covr")).unwrap().data();
322322
let Some(AtomData::Picture(picture1)) = covrs.next() else {
323323
unreachable!()
324324
};
@@ -456,7 +456,7 @@ fn test_non_full_meta_atom() {
456456

457457
let tag = f.ilst().unwrap();
458458
assert!(tag.contains(&AtomIdent::Fourcc(*b"covr")));
459-
let mut covrs = tag.atom(&AtomIdent::Fourcc(*b"covr")).unwrap().data();
459+
let mut covrs = tag.get(&AtomIdent::Fourcc(*b"covr")).unwrap().data();
460460
let Some(AtomData::Picture(picture1)) = covrs.next() else {
461461
unreachable!()
462462
};
@@ -472,7 +472,7 @@ fn test_non_full_meta_atom() {
472472

473473
assert_eq!(tag.artist().as_deref(), Some("Test Artist!!!!"));
474474
assert_eq!(
475-
tag.atom(&AtomIdent::Fourcc(*b"\xa9too"))
475+
tag.get(&AtomIdent::Fourcc(*b"\xa9too"))
476476
.unwrap()
477477
.data()
478478
.next()

0 commit comments

Comments
 (0)