And fixed the remaining kinks with testingprivOutbuf. Now we can add subtests! (Forgot to mention that the previous commit also simplified the indent logic and split the actual function to run a test into its own function; this in particular also contributes to subtests.)

This commit is contained in:
Pietro Gagliardi 2019-05-20 20:07:59 -04:00
parent 9f0bb3aacb
commit 4112630f59
3 changed files with 6 additions and 3 deletions

View File

@ -23,3 +23,4 @@ alphablending:
http://www.os2voice.org/vnewsarc/bn2007122.html
http://www.mozillazine.org/talkback.html?article=194
https://books.google.com/books?id=9cpU5uYCzq4C&pg=PA202&lpg=PA202&dq=%22OS/2%22+alphablending&source=bl&ots=uatEop2jAL&sig=HAa_ofQSKsk6-8tBR6YZ6MRJG_0&hl=en&sa=X&ved=0ahUKEwiDq5HukLbaAhUk8IMKHR7aCw4Q6AEIWTAI#v=onepage&q=%22OS%2F2%22%20alphablending&f=false
investigate eicons.dll

View File

@ -162,7 +162,7 @@ static void testingprivSetRun(testingSet *set, const testingOptions *options, te
testingprivArrayQsort(&(set->tests), testcmp);
t = (testingT *) (set->tests.buf);
for (i = 0; i < set->tests.len; i++) {
if (!testingprivTRun(t, options, outbuf))
if (testingprivTRun(t, options, outbuf) != 0)
*anyFailed = 1;
t++;
}
@ -196,6 +196,7 @@ void testingprivTLogvfFull(testingT *t, const char *file, long line, const char
// TODO extract filename from file
testingprivOutbufPrintf(t->outbuf, "%s:%ld: ", file, line);
testingprivOutbufPrintf(t->outbuf, format, ap);
testingprivOutbufPrintf(t->outbuf, "\n");
}
void testingTFail(testingT *t)

View File

@ -259,8 +259,9 @@ void testingprivOutbufAppendOutbuf(testingprivOutbuf *o, testingprivOutbuf *src)
*lineEnd = '\n';
lineStart = lineEnd + 1;
}
// print the last line
testingprivOutbufPrintf(o, " %s\n", lineStart);
// print the last line, if any
if (*lineStart != '\0')
testingprivOutbufPrintf(o, " %s\n", lineStart);
// restore src to its original state
if (hasTrailingBlankLine)