]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/trie-test.c
tableprinter: update of some FIXME
[libucw.git] / ucw / trie-test.c
index cb9058c4629e6b496d0a1553b0a38874dff3788e..9114fe92cd61ffc6826e7357b90d40dd8aed2a83 100644 (file)
@@ -9,8 +9,8 @@
 
 #undef LOCAL_DEBUG
 
 
 #undef LOCAL_DEBUG
 
-#include "ucw/lib.h"
-#include "ucw/getopt.h"
+#include <ucw/lib.h>
+#include <ucw/getopt.h>
 
 #include <stdlib.h>
 #include <string.h>
 
 #include <stdlib.h>
 #include <string.h>
@@ -26,7 +26,7 @@
 #ifdef LOCAL_DEBUG
 #define TRIE_TRACE
 #endif
 #ifdef LOCAL_DEBUG
 #define TRIE_TRACE
 #endif
-#include "ucw/trie.h"
+#include <ucw/trie.h>
 
 static void
 basic_test(void)
 
 static void
 basic_test(void)
@@ -55,7 +55,7 @@ basic_test(void)
 #ifdef LOCAL_DEBUG
 #define TRIE_TRACE
 #endif
 #ifdef LOCAL_DEBUG
 #define TRIE_TRACE
 #endif
-#include "ucw/trie.h"
+#include <ucw/trie.h>
 
 static void
 dynamic_test(void)
 
 static void
 dynamic_test(void)
@@ -86,19 +86,19 @@ dynamic_test(void)
 #ifdef LOCAL_DEBUG
 #define TRIE_TRACE
 #endif
 #ifdef LOCAL_DEBUG
 #define TRIE_TRACE
 #endif
-#include "ucw/trie.h"
+#include <ucw/trie.h>
 
 #define MAX_STRINGS 200
 
 
 #define MAX_STRINGS 200
 
-static uns count;
+static uint count;
 static char *str[MAX_STRINGS];
 
 static char *
 gen_string(void)
 {
 static char *str[MAX_STRINGS];
 
 static char *
 gen_string(void)
 {
-  uns l = random_max(11);
+  uint l = random_max(11);
   char *s = xmalloc(l + 1);
   char *s = xmalloc(l + 1);
-  for (uns i = 0; i < l; i++)
+  for (uint i = 0; i < l; i++)
     s[i] = random_max('z' - 'a') + 'a';
   s[l] = 0;
   return s;
     s[i] = random_max('z' - 'a') + 'a';
   s[l] = 0;
   return s;
@@ -110,7 +110,7 @@ gen_unique_string(void)
   char *s;
 again:
   s = gen_string();
   char *s;
 again:
   s = gen_string();
-  for (uns i = 0; i < count; i++)
+  for (uint i = 0; i < count; i++)
     if (!strcmp(s, str[i]))
       {
        xfree(s);
     if (!strcmp(s, str[i]))
       {
        xfree(s);
@@ -136,7 +136,7 @@ delete(void)
 {
   if (!count)
     return;
 {
   if (!count)
     return;
-  uns i = random_max(count);
+  uint i = random_max(count);
   DBG("remove '%s'", str[i]);
   random_remove(str[i]);
   random_audit();
   DBG("remove '%s'", str[i]);
   random_remove(str[i]);
   random_audit();
@@ -157,7 +157,7 @@ find(void)
     }
   else
     {
     }
   else
     {
-      uns i = random_max(count);
+      uint i = random_max(count);
       DBG("positive find '%s'", str[i]);
       if (random_find(str[i]) != str[i])
        ASSERT(0);
       DBG("positive find '%s'", str[i]);
       if (random_find(str[i]) != str[i])
        ASSERT(0);
@@ -169,7 +169,7 @@ reset(void)
 {
   DBG("reset");
   random_cleanup();
 {
   DBG("reset");
   random_cleanup();
-  for (uns i = 0; i < count; i++)
+  for (uint i = 0; i < count; i++)
     xfree(str[i]);
   count = 0;
   random_init();
     xfree(str[i]);
   count = 0;
   random_init();
@@ -180,7 +180,7 @@ static void
 random_test(void)
 {
   random_init();
 random_test(void)
 {
   random_init();
-  for (uns i = 0; i < 10000; i++)
+  for (uint i = 0; i < 10000; i++)
     {
       int r = random_max(1000);
       if ((r -= 300) < 0)
     {
       int r = random_max(1000);
       if ((r -= 300) < 0)