Commit 039a2f6a authored by Gordon McShane's avatar Gordon McShane Committed by Harris Hancock

Accommodate MSVC's noncompliant preprocessor

parent c05fb412
......@@ -62,10 +62,11 @@ private:
void KJ_UNIQUE_NAME(TestCase)::run()
#if _MSC_VER
#define KJ_INDIRECT_EXPAND(m, vargs) m vargs
#define KJ_FAIL_EXPECT(...) \
KJ_EXPAND(KJ_LOG(ERROR, __VA_ARGS__));
KJ_INDIRECT_EXPAND(KJ_LOG, (ERROR , __VA_ARGS__));
#define KJ_EXPECT(cond, ...) \
if (cond); else KJ_EXPAND(KJ_FAIL_EXPECT("failed: expected " #cond, __VA_ARGS__))
if (cond); else KJ_INDIRECT_EXPAND(KJ_FAIL_EXPECT, ("failed: expected " #cond , __VA_ARGS__))
#else
#define KJ_FAIL_EXPECT(...) \
KJ_LOG(ERROR, ##__VA_ARGS__);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment