mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Allow calling EXPECT on templates/list-initializers
Templates and list initializers may contain commas without surrounding parenthesis, causing them to be passed as multiple macro arguments.
This commit is contained in:
committed by
Andrew Kaster
parent
f0bcb07ff7
commit
84e73c7f5f
@@ -132,9 +132,9 @@ bool assume(T const& expression, StringView expression_string, SourceLocation lo
|
||||
|
||||
}
|
||||
|
||||
#define EXPECT(x) \
|
||||
do { \
|
||||
::Test::expect(x, #x##sv); \
|
||||
#define EXPECT(...) \
|
||||
do { \
|
||||
::Test::expect(__VA_ARGS__, #__VA_ARGS__##sv); \
|
||||
} while (false)
|
||||
|
||||
#define EXPECT_EQ(a, b) \
|
||||
|
||||
Reference in New Issue
Block a user