libgnomevfs2-mythtv/tests/main.c
branchtrunk
changeset 848 37e112f474db
parent 753 8ee634511c1e
     1.1 --- a/libgnomevfs2-mythtv/tests/main.c	Thu Jun 14 18:22:32 2007 +0100
     1.2 +++ b/libgnomevfs2-mythtv/tests/main.c	Tue Sep 18 13:53:38 2007 +0100
     1.3 @@ -6,46 +6,46 @@
     1.4  static void
     1.5  assert_message(gboolean valid, const gchar * message)
     1.6  {
     1.7 -  if (!valid)
     1.8 -	{
     1.9 -	  g_warning(message);
    1.10 -	  exit(1);
    1.11 -	}
    1.12 +    if (!valid) {
    1.13 +        g_warning(message);
    1.14 +        exit(1);
    1.15 +    }
    1.16  }
    1.17  
    1.18  int
    1.19  main(int argc, char **argv)
    1.20  {
    1.21 -  GnomeVFSResult result;
    1.22 -  GnomeVFSFileSize read;
    1.23 -  gchar buff[512];
    1.24 -  GnomeVFSHandle *handle = NULL;
    1.25 +    GnomeVFSResult  result;
    1.26 +    GnomeVFSFileSize read;
    1.27 +    gchar           buff[512];
    1.28 +    GnomeVFSHandle *handle = NULL;
    1.29  
    1.30  
    1.31 -  g_assert(argc == 2);
    1.32 +    g_assert(argc == 2);
    1.33  
    1.34 -  gnome_vfs_init();
    1.35 +    gnome_vfs_init();
    1.36  
    1.37 -  g_debug("Oppening: %s", argv[1]);
    1.38 +    g_debug("Oppening: %s", argv[1]);
    1.39  
    1.40 -  result = gnome_vfs_open(&handle, argv[1], GNOME_VFS_OPEN_READ);
    1.41 -  assert_message(result == GNOME_VFS_OK, gnome_vfs_result_to_string(result));
    1.42 +    result = gnome_vfs_open(&handle, argv[1], GNOME_VFS_OPEN_READ);
    1.43 +    assert_message(result == GNOME_VFS_OK,
    1.44 +                   gnome_vfs_result_to_string(result));
    1.45  
    1.46 -  g_debug("handle %p", handle);
    1.47 +    g_debug("handle %p", handle);
    1.48  
    1.49 -  while (result == GNOME_VFS_OK)
    1.50 -	{
    1.51 -	  memset(buff, '\0', sizeof(buff));
    1.52 -	  result = gnome_vfs_read(handle, buff, sizeof(buff), &read);
    1.53 -	  g_debug("read %" G_GINT64_FORMAT, read);
    1.54 -	}
    1.55 +    while (result == GNOME_VFS_OK) {
    1.56 +        memset(buff, '\0', sizeof(buff));
    1.57 +        result = gnome_vfs_read(handle, buff, sizeof(buff), &read);
    1.58 +        g_debug("read %" G_GINT64_FORMAT, read);
    1.59 +    }
    1.60  
    1.61 -  assert_message(result == GNOME_VFS_ERROR_EOF,
    1.62 -				 gnome_vfs_result_to_string(result));
    1.63 +    assert_message(result == GNOME_VFS_ERROR_EOF,
    1.64 +                   gnome_vfs_result_to_string(result));
    1.65  
    1.66 -  result = gnome_vfs_close(handle);
    1.67 -  assert_message(result == GNOME_VFS_OK, gnome_vfs_result_to_string(result));
    1.68 +    result = gnome_vfs_close(handle);
    1.69 +    assert_message(result == GNOME_VFS_OK,
    1.70 +                   gnome_vfs_result_to_string(result));
    1.71  
    1.72 -  g_debug("OK");
    1.73 -  return 0;
    1.74 +    g_debug("OK");
    1.75 +    return 0;
    1.76  }