Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert the unit tests of xbt::config to Catch2.
[simgrid.git] / src / xbt / cunit.cpp
index 95b4d95..5076c2e 100644 (file)
@@ -1,6 +1,6 @@
 /* cunit - A little C Unit facility                                         */
 
-/* Copyright (c) 2005-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2005-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. */
@@ -14,8 +14,8 @@
 #include <string>
 #include <vector>
 
+#include "simgrid/Exception.hpp"
 #include <xbt/cunit.h>
-#include <xbt/ex.hpp>
 #include <xbt/string.hpp>
 
 /* output stream to use everywhere */
@@ -579,9 +579,9 @@ void _xbt_test_fail(const char *file, int line, const char *fmt, ...)
   test.failed_ = true;
 }
 
-void xbt_test_exception(xbt_ex_t e)
+void xbt_test_exception(xbt_ex e)
 {
-  _xbt_test_fail(e.throw_point().file, e.throw_point().line, "Exception %s raised: %s", xbt_ex_catname(e.category),
+  _xbt_test_fail(e.throw_point().file_, e.throw_point().line_, "Exception %s raised: %s", xbt_ex_catname(e.category),
                  e.what());
 }