• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #875

25 Jan 2023 03:11PM UTC coverage: 86.39% (+0.5%) from 85.911%
#875

push

StellarBot
Merge #6151

6151: Refactoring the Manual page in documentation r=hkaiser a=dimitraka

- Move the instructions to build the tests and examples in a new separate page 
- Add references of the most important CMake options or the comprehensive list of CMake options
- Rename the CMake options page (title was too long)
- Refer to the new page of how to build the examples in the examples section itself


Co-authored-by: kadimitra <kadimitra@ece.auth.gr>

174481 of 201968 relevant lines covered (86.39%)

1898746.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

11.9
/libs/full/async_colocated/tests/unit/new_colocated.cpp
1
//  Copyright (c) 2015 Hartmut Kaiser
2
//
3
//  SPDX-License-Identifier: BSL-1.0
4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6

7
#include <hpx/config.hpp>
8
#if !defined(HPX_COMPUTE_DEVICE_CODE)
9
#include <hpx/hpx_main.hpp>
10
#include <hpx/include/actions.hpp>
11
#include <hpx/include/components.hpp>
12
#include <hpx/include/runtime.hpp>
13
#include <hpx/modules/testing.hpp>
14

15
#include <utility>
16

17
///////////////////////////////////////////////////////////////////////////////
18
struct test_server : hpx::components::component_base<test_server>
16✔
19
{
20
    hpx::id_type call() const
4✔
21
    {
22
        return hpx::find_here();
4✔
23
    }
24

25
    HPX_DEFINE_COMPONENT_ACTION(test_server, call)
26
};
27

28
typedef hpx::components::component<test_server> server_type;
29
HPX_REGISTER_COMPONENT(server_type, test_server)
74✔
30

31
typedef test_server::call_action call_action;
32
HPX_REGISTER_ACTION(call_action)
7✔
33

34
struct test_client : hpx::components::client_base<test_client, test_server>
×
35
{
36
    typedef hpx::components::client_base<test_client, test_server> base_type;
37

38
    test_client(hpx::future<hpx::id_type>&& id)
×
39
      : base_type(std::move(id))
×
40
    {
×
41
    }
×
42
    test_client(hpx::id_type&& id)
×
43
      : base_type(std::move(id))
×
44
    {
×
45
    }
×
46

47
    hpx::id_type call()
×
48
    {
49
        return hpx::async<call_action>(this->get_id()).get();
×
50
    }
×
51
};
52

53
///////////////////////////////////////////////////////////////////////////////
54
void test_create_single_instance()
×
55
{
56
    // make sure created objects live on locality they are supposed to be
57
    for (hpx::id_type const& loc : hpx::find_all_localities())
×
58
    {
59
        hpx::id_type target = hpx::new_<test_server>(loc).get();
×
60
        hpx::id_type id = hpx::new_<test_server>(hpx::colocated(target)).get();
×
61

62
        HPX_TEST_EQ(hpx::async<call_action>(id).get(), loc);
×
63
    }
×
64

65
    for (hpx::id_type const& loc : hpx::find_all_localities())
×
66
    {
67
        test_client target = hpx::new_<test_client>(loc);
×
68
        hpx::id_type id = hpx::new_<test_server>(hpx::colocated(target)).get();
×
69

70
        HPX_TEST_EQ(hpx::async<call_action>(id).get(), loc);
×
71
    }
×
72

73
    for (hpx::id_type const& loc : hpx::find_all_localities())
×
74
    {
75
        test_client target = hpx::new_<test_client>(loc);
×
76
        test_client t1 = hpx::new_<test_client>(hpx::colocated(target));
×
77

78
        HPX_TEST_EQ(t1.call(), loc);
×
79
    }
×
80

81
    for (hpx::id_type const& loc : hpx::find_all_localities())
×
82
    {
83
        test_client target = hpx::new_<test_client>(loc);
×
84
        test_client t2 = hpx::new_<test_client>(hpx::colocated(target));
×
85

86
        HPX_TEST_EQ(t2.call(), loc);
×
87
    }
×
88
}
×
89

90
int main()
×
91
{
92
    test_create_single_instance();
×
93
    return 0;
×
94
}
95
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc