Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix+activate rma test
[simgrid.git] / teshsuite / mc / dwarf-expression / dwarf-expression.cpp
index 2dce6b2..48d21ac 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2014-2019. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2014-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. */
@@ -8,18 +7,18 @@
 #undef NDEBUG
 #endif
 
+#include "src/mc/mc_private.hpp"
+
+#include "src/mc/inspect/ObjectInformation.hpp"
+#include "src/mc/inspect/Type.hpp"
+#include "src/mc/inspect/Variable.hpp"
+#include "src/mc/remote/RemoteClient.hpp"
+
 #include <cassert>
 #include <cstdlib>
 #include <cstring>
 #include <random>
 
-#include "src/mc/mc_private.hpp"
-
-#include "src/mc/ObjectInformation.hpp"
-#include "src/mc/Type.hpp"
-#include "src/mc/Variable.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
-
 static std::default_random_engine rnd_engine;
 
 static simgrid::mc::RemoteClient* process;
@@ -36,10 +35,9 @@ uintptr_t eval_binary_operation(
   ops[2].atom = op;
 
   simgrid::dwarf::ExpressionStack stack;
-
   try {
     simgrid::dwarf::execute(ops, 3, state, stack);
-  } catch (const std::runtime_error&) {
+  } catch (const simgrid::dwarf::evaluation_error&) {
     fprintf(stderr,"Expression evaluation error");
   }
 
@@ -124,7 +122,7 @@ void basic_test(simgrid::dwarf::ExpressionContext const& state) {
   assert(stack.top()  == a);
   assert(stack.top(1) == b);
 
-  } catch (const std::runtime_error&) {
+  } catch (const simgrid::dwarf::evaluation_error&) {
     fprintf(stderr,"Expression evaluation error");
   }
 }
@@ -146,12 +144,13 @@ void test_deref(simgrid::dwarf::ExpressionContext const& state) {
   assert(stack.size() == 1);
   assert(stack.top()  == foo);
 
-  } catch (const std::runtime_error&) {
+  } catch (const simgrid::dwarf::evaluation_error&) {
     fprintf(stderr,"Expression evaluation error");
   }
 }
 
-int main(int argc, char** argv) {
+int main()
+{
   process = new simgrid::mc::RemoteClient(getpid(), -1);
   process->init();