diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-22 01:02:34 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-22 01:02:34 +0200 |
commit | 28b87e4d9c60b49d46b03a19b7b83e23e222087a (patch) | |
tree | 1f0a71ca09f04eac51fdabf2e8cfabc87a6e02a3 /c/test.cpp | |
parent | 801c10f07d1c92e1b1b89d8a30cb0cf86745de31 (diff) | |
download | EpisodeBrowser-28b87e4d9c60b49d46b03a19b7b83e23e222087a.tar.gz |
Handle exceptions in fetching thread.
Diffstat (limited to 'c/test.cpp')
-rw-r--r-- | c/test.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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(); } }; |