mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 03:25:13 +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:
parent
f0bcb07ff7
commit
84e73c7f5f
Notes:
github-actions[bot]
2024-11-25 06:05:44 +00:00
Author: https://github.com/yyny Commit: https://github.com/LadybirdBrowser/ladybird/commit/84e73c7f5f6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2559 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 3 additions and 3 deletions
|
@ -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) \
|
||||
|
|
Loading…
Add table
Reference in a new issue