Commit e382819e288f79bad512805598ffa622b24958fc
Fix combining TEST() parameters in stic
Remove trailing commas from IF() and REPEAT(), otherwise expansion of
__VA_ARGS__ ends up has adjacent commas which is an invalid syntax.
Those commas thus aren't actually needed as commas from the argument
list will be preserved.
Author: xaizek
Author date (UTC): 2026-02-15 15:29
Committer name: xaizek
Committer date (UTC): 2026-03-06 13:22
Parent(s): f38316820001750fcd75e7df50c99b8e69e24716
Signing key: 99DC5E4DB05F6BE2
Tree: 35b3d1c374b3a98df077cf57fa52cc3c1821c0f5
| File src/stic.h changed (mode: 100644) (index 12ba03c..62d329c) |
| ... |
... |
struct stic_test_data |
| 183 |
183 |
|
|
| 184 |
184 |
#ifdef STIC_C99 |
#ifdef STIC_C99 |
| 185 |
185 |
|
|
| 186 |
|
# define IF(...) .p = __VA_ARGS__, |
|
|
186 |
|
# define IF(...) .p = __VA_ARGS__ |
| 187 |
187 |
|
|
| 188 |
188 |
/* Specifies number of times to repeat the test as an integer (1 by default). */ |
/* Specifies number of times to repeat the test as an integer (1 by default). */ |
| 189 |
|
# define REPEAT(...) .C = 1, .c = (__VA_ARGS__), |
|
|
189 |
|
# define REPEAT(...) .C = 1, .c = (__VA_ARGS__) |
| 190 |
190 |
|
|
| 191 |
191 |
/* Iteration number of the test (0..<repeat number - 1>) or 0. To be used only |
/* Iteration number of the test (0..<repeat number - 1>) or 0. To be used only |
| 192 |
192 |
* in test body. */ |
* in test body. */ |