aboutsummaryrefslogtreecommitdiffstats
path: root/test/rspamd_cxx_unit.cxx
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-12 17:58:52 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-12 17:58:52 +0000
commit1a799bffa70e88369713cee9391a10e68cd072a9 (patch)
treeed09bb5c63b5bdcbc6fb7d4ba1602085d789f108 /test/rspamd_cxx_unit.cxx
parent57fe1769183f5e77600cc7ce6e1c417c70b2cf63 (diff)
downloadrspamd-1a799bffa70e88369713cee9391a10e68cd072a9.tar.gz
rspamd-1a799bffa70e88369713cee9391a10e68cd072a9.zip
[Project] Css: Add some c++ unit tests
Diffstat (limited to 'test/rspamd_cxx_unit.cxx')
-rw-r--r--test/rspamd_cxx_unit.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/rspamd_cxx_unit.cxx b/test/rspamd_cxx_unit.cxx
new file mode 100644
index 000000000..eb456d2fd
--- /dev/null
+++ b/test/rspamd_cxx_unit.cxx
@@ -0,0 +1,32 @@
+/*-
+ * Copyright 2021 Vsevolod Stakhov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "config.h"
+#define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
+#include "doctest/doctest.h"
+
+int
+main(int argc, char** argv)
+{
+ doctest::Context context(argc, argv);
+ int res = context.run();
+
+ if(context.shouldExit()) {
+ return res;
+ }
+
+ return res;
+} \ No newline at end of file