GCC Code Coverage Report


Directory: ./
File: demos/create_segment.cpp
Date: 2022-06-30 06:29:57
Exec Total Coverage
Lines: 0 8 0.0%
Branches: 0 18 0.0%

Line Branch Exec Source
1 /**
2 * @file non_existing_segment.cpp
3 * @author Vincent Berenz
4 * @license License BSD-3-Clause
5 * @copyright Copyright (c) 2020, New York University and Max Planck
6 * Gesellschaft.
7 * @date 2020-10-22
8 *
9 * @brief checks exceptions are throwm when
10 * reading non existing segment
11 */
12
13 #include <signal.h>
14 #include <unistd.h>
15 #include <iostream>
16 #include <vector>
17 #include "shared_memory/shared_memory.hpp"
18
19 int main()
20 {
21 std::string segment_id{"wait_for_segment_demo"};
22 shared_memory::clear_shared_memory(segment_id);
23
24 std::cout << "\nsegment created !\n";
25 shared_memory::set<double>(segment_id, segment_id, 1.0);
26
27 usleep(1000000);
28 std::cout << "\ndestroying segment\n\n";
29 shared_memory::clear_shared_memory(segment_id);
30 }
31