for( i = 0; i < i_var_count; i++ )
assert( var_GetBool( p_libvlc, psz_var_name[i] ) == var_value[i].b_bool );
+ for( i = 0; i < i_var_count; i++ )
+ var_ToggleBool( p_libvlc, psz_var_name[i] );
+
+ for( i = 0; i < i_var_count; i++ )
+ assert( var_GetBool( p_libvlc, psz_var_name[i] ) != var_value[i].b_bool );
+
for( i = 0; i < i_var_count; i++ )
var_Destroy( p_libvlc, psz_var_name[i] );
}
static void test_creation_and_type( libvlc_int_t *p_libvlc )
{
- int i_type;
vlc_value_t val;
val.i_int = 4212;
assert( var_Create( p_libvlc, "bla", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE ) == VLC_SUCCESS );
assert( var_Type( p_libvlc, "bla" ) == (VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND | VLC_VAR_HASMAX | VLC_VAR_HASSTEP | VLC_VAR_HASCHOICE) );
+ var_Destroy( p_libvlc, "bla" );
+ var_Destroy( p_libvlc, "bla" );
+ var_Destroy( p_libvlc, "bla" );
+ assert( var_Get( p_libvlc, "bla", &val ) == VLC_ENOVAR );
}
static void test_variables( libvlc_instance_t *p_vlc )
test_init();
log( "Testing the core variables\n" );
- libvlc_exception_init( &ex );
- p_vlc = libvlc_new( test_defaults_nargs, test_defaults_args, &ex );
- catch();
+ p_vlc = libvlc_new( test_defaults_nargs, test_defaults_args );
+ assert( p_vlc != NULL );
test_variables( p_vlc );