Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix build with MC (simgrid::xbt::string).
[simgrid.git] / teshsuite / mc / dwarf-expression / dwarf-expression.cpp
index b8e4bec4d7044a595daf6ef9c754bb14ca54ca9d..0ebb431cd4337d07619705abe518c074fda61313 100644 (file)
@@ -56,12 +56,15 @@ void basic_test(simgrid::dwarf::ExpressionContext const& state) {
 
   simgrid::dwarf::ExpressionStack stack;
 
+  bool caught_ex = false;
   try {
     ops[0].atom = DW_OP_drop;
     simgrid::dwarf::execute(ops, 1, state, stack);
-    fprintf(stderr,"Exception expected");
+  } catch (simgrid::dwarf::evaluation_error& e) {
+    caught_ex = true;
   }
-  catch(simgrid::dwarf::evaluation_error& e) {}
+  if (not caught_ex)
+    fprintf(stderr, "Exception expected");
 
   ops[0].atom = DW_OP_lit21;
   simgrid::dwarf::execute(ops, 1, state, stack);