GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 19 / 0 / 19
Functions: 100.0% 7 / 0 / 7
Branches: 76.0% 19 / 0 / 25

src/utilities/idf/WorkspaceObjectDiff.cpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #include "WorkspaceObjectDiff.hpp"
7 #include "WorkspaceObjectDiff_Impl.hpp"
8
9 #include "../core/Assert.hpp"
10
11 namespace openstudio {
12 namespace detail {
13
14 417627 WorkspaceObjectDiff_Impl::WorkspaceObjectDiff_Impl(unsigned index, boost::optional<std::string> oldValue, boost::optional<std::string> newValue,
15 417627 boost::optional<UUID> oldHandle, boost::optional<UUID> newHandle)
16
6/6
✓ Branch 1 taken 417627 times.
✓ Branch 4 taken 417627 times.
✓ Branch 7 taken 417627 times.
✓ Branch 10 taken 417627 times.
✓ Branch 15 taken 417627 times.
✓ Branch 18 taken 417627 times.
417627 : IdfObjectDiff_Impl(index, oldValue, newValue), m_oldHandle(oldHandle), m_newHandle(newHandle) {}
17
18 550758 boost::optional<UUID> WorkspaceObjectDiff_Impl::oldHandle() const {
19 550758 return m_oldHandle;
20 }
21
22 550758 boost::optional<UUID> WorkspaceObjectDiff_Impl::newHandle() const {
23 550758 return m_newHandle;
24 }
25
26 } // namespace detail
27
28 417627 WorkspaceObjectDiff::WorkspaceObjectDiff(unsigned index, boost::optional<std::string> oldValue, boost::optional<std::string> newValue,
29 417627 boost::optional<UUID> oldHandle, boost::optional<UUID> newHandle)
30 : IdfObjectDiff(
31
8/10
✓ Branch 1 taken 417627 times.
✓ Branch 4 taken 417627 times.
✓ Branch 7 taken 417627 times.
✓ Branch 10 taken 417627 times.
✓ Branch 13 taken 417627 times.
✓ Branch 16 taken 417627 times.
✓ Branch 19 taken 417627 times.
✓ Branch 23 taken 417627 times.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
417627 std::shared_ptr<detail::WorkspaceObjectDiff_Impl>(new detail::WorkspaceObjectDiff_Impl(index, oldValue, newValue, oldHandle, newHandle))) {
32
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 417627 times.
✗ Branch 5 not taken.
417627 OS_ASSERT(getImpl<detail::WorkspaceObjectDiff_Impl>());
33 417627 }
34
35
1/1
✓ Branch 3 taken 550758 times.
550758 WorkspaceObjectDiff::WorkspaceObjectDiff(const std::shared_ptr<detail::WorkspaceObjectDiff_Impl>& impl) : IdfObjectDiff(std::move(impl)) {
36
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 550758 times.
✗ Branch 5 not taken.
550758 OS_ASSERT(getImpl<detail::WorkspaceObjectDiff_Impl>());
37 550758 }
38
39 550758 boost::optional<UUID> WorkspaceObjectDiff::oldHandle() const {
40
1/1
✓ Branch 3 taken 550758 times.
550758 return getImpl<detail::WorkspaceObjectDiff_Impl>()->oldHandle();
41 }
42
43 550758 boost::optional<UUID> WorkspaceObjectDiff::newHandle() const {
44
1/1
✓ Branch 3 taken 550758 times.
550758 return getImpl<detail::WorkspaceObjectDiff_Impl>()->newHandle();
45 }
46
47 } // namespace openstudio
48