Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Provide our own main() for unit-tests.
[simgrid.git] / src / xbt / unit-tests_main.cpp
diff --git a/src/xbt/unit-tests_main.cpp b/src/xbt/unit-tests_main.cpp
new file mode 100644 (file)
index 0000000..3900999
--- /dev/null
@@ -0,0 +1,16 @@
+/* Copyright (c) 2019. The SimGrid Team. All rights reserved.               */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#define CATCH_CONFIG_RUNNER // we supply our own main()
+
+#include "catch.hpp"
+
+#include "xbt/log.h"
+
+int main(int argc, char* argv[])
+{
+  xbt_log_init(&argc, argv);
+  return Catch::Session().run(argc, argv);
+}