- Fix compilation of PoliciesGatekeeper, making sure we don't invalidate iterators
- Fix test-history wrong index variable that made the program try to poke its nose where it shouldn't git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@783 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
e3d2381212
commit
dbd24ffd75
|
@ -129,8 +129,9 @@ PoliciesGatekeeper::deactivate_policies(PolicyManager* manager)
|
||||||
{
|
{
|
||||||
if(act_it->second == *avail_it)
|
if(act_it->second == *avail_it)
|
||||||
{
|
{
|
||||||
act_it->second->deactivate();
|
ActiveIterator removable = act_it++;
|
||||||
act_it = _active_policies.erase(act_it);
|
removable->second->deactivate();
|
||||||
|
_active_policies.erase(removable);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
act_it++;
|
act_it++;
|
||||||
|
|
|
@ -438,7 +438,7 @@ main(int argc, char** argv)
|
||||||
|
|
||||||
h.append_new_environment(environment6);
|
h.append_new_environment(environment6);
|
||||||
|
|
||||||
info << "Added a new environment to the history as a clear-cut copy of the last\n";
|
info << "Added a new environment to the history as a clear-cut copy of the last" << endl;
|
||||||
|
|
||||||
h.remove(res1.first);
|
h.remove(res1.first);
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
// NOTE this will of course fail if the subrequests which should not be here
|
// NOTE this will of course fail if the subrequests which should not be here
|
||||||
// are still in the environment
|
// are still in the environment
|
||||||
if(!final_sreq2_match && *subrequests[i] == sreq2)
|
if(!final_sreq2_match && *subrequests[x] == sreq2)
|
||||||
final_sreq2_match = true;
|
final_sreq2_match = true;
|
||||||
else
|
else
|
||||||
final_bad_match = true;
|
final_bad_match = true;
|
||||||
|
@ -511,6 +511,8 @@ main(int argc, char** argv)
|
||||||
test << "PASS";
|
test << "PASS";
|
||||||
else
|
else
|
||||||
test << "FAIL";
|
test << "FAIL";
|
||||||
|
test << endl;
|
||||||
|
|
||||||
|
|
||||||
test << "Checking whether ConcreteHistory throws an exception if we try to use ";
|
test << "Checking whether ConcreteHistory throws an exception if we try to use ";
|
||||||
test << "a negative index to access an environment... ";
|
test << "a negative index to access an environment... ";
|
||||||
|
|
Loading…
Reference in New Issue