• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Build has been canceled!

daisytuner / sdfglib / 17117704192

21 Aug 2025 05:09AM UTC coverage: 61.329% (-4.2%) from 65.536%
17117704192

Pull #200

github

web-flow
Merge 4222c2d61 into a4938ca29
Pull Request #200: Type inference as analysis

97 of 130 new or added lines in 2 files covered. (74.62%)

256 existing lines in 7 files now uncovered.

9349 of 15244 relevant lines covered (61.33%)

119.41 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()
3,021✔
6
    : filename_(), function_(), start_line_(0), start_column_(0), end_line_(0), end_column_(0), has_(false) {
3,021✔
7

8
      };
3,021✔
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✔
UNCOV
47
        return left;
×
48
    }
49
    if (left.function() != right.function() && left.function() != "" && right.function() != "") {
3✔
UNCOV
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,378✔
83

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

86
const DebugInfo& Element::debug_info() const { return this->debug_info_; };
368✔
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