More initmain.c integration. I think we're now complete to what it used to be for that one file. Now I have to figure out how to readd subtests...
This commit is contained in:
parent
7bb67c3e46
commit
8b400f33f7
|
@ -52,6 +52,7 @@ TODO if I remove the uiQuit() from this test on Windows, I will occasionally get
|
|||
=== RUN TestQueueMain_DifferentThread
|
||||
../test/initmain.c:161: uiMain() timed out (5s)
|
||||
--- FAIL: TestQueueMain_DifferentThread (4.9989539s)
|
||||
TODO see if this is still relevant
|
||||
*/
|
||||
static void queued(void *data)
|
||||
{
|
||||
|
@ -111,7 +112,6 @@ static void queueOrder(struct testParams *p)
|
|||
uiQueueMain(done, NULL);
|
||||
}
|
||||
|
||||
// TODO also actually handle file and line again
|
||||
static void checkOrderFull(const char *file, long line, uint32_t flag)
|
||||
{
|
||||
int i;
|
||||
|
@ -120,12 +120,12 @@ static void checkOrderFull(const char *file, long line, uint32_t flag)
|
|||
return;
|
||||
for (i = 1; i < 6; i++)
|
||||
if (flag == orders[i].result) {
|
||||
TestErrorf("wrong order:" diff("%" PRIu32 " (%s)"),
|
||||
TestErrorfFull(file, line, "wrong order:" diff("%" PRIu32 " (%s)"),
|
||||
flag, orders[i].order,
|
||||
orders[0].result, orders[0].order);
|
||||
return;
|
||||
}
|
||||
TestErrorf("wrong result:" diff("%" PRIu32 " (%s)"),
|
||||
TestErrorfFull(file, line, "wrong result:" diff("%" PRIu32 " (%s)"),
|
||||
flag, "unknown order",
|
||||
orders[0].result, orders[0].order);
|
||||
}
|
||||
|
|
|
@ -71,13 +71,20 @@ extern void TestSkipNow(void);
|
|||
|
||||
#define TestLogf(...) \
|
||||
(testingprivLogfFullThen(stdout, NULL, __FILE__, __LINE__, __VA_ARGS__))
|
||||
#define TestLogfFull(f, n, ...) \
|
||||
(testingprivLogfFullThen(stdout, NULL, f, n, __VA_ARGS__))
|
||||
#define TestErrorf(...) \
|
||||
(testingprivLogfFullThen(stderr, TestFail, __FILE__, __LINE__, __VA_ARGS__))
|
||||
#define TestErrorfFull(f, n, ...) \
|
||||
(testingprivLogfFullThen(stderr, TestFail, f, n, __VA_ARGS__))
|
||||
#define TestFatalf(...) \
|
||||
(testingprivLogfFullThen(stderr, TestFailNow, __FILE__, __LINE__, __VA_ARGS__))
|
||||
#define TestFatalfFull(f, n, ...) \
|
||||
(testingprivLogfFullThen(stderr, TestFailNow, f, n, __VA_ARGS__))
|
||||
// TODO remember if this needs to go to stdout or to stderr
|
||||
#define TestSkipf(...) \
|
||||
(testingprivLogfFullThen(stderr, TestSkipNow, __FILE__, __LINE__, __VA_ARGS__))
|
||||
// TODO TestSkipfFull (after resolving above TODO)
|
||||
|
||||
extern void testingprivRegisterTest(const char *name, void (*f)(void));
|
||||
#include "../sharedbits/printfwarn_header.h"
|
||||
|
|
Loading…
Reference in New Issue