Changeset 13885
- Timestamp:
- Jan 27, 2013, 5:47:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/rename-test.c
r13879 r13885 40 40 } while (0) 41 41 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 54 42 static bool 55 43 testFileExistsAndConsistsOfThisString (const tr_torrent * tor, tr_file_index_t fileIndex, const char * str) … … 169 157 const size_t totalSize = 14; 170 158 tr_ctor * ctor; 159 const tr_stat * st; 171 160 172 161 /* this is a single-file torrent whose file is hello-world.txt, holding the string "hello, world!" */ … … 192 181 /* sanity check the stats again, now that we've added the file */ 193 182 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); 195 191 196 192 /** … … 294 290 char * tmp; 295 291 static const size_t totalSize = 67; 292 const tr_stat * st; 296 293 const tr_file * files; 297 294 const char * strings[4]; … … 338 335 /* sanity check the (full) stats */ 339 336 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 341 346 342 347 /**
Note: See TracChangeset
for help on using the changeset viewer.