Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Move code in simgrid::mc
[simgrid.git] / teshsuite / mc / dwarf_expression / dwarf_expression.cpp
index fa42b88..f059b2c 100644 (file)
 #include <assert.h>
 #include <stdlib.h>
 
-#include "mc/mc_private.h"
-#include "mc/mc_object_info.h"
+#include "src/mc/mc_private.h"
 
-#include "mc/Process.hpp"
-#include "mc/Type.hpp"
-#include "mc/ObjectInformation.hpp"
-#include "mc/Variable.hpp"
+#include "src/mc/Process.hpp"
+#include "src/mc/Type.hpp"
+#include "src/mc/ObjectInformation.hpp"
+#include "src/mc/Variable.hpp"
 
 static simgrid::mc::Process* process;
 
@@ -39,7 +38,7 @@ uintptr_t eval_binary_operation(
     simgrid::dwarf::execute(ops, 3, state, stack);
   }
   catch(std::runtime_error& e) {
-    assert(("Expression evaluation error", false));
+    fprintf(stderr,"Expression evaluation error");
   }
 
   assert(stack.size() == 1);
@@ -60,7 +59,7 @@ void basic_test(simgrid::dwarf::ExpressionContext const& state) {
   try {
     ops[0].atom = DW_OP_drop;
     simgrid::dwarf::execute(ops, 1, state, stack);
-    assert(("Exception expected", false));
+    fprintf(stderr,"Exception expected");
   }
   catch(simgrid::dwarf::evaluation_error& e) {}
 
@@ -122,7 +121,7 @@ void basic_test(simgrid::dwarf::ExpressionContext const& state) {
 
   }
   catch(std::runtime_error& e) {
-    assert(("Expression evaluation error", false));
+    fprintf(stderr,"Expression evaluation error");
   }
 }
 
@@ -145,12 +144,13 @@ void test_deref(simgrid::dwarf::ExpressionContext const& state) {
 
   }
   catch(std::runtime_error& e) {
-    assert(("Expression evaluation error", false));
+    fprintf(stderr,"Expression evaluation error");
   }
 }
 
 int main(int argc, char** argv) {
   process = new simgrid::mc::Process(getpid(), -1);
+  process->init();
 
   simgrid::dwarf::ExpressionContext state;
   state.address_space = (simgrid::mc::AddressSpace*) process;