aboutsummaryrefslogtreecommitdiff
path: root/c/test.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-22 01:02:34 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-22 01:02:34 +0200
commit28b87e4d9c60b49d46b03a19b7b83e23e222087a (patch)
tree1f0a71ca09f04eac51fdabf2e8cfabc87a6e02a3 /c/test.cpp
parent801c10f07d1c92e1b1b89d8a30cb0cf86745de31 (diff)
downloadEpisodeBrowser-28b87e4d9c60b49d46b03a19b7b83e23e222087a.tar.gz
Handle exceptions in fetching thread.
Diffstat (limited to 'c/test.cpp')
-rw-r--r--c/test.cpp6
1 files changed, 2 insertions, 4 deletions
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();
}
};