GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 42.9% 9 / 0 / 21
Functions: 42.9% 9 / 0 / 21
Branches: 48.5% 32 / 0 / 66

src/utilities/idf/ValidityEnums.hpp
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 #ifndef UTILITIES_IDF_VALIDITYENUMS_HPP
7 #define UTILITIES_IDF_VALIDITYENUMS_HPP
8
9 #include "../core/Enum.hpp"
10
11 namespace openstudio {
12
13 // clang-format off
14
15 /** \class StrictnessLevel
16 * \brief Specifies the desired amount of validity.
17 *
18 * \li None - Anything goes.
19 * \li Minimal - (Almost) anything goes.
20 * \li Draft - Non-null data is valid.
21 * \li Final - Required and unique data has correct cardinality.
22 *
23 * See the OPENSTUDIO_ENUM documentation in utilities/core/Enum.hpp. The actual macro call is:
24 * \code
25 OPENSTUDIO_ENUM(StrictnessLevel,
26 ((None))
27 ((Minimal))
28 ((Draft))
29 ((Final))
30 );
31 * \endcode */
32
11/22
openstudio::StrictnessLevel::buildStringVec[abi:cxx11](bool):
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 13492 times.
✓ Branch 3 taken 8 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 9 not taken.
✗ Branch 12 not taken.
✓ Branch 17 taken 13492 times.
✓ Branch 20 taken 13492 times.
✓ Branch 23 taken 10125 times.
✓ Branch 24 taken 6750 times.
✓ Branch 25 taken 3375 times.
✓ Branch 26 taken 3375 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 3375 times.
openstudio::StrictnessLevel::enumName[abi:cxx11]():
✗ Branch 1 not taken.
openstudio::operator<<(std::ostream&, openstudio::StrictnessLevel const&):
✗ Branch 1 not taken.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
37642 OPENSTUDIO_ENUM(StrictnessLevel,
33 ((None))
34 ((Minimal))
35 ((Draft))
36 ((Final))
37 );
38
39 /** \class Scope
40 * \brief Indicates whether a ValidityReport or DataError pertains to a single field, a
41 * single object, or the entire collection.
42 *
43 * See the OPENSTUDIO_ENUM documentation in utilities/core/Enum.hpp. The actual macro call is:
44 * \code
45 OPENSTUDIO_ENUM(Scope,
46 ((Field))
47 ((Object))
48 ((Collection))
49 );
50 * \endcode */
51
8/22
openstudio::Scope::buildStringVec[abi:cxx11](bool):
✗ Branch 0 not taken.
✓ Branch 1 taken 10119 times.
✗ Branch 3 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 12 not taken.
✓ Branch 17 taken 10119 times.
✓ Branch 20 taken 10119 times.
✓ Branch 23 taken 6746 times.
✓ Branch 24 taken 6746 times.
✓ Branch 25 taken 3373 times.
✓ Branch 26 taken 3373 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 3373 times.
openstudio::Scope::enumName[abi:cxx11]():
✗ Branch 1 not taken.
openstudio::operator<<(std::ostream&, openstudio::Scope const&):
✗ Branch 1 not taken.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
1032873 OPENSTUDIO_ENUM(Scope,
52 ((Field))
53 ((Object))
54 ((Collection))
55 );
56
57 /** \class DataErrorType
58 * \brief Lists the ways in which an Idf field, object, or collection of objects can be invalid
59 * as compared to its Idd.
60 *
61 * The error types are checked that the following levels. (Each level includes all checks listed
62 * at the lower levels as well.)
63 *
64 * Strictness::None
65 *
66 * Strictness::Minimal
67 *
68 * \li NoIdd (field-level, collection-level) - The input data definition is missing or empty.
69 * \li NotInitialized - Data is not ready for use or has been removed from the collection.
70 *
71 * Strictness::Draft
72 *
73 * \li NoIdd (object-level) - The input data definition is missing or empty.
74 * \li DataType - A field or object contains data of an unexpected type.
75 * \li NumericBound - A numeric field violates a field-level min or max bound.
76 * \li NameConflict - Two objects of the same IddObjectType, or with overlapping reference
77 * lists, have the same name.
78 *
79 * Strictness::Final
80 *
81 * \li NumericBound - A numeric field violates an (inter-)object-level min or max bound.
82 * \li NullAndRequired - A required field or object is null or missing.
83 * \li NumberOfFields - A data object has too few or too many fields.
84 * \li Duplicate - There are multiple data objects of a type that is supposed to be unique.
85 *
86 * See the OPENSTUDIO_ENUM documentation in utilities/core/Enum.hpp. The actual macro call is:
87 * \code
88 OPENSTUDIO_ENUM(DataErrorType,
89 ((NoIdd)(input data definition is missing or empty))
90 ((NotInitialized)(data is not ready for use or has been removed from collection))
91 ((DataType)(field-level data is of an incorrect type))
92 ((NumericBound)(numeric data violates a min or max bound))
93 ((NameConflict)(two objects of the same type or with overlapping references also have the same name))
94 ((NullAndRequired)(required data is missing))
95 ((NumberOfFields)(object has too few or too many fields))
96 ((Duplicate)(unique data is duplicated))
97 );
98 * \endcode */
99 // cppcheck-suppress syntaxError
100
13/22
openstudio::DataErrorType::buildStringVec[abi:cxx11](bool):
✓ Branch 0 taken 24 times.
✓ Branch 1 taken 1936 times.
✓ Branch 3 taken 24 times.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 24 times.
✓ Branch 12 taken 24 times.
✓ Branch 17 taken 1936 times.
✓ Branch 20 taken 1936 times.
✓ Branch 23 taken 1715 times.
✓ Branch 24 taken 490 times.
✓ Branch 25 taken 245 times.
✓ Branch 26 taken 245 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 245 times.
openstudio::DataErrorType::enumName[abi:cxx11]():
✗ Branch 1 not taken.
openstudio::operator<<(std::ostream&, openstudio::DataErrorType const&):
✗ Branch 1 not taken.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
3328 OPENSTUDIO_ENUM(DataErrorType,
101 ((NoIdd)(input data definition is missing or empty))
102 ((NotInitialized)(data is not ready for use or has been removed from collection))
103 ((DataType)(field-level data is of an incorrect type))
104 ((NumericBound)(numeric data violates a min or max bound))
105 ((NameConflict)(two objects of the same type or with overlapping references also have the same name))
106 ((NullAndRequired)(required data is missing))
107 ((NumberOfFields)(object has too few or too many fields))
108 ((Duplicate)(unique data is duplicated))
109 );
110
111 // clang-format on
112
113 } // namespace openstudio
114
115 #endif // UTILITIES_IDF_VALIDITYENUMS_HPP
116