[vlc-commits] test: check VLC_VAR_GETSTEP result rather than HASSTEP flag

Rémi Denis-Courmont git at videolan.org
Sat Oct 22 11:14:46 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 22 11:25:53 2016 +0300| [7a7d863f64065bdda1f1db41b34848f47dae6217] | committer: Rémi Denis-Courmont

test: check VLC_VAR_GETSTEP result rather than HASSTEP flag

This matches what the UI code actually does. No code actually cares
about the HASSTEP flag.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a7d863f64065bdda1f1db41b34848f47dae6217
---

 test/src/misc/variables.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/src/misc/variables.c b/test/src/misc/variables.c
index 7a9f138..6d2d039 100644
--- a/test/src/misc/variables.c
+++ b/test/src/misc/variables.c
@@ -400,8 +400,10 @@ static void test_creation_and_type( libvlc_int_t *p_libvlc )
     var_Change( p_libvlc, "bla", VLC_VAR_SETMAX, &val, NULL );
     assert( var_Type( p_libvlc, "bla" ) == (VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND | VLC_VAR_HASMIN | VLC_VAR_HASMAX) );
 
+    assert( var_Change( p_libvlc, "bla" , VLC_VAR_GETSTEP, &val, NULL ) != 0 );
     var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, &val, NULL );
-    assert( var_Type( p_libvlc, "bla" ) == (VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND | VLC_VAR_HASMIN | VLC_VAR_HASMAX | VLC_VAR_HASSTEP) );
+    assert( var_Change( p_libvlc, "bla" , VLC_VAR_GETSTEP, &val, NULL ) == 0
+         && val.i_int == 4212 );
 
     var_Destroy( p_libvlc, "bla" );
     var_Destroy( p_libvlc, "bla" );



More information about the vlc-commits mailing list