Skip to content

Commit f339dc4

Browse files
committed
we do not care about formatting functions in coverage
1 parent b8e719c commit f339dc4

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/backend/container/block/blockDefs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ enum BlockType : std::uint16_t {
3333
CUSTOM, // placeholder for custom blocks in parsed circuit
3434
};
3535

36-
inline std::string blocktype_to_string(const BlockType blockType) {
36+
inline std::string blocktype_to_string(const BlockType blockType) /* GCOVR_EXCL_FUNCTION */ {
3737
switch (blockType) {
3838
case BlockType::NONE: return "NONE";
3939
case BlockType::AND: return "AND";
@@ -64,7 +64,7 @@ inline std::string blocktype_to_string(const BlockType blockType) {
6464

6565
template <>
6666
struct fmt::formatter<BlockType> : fmt::formatter<std::string> {
67-
auto format(BlockType blockType, format_context& ctx) const { return formatter<std::string>::format(blocktype_to_string(blockType), ctx); }
67+
auto format(BlockType blockType, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(blocktype_to_string(blockType), ctx); }
6868
};
6969

7070
#endif /* blockDefs_h */

src/backend/evaluator/simulator/logicSimulator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ enum class SimGateType : int {
2222
PORTS_TO_INT = 9
2323
};
2424

25-
inline std::string simgatetype_to_string(SimGateType type) {
25+
inline std::string simgatetype_to_string(SimGateType type) /* GCOVR_EXCL_FUNCTION */ {
2626
switch (type) {
2727
case SimGateType::AND:
2828
return "AND";

src/backend/evaluator/simulator/logicState.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ inline logic_state_t fromBool(bool value) {
4343
return value ? logic_state_t::HIGH : logic_state_t::LOW;
4444
}
4545

46-
inline std::string to_string(logic_state_t state) {
46+
inline std::string to_string(logic_state_t state) /* GCOVR_EXCL_FUNCTION */ {
4747
switch (state) {
4848
case logic_state_t::LOW:
4949
return "L";
@@ -61,7 +61,7 @@ inline std::string to_string(logic_state_t state) {
6161
namespace fmt{
6262
template <>
6363
struct formatter<logic_state_t> : formatter<std::string> {
64-
auto format(logic_state_t state, format_context& ctx) const {
64+
auto format(logic_state_t state, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ {
6565
return formatter<std::string>::format(::to_string(state), ctx);
6666
}
6767
};

src/backend/position/position.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ struct std::hash<Vector> {
144144

145145
template <>
146146
struct fmt::formatter<Vector> : fmt::formatter<std::string> {
147-
auto format(Vector v, format_context& ctx) const { return formatter<std::string>::format(v.toString(), ctx); }
147+
auto format(Vector v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(v.toString(), ctx); }
148148
};
149149

150150
struct FVector {
@@ -196,7 +196,7 @@ struct FVector {
196196

197197
template <>
198198
struct fmt::formatter<FVector> : fmt::formatter<std::string> {
199-
auto format(FVector v, format_context& ctx) const { return formatter<std::string>::format(v.toString(), ctx); }
199+
auto format(FVector v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(v.toString(), ctx); }
200200
};
201201

202202
struct Position {
@@ -347,7 +347,7 @@ struct std::hash<std::pair<Position, Position>> {
347347

348348
template <>
349349
struct fmt::formatter<Position> : fmt::formatter<std::string> {
350-
auto format(Position v, format_context& ctx) const { return formatter<std::string>::format(v.toString(), ctx); }
350+
auto format(Position v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(v.toString(), ctx); }
351351
};
352352

353353
struct FPosition {
@@ -402,7 +402,7 @@ inline bool areaWithinArea(FPosition area1Small, FPosition area1Large, FPosition
402402

403403
template <>
404404
struct fmt::formatter<FPosition> : fmt::formatter<std::string> {
405-
auto format(FPosition v, format_context& ctx) const { return formatter<std::string>::format(v.toString(), ctx); }
405+
auto format(FPosition v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(v.toString(), ctx); }
406406
};
407407

408408
struct Size {
@@ -447,7 +447,7 @@ struct Size {
447447

448448
template <>
449449
struct fmt::formatter<Size> : fmt::formatter<std::string> {
450-
auto format(Size v, format_context& ctx) const { return formatter<std::string>::format(v.toString(), ctx); }
450+
auto format(Size v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(v.toString(), ctx); }
451451
};
452452

453453
class Size::Iterator {
@@ -562,7 +562,7 @@ struct FSize {
562562

563563
template <>
564564
struct fmt::formatter<FSize> : fmt::formatter<std::string> {
565-
auto format(FSize v, format_context& ctx) const { return formatter<std::string>::format(v.toString(), ctx); }
565+
auto format(FSize v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(v.toString(), ctx); }
566566
};
567567

568568
// conversion
@@ -583,7 +583,7 @@ enum Rotation : std::uint8_t {
583583

584584
template <>
585585
struct fmt::formatter<Rotation> : fmt::formatter<std::string> {
586-
auto format(Rotation v, format_context& ctx) const {
586+
auto format(Rotation v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ {
587587
switch (v) {
588588
case Rotation::TWO_SEVENTY: return "TWO_SEVENTY";
589589
case Rotation::ONE_EIGHTY: return "ONE_EIGHTY";
@@ -739,7 +739,7 @@ struct Orientation {
739739

740740
template <>
741741
struct fmt::formatter<Orientation> : fmt::formatter<std::string> {
742-
auto format(Orientation o, format_context& ctx) const { return formatter<std::string>::format(o.toString(), ctx); }
742+
auto format(Orientation o, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(o.toString(), ctx); }
743743
};
744744

745745
#endif /* position_h */

src/util/id.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace fmt {
104104
template <class Tag, class Rep>
105105
struct formatter<Id<Tag, Rep>> : formatter<Rep> {
106106
template <typename FormatContext>
107-
auto format(const Id<Tag, Rep>& id, FormatContext& ctx) const {
107+
auto format(const Id<Tag, Rep>& id, FormatContext& ctx) const /* GCOVR_EXCL_FUNCTION */ {
108108
return formatter<Rep>::format(id.get(), ctx);
109109
}
110110
};

src/util/vec2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct Vec2Int {
2929

3030
template <>
3131
struct fmt::formatter<Vec2Int> : fmt::formatter<std::string> {
32-
auto format(Vec2Int v, format_context& ctx) const { return formatter<std::string>::format(v.toString(), ctx); }
32+
auto format(Vec2Int v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(v.toString(), ctx); }
3333
};
3434

3535
inline Vec2Int rotateVector(Vec2Int vector, Rotation rotationAmount) noexcept {
@@ -84,7 +84,7 @@ struct Vec2 {
8484

8585
template <>
8686
struct fmt::formatter<Vec2> : fmt::formatter<std::string> {
87-
auto format(Vec2 v, format_context& ctx) const { return formatter<std::string>::format(v.toString(), ctx); }
87+
auto format(Vec2 v, format_context& ctx) const /* GCOVR_EXCL_FUNCTION */ { return formatter<std::string>::format(v.toString(), ctx); }
8888
};
8989

9090
#endif /* vec2_h */

0 commit comments

Comments
 (0)