Skip to content

Commit 4d595b8

Browse files
committed
Add LCOV exclude markers
1 parent b930cd8 commit 4d595b8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

include/boost/decimal/dpd_conversion.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,10 @@ constexpr auto encode_dpd(std::uint8_t d1, std::uint8_t d2, std::uint8_t d3) ->
217217
result_b[8] = static_cast<std::uint8_t>(1);
218218
result_b[9] = b3[3];
219219
break;
220-
220+
// LCOV_EXCL_START
221221
default:
222222
BOOST_DECIMAL_UNREACHABLE;
223+
// LCOV_EXCL_STOP
223224
}
224225

225226
// Now that we have the bit pattern of the result we need to write it into uint16_t and return the result
@@ -300,10 +301,12 @@ constexpr auto decode_dpd(std::uint32_t dpd_bits, std::uint8_t& d3, std::uint8_t
300301
d2 = static_cast<std::uint8_t>(8U + b[5]);
301302
d3 = static_cast<std::uint8_t>(8U + b[9]);
302303
}
304+
// LCOV_EXCL_START
303305
else
304306
{
305307
BOOST_DECIMAL_UNREACHABLE;
306308
}
309+
// LCOV_EXCL_STOP
307310
}
308311

309312
} // namespace detail
@@ -371,8 +374,10 @@ constexpr auto to_dpd_d32(DecimalType val) noexcept
371374
case 2U:
372375
combination_field_bits = d0_is_nine ? 0b11101 : 0b11100;
373376
break;
377+
// LCOV_EXCL_START
374378
default:
375379
BOOST_DECIMAL_UNREACHABLE;
380+
// LCOV_EXCL_STOP
376381
}
377382
}
378383
// If d0 is 0 to 7 then we follow section II
@@ -396,8 +401,10 @@ constexpr auto to_dpd_d32(DecimalType val) noexcept
396401
combination_field_bits = 0b10000;
397402
combination_field_bits |= d0_mask;
398403
break;
404+
// LCOV_EXCL_START
399405
default:
400406
BOOST_DECIMAL_UNREACHABLE;
407+
// LCOV_EXCL_STOP
401408
}
402409
}
403410

0 commit comments

Comments
 (0)