Skip to content

Commit

Permalink
Turning regression test for #565 into a more useful test.
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Oct 25, 2012
1 parent 519bda1 commit 68a7605
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/regressions/multiple_init.cpp
Expand Up @@ -7,18 +7,25 @@

#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>
#include <hpx/util/lightweight_test.hpp>

int invoked_init = 0;

int hpx_main(int argc, char ** argv)
{
++invoked_init;
return hpx::finalize();
}

int main()
{
// Everything is fine on the first call
hpx::init();
// Segfault on the call
HPX_TEST(invoked_init == 1);

// Segfault on the call, now fixed
hpx::init();
HPX_TEST(invoked_init == 2);

return 0;
return hpx::util::report_errors();
}

0 comments on commit 68a7605

Please sign in to comment.