A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into actor-yield
[simgrid.git]
/
teshsuite
/
mc
/
dwarf-expression
/
dwarf-expression.cpp
diff --git
a/teshsuite/mc/dwarf-expression/dwarf-expression.cpp
b/teshsuite/mc/dwarf-expression/dwarf-expression.cpp
index
afc7d12
..
0ebb431
100644
(file)
--- a/
teshsuite/mc/dwarf-expression/dwarf-expression.cpp
+++ b/
teshsuite/mc/dwarf-expression/dwarf-expression.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2014-201
5
. The SimGrid Team.
+/* Copyright (c) 2014-201
7
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-8,11
+8,11
@@
#undef NDEBUG
#endif
#undef NDEBUG
#endif
-#include <
string.h
>
-#include <
assert.h
>
-#include <
stdlib.h
>
+#include <
cassert
>
+#include <
cstdlib
>
+#include <
cstring
>
-#include "src/mc/mc_private.h"
+#include "src/mc/mc_private.h
pp
"
#include "src/mc/ObjectInformation.hpp"
#include "src/mc/Type.hpp"
#include "src/mc/ObjectInformation.hpp"
#include "src/mc/Type.hpp"
@@
-56,12
+56,15
@@
void basic_test(simgrid::dwarf::ExpressionContext const& state) {
simgrid::dwarf::ExpressionStack stack;
simgrid::dwarf::ExpressionStack stack;
+ bool caught_ex = false;
try {
ops[0].atom = DW_OP_drop;
simgrid::dwarf::execute(ops, 1, state, stack);
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);
ops[0].atom = DW_OP_lit21;
simgrid::dwarf::execute(ops, 1, state, stack);