Changeset 13857


Ignore:
Timestamp:
Jan 23, 2013, 10:53:58 PM (8 years ago)
Author:
jordan
Message:

(libT) #1220 'change file and folder names': finish cleaning up the unit test for calling tr_torrentRenamePath() on an incomplete torrent with .part files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rename-test.c

    r13855 r13857  
    466466{
    467467  tr_file_index_t i;
    468   const tr_stat * st;
    469   tr_file_stat * fst;
    470468
    471469  for (i=0; i<tor->info.fileCount; ++i)
     
    494492      rv = stat (path, &sb);
    495493      assert (rv == 0);
    496       fprintf (stderr, "%s:%d file %s size is %zu\n", __FILE__, __LINE__, path, (size_t)sb.st_size);
    497494      tr_free (path);
    498495    }
     
    500497  sync ();
    501498  verify_and_block_until_done (tor);
    502   st = tr_torrentStat (tor);
    503 fprintf (stderr, "%s:%d leftUntilDone %zu\n", __FILE__, __LINE__, (size_t)st->leftUntilDone);
    504 fst = tr_torrentFiles (tor, NULL);
    505 for (i=0; i<3; ++i)
    506   fprintf (stderr, "%s:%d %d %zu\n", __FILE__, __LINE__, (int)i, (size_t)fst[i].bytesCompleted);
    507   assert (st->leftUntilDone == 0);
     499  assert (tr_torrentStat(tor)->leftUntilDone == 0);
    508500
    509501  if (incomplete)
     
    525517      sync ();
    526518      verify_and_block_until_done (tor);
    527       st = tr_torrentStat (tor);
    528       assert (st->leftUntilDone == tor->info.pieceSize);
    529 fprintf (stderr, "%s:%d leftUntilDone %zu\n", __FILE__, __LINE__, (size_t)st->leftUntilDone);
     519      assert (tr_torrentStat(tor)->leftUntilDone == tor->info.pieceSize);
    530520    }
    531521}
     
    602592{
    603593  int ret;
    604   const testFunc tests[] = { //test_single_filename_torrent,
    605                              //test_multifile_torrent,
     594  const testFunc tests[] = { test_single_filename_torrent,
     595                             test_multifile_torrent,
    606596                             test_partial_file };
    607 
    608   verbose = 1;
    609597
    610598  libtransmission_test_session_init ();
Note: See TracChangeset for help on using the changeset viewer.