Changeset 13885


Ignore:
Timestamp:
Jan 27, 2013, 5:47:38 PM (8 years ago)
Author:
jordan
Message:

(libT) tweaks to rename-test to give better line numbers on failure in Jenkins

File:
1 edited

Legend:

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

    r13879 r13885  
    4040  } while (0)
    4141
    42 #define check_have_all(tor, totalSize) \
    43   do { \
    44     const tr_stat * st = tr_torrentStat(tor); \
    45     check_int_eq (TR_STATUS_STOPPED, st->activity); \
    46     check_int_eq (TR_STAT_OK, st->error); \
    47     check_int_eq (0, st->leftUntilDone); \
    48     check_int_eq (0, st->haveUnchecked); \
    49     check_int_eq (0, st->desiredAvailable); \
    50     check_int_eq (totalSize, st->sizeWhenDone); \
    51     check_int_eq (totalSize, st->haveValid); \
    52   } while (0)
    53 
    5442static bool
    5543testFileExistsAndConsistsOfThisString (const tr_torrent * tor, tr_file_index_t fileIndex, const char * str)
     
    169157  const size_t totalSize = 14;
    170158  tr_ctor * ctor;
     159  const tr_stat * st;
    171160
    172161  /* this is a single-file torrent whose file is hello-world.txt, holding the string "hello, world!" */
     
    192181  /* sanity check the stats again, now that we've added the file */
    193182  verify_and_block_until_done (tor);
    194   check_have_all (tor, totalSize);
     183  st = tr_torrentStat (tor);
     184  check_int_eq (TR_STATUS_STOPPED, st->activity);
     185  check_int_eq (TR_STAT_OK, st->error);
     186  check_int_eq (0, st->leftUntilDone);
     187  check_int_eq (0, st->haveUnchecked);
     188  check_int_eq (0, st->desiredAvailable);
     189  check_int_eq (totalSize, st->sizeWhenDone);
     190  check_int_eq (totalSize, st->haveValid);
    195191
    196192  /**
     
    294290  char * tmp;
    295291  static const size_t totalSize = 67;
     292  const tr_stat * st;
    296293  const tr_file * files;
    297294  const char * strings[4];
     
    338335  /* sanity check the (full) stats */
    339336  verify_and_block_until_done (tor);
    340   check_have_all (tor, totalSize);
     337  st = tr_torrentStat (tor);
     338  check_int_eq (TR_STATUS_STOPPED, st->activity);
     339  check_int_eq (TR_STAT_OK, st->error);
     340  check_int_eq (0, st->leftUntilDone);
     341  check_int_eq (0, st->haveUnchecked);
     342  check_int_eq (0, st->desiredAvailable);
     343  check_int_eq (totalSize, st->sizeWhenDone);
     344  check_int_eq (totalSize, st->haveValid);
     345
    341346
    342347  /**
Note: See TracChangeset for help on using the changeset viewer.