/* We do not count the extra expected check in the display */
int nb_ok = nb - err;
int nb_total = nb;
- Pmsg0(-1, "==== Report ====\n");
+ Pmsg0(-1, "\n==== Report ====\n");
/* Do an extra check if the expected variable is set */
if (expected > 0) {
is(nb, expected, "Checking expected tests number");
}
- Pmsg2(-1, "Result %i/%i OK\n", nb_ok, nb_total);
+ Pmsg3(-1, "Result %i/%i OK%s\n", nb_ok, nb_total, (err > 0) ? "!!!":"");
return err > 0;
}
for (;;) {
maxlen = this->max_size() - 1;
va_start(arg_ptr, fmt);
- bvsnprintf(this->c_str(), maxlen, fmt, arg_ptr);
- len = strlen(this->c_str());
+ len = bvsnprintf(this->c_str(), maxlen, fmt, arg_ptr);
va_end(arg_ptr);
- if (len >= (maxlen - 5)) { // Was truncated, need to resize
+ if (len < 0 || len >= (maxlen - 5)) {
this->realloc_pm(maxlen + maxlen/2);
continue;
}