Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Delete now useless xbt_dynar_three_way_partition().
[simgrid.git] / src / xbt / ex.cpp
index 37f1c25..50a97f1 100644 (file)
@@ -41,8 +41,8 @@
 /* The extensions made for the SimGrid project can either be distributed    */
 /* under the same license, or under the LGPL v2.1                           */
 
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
 
 #include <xbt/backtrace.hpp>
 #include "src/internal_config.h"           /* execinfo when available */
@@ -113,8 +113,8 @@ const char *xbt_ex_catname(xbt_errcat_t cat)
 }
 
 #ifdef SIMGRID_TEST
-#include <stdio.h>
 #include "xbt/ex.h"
+#include <cstdio>
 #include <xbt/ex.hpp>
 
 XBT_TEST_SUITE("xbt_ex", "Exception Handling");
@@ -227,7 +227,7 @@ XBT_TEST_UNIT("cleanup", test_cleanup, "cleanup handling")
     c = 1;
     if (v1 != 5678)
       xbt_test_fail("v1 = %d (!= 5678)", v1);
-    if (!(ex.category == 1 && ex.value == 2 && not strcmp(ex.what(), "blah")))
+    if (not(ex.category == 1 && ex.value == 2 && not strcmp(ex.what(), "blah")))
       xbt_test_fail("unexpected exception contents");
   }
   if (not c)