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

daisytuner / sdfglib / 17653942017

11 Sep 2025 06:34PM UTC coverage: 59.145% (-0.6%) from 59.755%
17653942017

push

github

web-flow
Merge pull request #224 from daisytuner/revert-210-NewDebugInfo

Revert "New debug info"

313 of 466 new or added lines in 44 files covered. (67.17%)

21 existing lines in 4 files now uncovered.

9274 of 15680 relevant lines covered (59.15%)

115.92 hits per line

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

96.23
/src/element.cpp
1
#include "sdfg/element.h"
2

3
namespace sdfg {
4

5
DebugInfo::DebugInfo()
2,987✔
6
    : filename_(), function_(), start_line_(0), start_column_(0), end_line_(0), end_column_(0), has_(false) {
2,987✔
7

8
      };
2,987✔
9

10
DebugInfo::DebugInfo(std::string filename, size_t start_line, size_t start_column, size_t end_line, size_t end_column)
10✔
11
    : filename_(filename), function_(), start_line_(start_line), start_column_(start_column), end_line_(end_line),
10✔
12
      end_column_(end_column), has_(true) {
10✔
13

14
      };
10✔
15

16
DebugInfo::DebugInfo(
3✔
17
    std::string filename, std::string function, size_t start_line, size_t start_column, size_t end_line, size_t end_column
18
)
19
    : filename_(filename), function_(function), start_line_(start_line), start_column_(start_column),
3✔
20
      end_line_(end_line), end_column_(end_column), has_(true) {
3✔
21

22
      };
3✔
23

24

25
bool DebugInfo::has() const { return this->has_; };
155✔
26

27
std::string DebugInfo::filename() const { return this->filename_; };
127✔
28

29
std::string DebugInfo::function() const { return this->function_; };
119✔
30

31
size_t DebugInfo::start_line() const { return this->start_line_; };
121✔
32

33
size_t DebugInfo::start_column() const { return this->start_column_; };
121✔
34

35
size_t DebugInfo::end_line() const { return this->end_line_; };
121✔
36

37
size_t DebugInfo::end_column() const { return this->end_column_; };
121✔
38

39
DebugInfo DebugInfo::merge(const DebugInfo& left, const DebugInfo& right) {
24✔
40
    if (!left.has()) {
24✔
41
        return right;
14✔
42
    }
43
    if (!right.has()) {
10✔
44
        return left;
7✔
45
    }
46
    if (left.filename() != right.filename()) {
3✔
NEW
47
        return left;
×
48
    }
49
    if (left.function() != right.function() && left.function() != "" && right.function() != "") {
3✔
NEW
50
        return left;
×
51
    }
52

53
    size_t start_line = 0;
3✔
54
    size_t start_column = 0;
3✔
55
    size_t end_line = 0;
3✔
56
    size_t end_column = 0;
3✔
57

58
    if (left.start_line_ < right.start_line_) {
3✔
59
        start_line = left.start_line_;
1✔
60
        start_column = left.start_column_;
1✔
61
    } else {
1✔
62
        start_line = right.start_line_;
2✔
63
        start_column = right.start_column_;
2✔
64
    }
65

66
    if (left.end_line_ > right.end_line_) {
3✔
67
        end_line = left.end_line_;
2✔
68
        end_column = left.end_column_;
2✔
69
    } else {
2✔
70
        end_line = right.end_line_;
1✔
71
        end_column = right.end_column_;
1✔
72
    }
73

74
    std::string function = left.function_;
3✔
75
    if (left.function_ == "") {
3✔
76
        function = right.function_;
3✔
77
    }
3✔
78

79
    return DebugInfo(left.filename_, function, start_line, start_column, end_line, end_column);
3✔
80
};
24✔
81

82
Element::Element(size_t element_id, const DebugInfo& debug_info) : element_id_(element_id), debug_info_(debug_info) {};
4,321✔
83

84
size_t Element::element_id() const { return this->element_id_; };
2,081✔
85

86
const DebugInfo& Element::debug_info() const { return this->debug_info_; };
369✔
87

88
void Element::set_debug_info(const DebugInfo& debug_info) { this->debug_info_ = debug_info; };
4✔
89

90
} // namespace sdfg
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