diff options
Diffstat (limited to 'test/chmap.c')
-rw-r--r-- | test/chmap.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/chmap.c b/test/chmap.c index 4bd4ba7b58..365c15be52 100644 --- a/test/chmap.c +++ b/test/chmap.c @@ -4,24 +4,15 @@ static void test_mp_chmap_diff(void **state) { struct mp_chmap a; struct mp_chmap b; - struct mp_chmap diff; mp_chmap_from_str(&a, bstr0("3.1")); mp_chmap_from_str(&b, bstr0("2.1")); - mp_chmap_diff(&a, &b, &diff); - assert_int_equal(diff.num, 1); - assert_int_equal(diff.speaker[0], MP_SPEAKER_ID_FC); + assert_int_equal(mp_chmap_diffn(&a, &b), 1); mp_chmap_from_str(&b, bstr0("6.1(back)")); - mp_chmap_diff(&a, &b, &diff); - assert_int_equal(diff.num, 0); - - mp_chmap_diff(&b, &a, &diff); - assert_int_equal(diff.num, 3); - assert_int_equal(diff.speaker[0], MP_SPEAKER_ID_BL); - assert_int_equal(diff.speaker[1], MP_SPEAKER_ID_BR); - assert_int_equal(diff.speaker[2], MP_SPEAKER_ID_BC); + assert_int_equal(mp_chmap_diffn(&a, &b), 0); + assert_int_equal(mp_chmap_diffn(&b, &a), 3); } int main(void) { |