Exemple #1
0
int main(int argc, const char* argv[])
{
    if (argc != 2)
    {
        usage(argv[0]);
        return 1;
    }

    if (!test_write(argv[1]))
    {
        return 1;
    }
    
    if (!test_read(argv[1]))
    {
        return 1;
    }

    if (!test_modify(argv[1]))
    {
        return 1;
    }

    return 0;
}
Exemple #2
0
CLIP_DLLEXPORT int
_clip_store(ClipMachine * ClipMachineMemory, int dim, int byref)
{
   ClipVar *map = 0;

   long hash = 0;

   ClipVar *vp = clip_fetch(ClipMachineMemory, dim, 0, 1, &map, &hash);

   if (!vp)
      return 1;

   if (map)
      test_modify(ClipMachineMemory, map, hash);

   if (byref == 2)
   {
      _clip_destroy(ClipMachineMemory, vp);
      CLEAR_CLIPVAR(ClipMachineMemory->fp->ClipVar_sp_of_ClipFrame);
      ClipMachineMemory->fp->ClipVar_sp_of_ClipFrame++;
      CLIP_CHECK_STACK;
   }
   else if (byref == 1)
      _clip_refassign(ClipMachineMemory, vp, 1);
   else
      _clip_assign(ClipMachineMemory, vp);
   return 0;
}
Exemple #3
0
static gint
test_file (const gchar *filename)
{
  GBookmarkFile *bookmark_file;
  gboolean success;

  g_return_val_if_fail (filename != NULL, 1);

  g_print ("checking GBookmarkFile...\n");

  bookmark_file = g_bookmark_file_new ();
  g_assert (bookmark_file != NULL);

  success = test_load (bookmark_file, filename);
  
  if (success)
    {
      success = test_query (bookmark_file);
      success = test_modify (bookmark_file);
    }

  g_bookmark_file_free (bookmark_file);

  g_print ("ok\n");

  return (success == TRUE ? 0 : 1);
}
Exemple #4
0
int main(int argc, char *argv[])
{
    printf("test_init...\n");
    test_init();

    printf("test_bits...\n");
    test_bits();

    printf("test_clear...\n");
    test_clear();

    printf("test_modify...\n");
    test_modify();

    printf("test_xor...\n");
    test_xor();

    printf("done.\n");
    return 0;
}