From 28b87e4d9c60b49d46b03a19b7b83e23e222087a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 22 Aug 2022 01:02:34 +0200 Subject: Handle exceptions in fetching thread. --- c/test.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'c/test.cpp') diff --git a/c/test.cpp b/c/test.cpp index d784367..7d6b3ed 100644 --- a/c/test.cpp +++ b/c/test.cpp @@ -16,9 +16,7 @@ struct Test Test(const char* name) : name(name) {} }; -#define CAT(a, b) a##b -#define APPLY(a, ...) a(__VA_ARGS__) -#define TESTS struct APPLY(CAT, tests_, __COUNTER__) +#define TESTS struct UNUSED #define TEST(id) }; struct id : public Test { id() : Test(#id) #define FAIL(...) do { Sprintf(error, __VA_ARGS__); return; } while (0) @@ -226,7 +224,7 @@ TESTS TEST(Fetch) { bool bDone = false; - std::thread{FetchData, &bDone}.detach(); + std::thread{WaitFetchData, &bDone}.detach(); } }; -- cgit v1.2.3