summaryrefslogtreecommitdiff
path: root/api_test
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-12-31 16:10:50 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-12-31 17:14:00 +0100
commit1b4d53f301e31fb5e4fbe687741367b938377009 (patch)
tree2f51d2124b9737c002eea11a7bf0fbea5f09a799 /api_test
parent858d7982fba21ff087c8fb75f310670e3723f2ae (diff)
Fix C++ API test
Diffstat (limited to 'api_test')
-rw-r--r--api_test/cplusplus.cpp4
-rw-r--r--api_test/cplusplus.h17
-rw-r--r--api_test/main.c4
3 files changed, 20 insertions, 5 deletions
diff --git a/api_test/cplusplus.cpp b/api_test/cplusplus.cpp
index ea64b06..b6228a3 100644
--- a/api_test/cplusplus.cpp
+++ b/api_test/cplusplus.cpp
@@ -1,10 +1,10 @@
#include <cstdlib>
#include "cmark.h"
-
+#include "cplusplus.h"
#include "harness.h"
-extern "C" void
+void
test_cplusplus(test_batch_runner *runner)
{
static const char md[] = "paragraph\n";
diff --git a/api_test/cplusplus.h b/api_test/cplusplus.h
new file mode 100644
index 0000000..68edcb2
--- /dev/null
+++ b/api_test/cplusplus.h
@@ -0,0 +1,17 @@
+#ifndef CMARK_API_TEST_CPLUSPLUS_H
+#define CMARK_API_TEST_CPLUSPLUS_H
+
+#include "harness.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void
+test_cplusplus(test_batch_runner *runner);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/api_test/main.c b/api_test/main.c
index fae1d05..d2e41d3 100644
--- a/api_test/main.c
+++ b/api_test/main.c
@@ -7,12 +7,10 @@
#include "node.h"
#include "harness.h"
+#include "cplusplus.h"
#define UTF8_REPL "\xEF\xBF\xBD"
-void
-test_cplusplus(test_batch_runner *runner);
-
static const cmark_node_type node_types[] = {
CMARK_NODE_DOCUMENT,
CMARK_NODE_BLOCK_QUOTE,