]> git.sesse.net Git - vlc/blobdiff - src/test/dictionary.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / src / test / dictionary.c
index 749d4e8d638a56d78afecf5c36f1df3994c4e49d..7cc3ed387b4bca8ac7e7d3f2aef05adbe8c7fc5d 100644 (file)
@@ -1,3 +1,4 @@
+
 /*****************************************************************************
  * dictionary.c: Tests for vlc_dictionary_t
  *****************************************************************************
@@ -26,7 +27,7 @@
 #undef NDEBUG
 #include <assert.h>
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include "vlc_arrays.h"
 
 #include <stdio.h>
@@ -36,7 +37,7 @@ static void test_dictionary_validity (vlc_dictionary_t * p_dict, const char ** o
 {
     /* Test values and keys now */
     char ** keys = vlc_dictionary_all_keys( p_dict );
-    int i, j;
+    intptr_t i, j;
 
     assert( keys );
 
@@ -57,7 +58,7 @@ static void test_dictionary_validity (vlc_dictionary_t * p_dict, const char ** o
     free( keys );
 
     for( i = 0; i < size; i++ )
-        assert( vlc_dictionary_value_for_key( p_dict, our_keys[i] ) == (void*)i );
+        assert( vlc_dictionary_value_for_key( p_dict, our_keys[i] ) == (void *)i );
 }
 
 int main (void)
@@ -67,7 +68,7 @@ int main (void)
     };
     const int size = sizeof(our_keys)/sizeof(our_keys[0]);
     char ** keys;
-    int i = 0;
+    intptr_t i = 0;
 
     vlc_dictionary_t dict;
     vlc_dictionary_init( &dict, 0 );
@@ -81,15 +82,15 @@ int main (void)
 
     /* Insert some values */
     for( i = 0; i < size; i++ )
-        vlc_dictionary_insert( &dict, our_keys[i], (void*)i );
+        vlc_dictionary_insert( &dict, our_keys[i], (void *)i );
 
     test_dictionary_validity( &dict, our_keys, size );
 
-    vlc_dictionary_remove_value_for_key( &dict, our_keys[size-1] );
+    vlc_dictionary_remove_value_for_key( &dict, our_keys[size-1], NULL, NULL );
 
     test_dictionary_validity( &dict, our_keys, size-1 );
-    
-    vlc_dictionary_clear( &dict );
+
+    vlc_dictionary_clear( &dict, NULL, NULL );
 
     assert( vlc_dictionary_keys_count( &dict ) == 0 );
     return 0;