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

daisytuner / docc / 21591503343

02 Feb 2026 01:13PM UTC coverage: 66.484% (-0.003%) from 66.487%
21591503343

push

github

web-flow
Fixed ReturnTest.ReturnType (#500)

This test was AI generated and complete bullshit. It failed on my machine because I use a newer c++ library than the runners.
Long story short: The test case dereferenced a unique_ptr holding nullptr. The newer c++ library has an assertion which prevents this.

23098 of 34742 relevant lines covered (66.48%)

376.24 hits per line

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

31.25
/sdfg/src/structured_control_flow/return.cpp
1
#include "sdfg/structured_control_flow/return.h"
2

3
#include "sdfg/function.h"
4
#include "sdfg/types/type.h"
5

6
namespace sdfg {
7
namespace structured_control_flow {
8

9
Return::Return(size_t element_id, const DebugInfo& debug_info, const std::string& data)
10
    : ControlFlowNode(element_id, debug_info), data_(data), type_(nullptr) {}
47✔
11

12
Return::Return(size_t element_id, const DebugInfo& debug_info, const std::string& data, const types::IType& type)
13
    : ControlFlowNode(element_id, debug_info), data_(data), type_(type.clone()) {}
×
14

15

16
const std::string& Return::data() const { return data_; }
24✔
17

18
const types::IType& Return::type() const { return *type_; }
×
19

20
bool Return::is_data() const { return type_ == nullptr; }
46✔
21

22
bool Return::is_constant() const { return type_ != nullptr; }
4✔
23

24
void Return::validate(const Function& function) const {
28✔
25
    if (is_data()) {
28✔
26
        if (data_ != "" && !function.exists(data_)) {
28✔
27
            throw InvalidSDFGException("Return node with data '" + data_ + "' does not correspond to any container");
×
28
        }
×
29
        if (type_ != nullptr) {
28✔
30
            throw InvalidSDFGException("Return node with data cannot have a type");
×
31
        }
×
32
    } else if (is_constant()) {
28✔
33
        if (function.exists(data_)) {
×
34
            throw InvalidSDFGException(
×
35
                "Return node with constant data '" + data_ + "' cannot correspond to any container"
×
36
            );
×
37
        }
×
38
        if (type_ == nullptr) {
×
39
            throw InvalidSDFGException("Return node with constant data must have a type");
×
40
        }
×
41
    } else {
×
42
        throw InvalidSDFGException("Return node must be either data or constant");
×
43
    }
×
44
};
28✔
45

46
void Return::replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) {
×
47
    if (is_data() && data_ == old_expression->__str__()) {
×
48
        data_ = new_expression->__str__();
×
49
    }
×
50
};
×
51

52
} // namespace structured_control_flow
53
} // 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