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

BlueBrain / MorphIO / 6533524408

16 Oct 2023 12:24PM UTC coverage: 76.051% (-0.02%) from 76.073%
6533524408

push

github

mgeplf
fix test_root_node_split

1972 of 2593 relevant lines covered (76.05%)

903.23 hits per line

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

93.33
/src/section.cpp
1
/* Copyright (c) 2013-2023, EPFL/Blue Brain Project
2
 *
3
 * SPDX-License-Identifier: Apache-2.0
4
 */
5
#include <algorithm>  // any_of
6

7
#include <morphio/section.h>
8

9
#include "point_utils.h"  // operator<<
10

11
namespace morphio {
12

13
bool Section::isHeterogeneous(bool downstream) const {
24✔
14
    auto predicate = [&](const Section& s) { return type() != s.type(); };
36✔
15
    if (downstream) {
24✔
16
        return std::any_of(breadth_begin(), breadth_end(), predicate);
12✔
17
    }
18
    return std::any_of(upstream_begin(), upstream_end(), predicate);
12✔
19
}
20

21
bool Section::hasSameShape(const Section& other) const noexcept {
4✔
22
    return (other.type() == type() && other.diameters() == diameters() &&
6✔
23
            other.points() == points() && other.perimeters() == perimeters());
6✔
24
}
25

26
}  // namespace morphio
27

28
std::ostream& operator<<(std::ostream& os, const morphio::Section& section) {
2✔
29
    const auto& points = section.points();
2✔
30
    if (points.empty()) {
2✔
31
        os << "Section(id=" << section.id() << ", points=[])";
×
32
    } else {
33
        os << "Section(id=" << section.id() << ", points=[(" << points[0] << "),..., ("
2✔
34
           << points[points.size() - 1] << ")])";
2✔
35
    }
36
    return os;
2✔
37
}
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