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

paulmthompson / WhiskerToolbox / 17920603410

22 Sep 2025 03:39PM UTC coverage: 71.97% (-0.05%) from 72.02%
17920603410

push

github

paulmthompson
all tests pass

277 of 288 new or added lines in 8 files covered. (96.18%)

520 existing lines in 35 files now uncovered.

40275 of 55961 relevant lines covered (71.97%)

1225.8 hits per line

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

92.86
/src/DataManager/utils/TableView/computers/IntervalPropertyComputer.cpp
1
#include "IntervalPropertyComputer.h"
2

3
#include <algorithm>
4
#include <stdexcept>
5

6
// Template specializations for different data types
7
template std::pair<std::vector<int64_t>, ColumnEntityIds>
8
IntervalPropertyComputer<int64_t>::compute(ExecutionPlan const & plan) const;
9

10
template std::pair<std::vector<float>, ColumnEntityIds>
11
IntervalPropertyComputer<float>::compute(ExecutionPlan const & plan) const;
12

13
template std::pair<std::vector<double>, ColumnEntityIds>
14
IntervalPropertyComputer<double>::compute(ExecutionPlan const & plan) const;
15

16
// Template specializations for validation method
17
template void IntervalPropertyComputer<int64_t>::_validateRowIntervalsAreSubset(std::vector<TimeFrameInterval> const &, TimeFrame const *) const;
18
template void IntervalPropertyComputer<float>::_validateRowIntervalsAreSubset(std::vector<TimeFrameInterval> const &, TimeFrame const *) const;
19
template void IntervalPropertyComputer<double>::_validateRowIntervalsAreSubset(std::vector<TimeFrameInterval> const &, TimeFrame const *) const;
20

21
template<typename T>
22
void IntervalPropertyComputer<T>::_validateRowIntervalsAreSubset(std::vector<TimeFrameInterval> const & rowIntervals,
35✔
23
                                                                 TimeFrame const * destinationTimeFrame) const {
24
    // Get all intervals from the source
25
    auto sourceIntervals = m_source->getIntervals();
35✔
26

27
    auto sourceTimeFrame = m_source->getTimeFrame();
35✔
28
    if (sourceTimeFrame.get() != destinationTimeFrame) {
35✔
NEW
29
        throw std::runtime_error("Source interval source has different timeframe than destination timeframe");
×
30
    }
31

32
    // Check that each row interval exactly matches a source interval
33
    for (auto const & rowInterval: rowIntervals) {
136✔
34
        bool found = false;
102✔
35
        for (auto const & sourceInterval: sourceIntervals) {
256✔
36
            if (rowInterval.start.getValue() == sourceInterval.start && rowInterval.end.getValue() == sourceInterval.end) {
255✔
37
                found = true;
101✔
38
                break;
101✔
39
            }
40
        }
41

42
        if (!found) {
102✔
43
            throw std::runtime_error("Row interval [" + std::to_string(rowInterval.start.getValue()) +
1✔
44
                                     ", " + std::to_string(rowInterval.end.getValue()) +
45
                                     "] is not found in source intervals. "
46
                                     "IntervalPropertyComputer requires row intervals to be a subset of source intervals.");
47
        }
48
    }
49
}
70✔
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