summaryrefslogtreecommitdiff
path: root/libmisc/tests/test_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmisc/tests/test_macro.c')
-rw-r--r--libmisc/tests/test_macro.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmisc/tests/test_macro.c b/libmisc/tests/test_macro.c
index 6810005..95a9f32 100644
--- a/libmisc/tests/test_macro.c
+++ b/libmisc/tests/test_macro.c
@@ -23,6 +23,7 @@
/** XUNDER is 0 through `OVER` inclusive. */
#define XOVER XUNDER X(OVER)
+#ifndef __LIBMISC_ENHANCED_CPP__
static char *without_spaces(const char *in) {
char *out = strdup(in);
for (size_t i = 0; out[i]; i++)
@@ -31,6 +32,7 @@ static char *without_spaces(const char *in) {
out[j] = out[j+1];
return out;
}
+#endif
int main() {
printf("== LM_NEXT_POWER_OF_2 =====================================\n");
@@ -118,6 +120,7 @@ int main() {
}
/* Test that it breaks at documented_limit+1 tuples. */
+#ifndef __LIBMISC_ENHANCED_CPP__
{
#define X(n) , n
#define FN(n) n
@@ -136,6 +139,7 @@ int main() {
test_assert(strcmp(act_suffix, exp_suffix) == 0);
free(act_suffix);
}
+#endif
printf("== LM_FOREACH_TUPLE =======================================\n");
/* Basic test. */
@@ -159,6 +163,7 @@ int main() {
}
/* Test that it breaks at documented_limit+1 tuples. */
+#ifndef __LIBMISC_ENHANCED_CPP__
{
#define X(n) (n)
#define FN(n) n
@@ -177,6 +182,7 @@ int main() {
test_assert(strcmp(act_suffix, exp_suffix) == 0);
free(act_suffix);
}
+#endif
printf("== LM_DEFAPPEND ===========================================\n");
LM_DEFAPPEND(mylist, a);