[vlc-commits] tests: add more dictionary tests

Francois Cartegnie git at videolan.org
Sun Apr 23 15:45:45 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Apr 23 15:38:53 2017 +0200| [988702c60ce6ed9e38f43f0e9c74641240d6b8f2] | committer: Francois Cartegnie

tests: add more dictionary tests

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

 src/test/dictionary.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/test/dictionary.c b/src/test/dictionary.c
index f56b28c5f0..2e686e4859 100644
--- a/src/test/dictionary.c
+++ b/src/test/dictionary.c
@@ -82,7 +82,12 @@ int main (void)
 
     /* Insert some values */
     for( i = 0; i < size; i++ )
+    {
         vlc_dictionary_insert( &dict, our_keys[i], (void *)i );
+        assert( vlc_dictionary_has_key(&dict, our_keys[i]) );
+        for( int j = i + 1; j < size; j++ )
+            assert( !vlc_dictionary_has_key(&dict, our_keys[j]) );
+    }
 
     test_dictionary_validity( &dict, our_keys, size );
 



More information about the vlc-commits mailing list