Skip to content

Commit

Permalink
Merge pull request #1635 from STEllAR-GROUP/add_test_1572
Browse files Browse the repository at this point in the history
Adding missing test for #1572
  • Loading branch information
hkaiser committed Jul 2, 2015
2 parents 05c43ef + 8c02d8d commit 5758c66
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/regressions/util/CMakeLists.txt
Expand Up @@ -6,6 +6,7 @@

set(tests
command_line_arguments_706
configuration_1572
function_argument
function_serialization_728
iarchive_1237
Expand Down
30 changes: 30 additions & 0 deletions tests/regressions/util/configuration_1572.cpp
@@ -0,0 +1,30 @@
// Copyright (c) 2015 Hartmut Kaiser
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

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

int hpx_main(int argc, char* argv[])
{
// check number of localities
HPX_TEST_EQ(
boost::lexical_cast<boost::uint32_t>(
hpx::get_config_entry("hpx.localities", "")),
hpx::get_num_localities_sync());
HPX_TEST_EQ(
boost::lexical_cast<std::size_t>(
hpx::get_config_entry("hpx.os_threads", "")),
hpx::get_os_thread_count());
HPX_TEST_EQ(hpx::get_config_entry("hpx.runtime_mode", ""),
std::string("console"));

return hpx::finalize();
}

int main(int argc, char* argv[])
{
HPX_TEST_EQ(hpx::init(argc, argv), 0);
return hpx::util::report_errors();
}

0 comments on commit 5758c66

Please sign in to comment.