Internals: Add lcov code coverage markers.

This commit is contained in:
Wilson Snyder
2019-06-30 22:37:03 -04:00
parent ac43e7322b
commit 01ef7122e9
29 changed files with 388 additions and 85 deletions
+3 -6
View File
@@ -331,7 +331,7 @@ V3Number& V3Number::setLongS(vlsint32_t value) {
return *this;
}
V3Number& V3Number::setDouble(double value) {
if (VL_UNLIKELY(width()!=64)) {
if (VL_UNCOVERABLE(width()!=64)) {
v3fatalSrc("Real operation on wrong sized number");
}
m_double = true;
@@ -685,11 +685,8 @@ uint32_t V3Number::toUInt() const {
}
double V3Number::toDouble() const {
if (VL_UNLIKELY(!isDouble())) {
v3fatalSrc("Real conversion on non-real number");
}
if (VL_UNLIKELY(width()!=64)) {
v3fatalSrc("Real operation on wrong sized number");
if (VL_UNCOVERABLE(!isDouble() || width()!=64)) {
v3fatalSrc("Real operation on wrong sized/non-real number");
}
union { double d; uint32_t u[2]; } u;
u.u[0] = m_value[0]; u.u[1] = m_value[1];