/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
fprintf(stderr, " UNIT %s: %s (%s)\n", unit->name, unit->title, (unit->enabled ? "enabled" : "disabled"));
fprintf(stderr, " UNIT %s: %s (%s)\n", unit->name, unit->title, (unit->enabled ? "enabled" : "disabled"));
xbt_dynar_foreach(unit->tests, it_test, test)
xbt_test_test_dump(test);
xbt_dynar_foreach(unit->tests, it_test, test)
xbt_test_test_dump(test);
fprintf(stderr, "TESTSUITE %s: %s (%s)\n", suite->name, suite->title, suite->enabled ? "enabled" : "disabled");
fprintf(stderr, "TESTSUITE %s: %s (%s)\n", suite->name, suite->title, suite->enabled ? "enabled" : "disabled");
xbt_dynar_foreach(suite->units, it_unit, unit)
xbt_test_unit_dump(unit);
xbt_dynar_foreach(suite->units, it_unit, unit)
xbt_test_unit_dump(unit);
snprintf(suite_title + 40 - (suite_len + 4) / 2, 81 - (40 - (suite_len + 4) / 2), "[ %s ]", suite->title);
suite_title[40 + (suite_len + 5) / 2] = '=';
snprintf(suite_title + 40 - (suite_len + 4) / 2, 81 - (40 - (suite_len + 4) / 2), "[ %s ]", suite->title);
suite_title[40 + (suite_len + 5) / 2] = '=';
snprintf(suite_title + 70, 11, " DISABLED ");
fprintf(stderr, "\n%s\n", suite_title);
snprintf(suite_title + 70, 11, " DISABLED ");
fprintf(stderr, "\n%s\n", suite_title);
- cp = bprintf(" Unit: %s ......................................"
- "......................................", unit->title);
+ char* cp = bprintf(" Unit: %s ......................................"
+ "......................................",
+ unit->title);
fprintf(stderr, ".... skip\n"); /* shouldn't happen, but I'm a bit lost with this logic */
}
xbt_dynar_foreach(unit->tests, it_test, test) {
fprintf(stderr, ".... skip\n"); /* shouldn't happen, but I'm a bit lost with this logic */
}
xbt_dynar_foreach(unit->tests, it_test, test) {
- file = (test->file != nullptr ? test->file : unit->file);
- line = (test->line != 0 ? test->line : unit->line);
+ const char* file = (test->file != nullptr ? test->file : unit->file);
+ int line = (test->line != 0 ? test->line : unit->line);
}
fprintf(stderr, " %s: %s [%s:%d]\n", resname, test->title, file, line);
}
fprintf(stderr, " %s: %s [%s:%d]\n", resname, test->title, file, line);
xbt_dynar_foreach(test->logs, it_log, log) {
file = (log->file != nullptr ? log->file : file);
line = (log->line != 0 ? log->line : line);
xbt_dynar_foreach(test->logs, it_log, log) {
file = (log->file != nullptr ? log->file : file);
line = (log->line != 0 ? log->line : line);
fprintf(stderr, " disabled\n"); /* no test were run */
} else if (unit->nb_tests) {
fprintf(stderr, "...... ok\n"); /* successful */
fprintf(stderr, " disabled\n"); /* no test were run */
} else if (unit->nb_tests) {
fprintf(stderr, "...... ok\n"); /* successful */
fprintf(stderr," =====================================================================%s\n",
(suite->nb_units ? (suite->unit_failed ? "== FAILED" : "====== OK") :
(suite->unit_disabled ? " DISABLED" : "==== SKIP")));
fprintf(stderr," =====================================================================%s\n",
(suite->nb_units ? (suite->unit_failed ? "== FAILED" : "====== OK") :
(suite->unit_disabled ? " DISABLED" : "==== SKIP")));
return;
/*printf("Test selection: %s\n", selection); */
/* First apply the selection */
return;
/*printf("Test selection: %s\n", selection); */
/* First apply the selection */
xbt_assert(unitname[0] == '\0', "The 'all' pseudo-suite does not accept any unit specification\n");
xbt_dynar_foreach(_xbt_test_suites, it_suite, suite) {
xbt_assert(unitname[0] == '\0', "The 'all' pseudo-suite does not accept any unit specification\n");
xbt_dynar_foreach(_xbt_test_suites, it_suite, suite) {
for (it = 0; it < xbt_dynar_length(_xbt_test_suites); it++) {
xbt_test_suite_t thissuite =
xbt_dynar_get_as(_xbt_test_suites, it, xbt_test_suite_t);
for (it = 0; it < xbt_dynar_length(_xbt_test_suites); it++) {
xbt_test_suite_t thissuite =
xbt_dynar_get_as(_xbt_test_suites, it, xbt_test_suite_t);
/* Do not disable the whole suite when we just want to disable a child */
if (enabling || (unitname[0] == '\0'))
thissuite->enabled = enabling;
/* Do not disable the whole suite when we just want to disable a child */
if (enabling || (unitname[0] == '\0'))
thissuite->enabled = enabling;
it2_unit < xbt_dynar_length(thissuite->units);
it2_unit++) {
xbt_test_unit_t thisunit = xbt_dynar_get_as(thissuite->units, it2_unit, xbt_test_unit_t);
it2_unit < xbt_dynar_length(thissuite->units);
it2_unit++) {
xbt_test_unit_t thisunit = xbt_dynar_get_as(thissuite->units, it2_unit, xbt_test_unit_t);