The goal is to be able to use the --log=... command line parameters.
/* 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. */
/* 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_MAIN // This tells Catch to provide a main() - only do this in one cpp file
-#include "src/include/catch.hpp"
#include "simgrid/kernel/resource/Resource.hpp"
#include "src/kernel/resource/profile/trace_mgr.hpp"
#include "simgrid/kernel/resource/Resource.hpp"
#include "src/kernel/resource/profile/trace_mgr.hpp"
--- /dev/null
+/* 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);
+}
ENDIF()
# New tests should use the Catch Framework
ENDIF()
# New tests should use the Catch Framework
-set(UNIT_TESTS src/kernel/resource/profile/trace_mgr_test.cpp
+set(UNIT_TESTS src/xbt/unit-tests_main.cpp
+ src/kernel/resource/profile/trace_mgr_test.cpp
src/xbt/config_test.cpp
src/xbt/dict_test.cpp
src/xbt/dynar_test.cpp
src/xbt/config_test.cpp
src/xbt/dict_test.cpp
src/xbt/dynar_test.cpp