SHARE
TWEET

Nova maneira de rodar os testes

brandizzi Oct 10th, 2011 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int RunAllTests(void) { // Retorna int ao invés de void
  2.     CuString *output = CuStringNew();
  3.     CuSuite* suite = CuSuiteNew();
  4.     CuSuiteAddSuite(suite, test_project_suite());
  5.     // ... mais coisas aqui
  6.     CuSuiteRun(suite);
  7.     CuSuiteSummary(suite, output);
  8.     CuSuiteDetails(suite, output);
  9.     printf("%s\n", output->buffer);
  10.     CuStringDelete(output);
  11.     CuSuiteDelete(suite);
  12.     return suite->failCount; // Retorna contagem de erros
  13. }
  14. int main(void) {
  15.     return RunAllTests(); // Retorna contagem
  16. }
  17.  
RAW Paste Data
Top