mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
Exclude more lines from test coverage (#1663)
These fall into a few categories: - `_unreachable()` - Verbose print messages - Errors that should never practically occur (alloc/read/write failure, more than UINT32_MAX anonymous labels, etc)
This commit is contained in:
@@ -424,5 +424,5 @@ max_out:
|
||||
}
|
||||
}
|
||||
|
||||
unreachable_();
|
||||
unreachable_(); // LCOV_EXCL_LINE
|
||||
}
|
||||
|
||||
@@ -397,11 +397,15 @@ int main(int argc, char *argv[]) {
|
||||
is32kMode = true;
|
||||
break;
|
||||
case 'V':
|
||||
// LCOV_EXCL_START
|
||||
printf("rgblink %s\n", get_package_version_string());
|
||||
exit(0);
|
||||
// LCOV_EXCL_STOP
|
||||
case 'v':
|
||||
// LCOV_EXCL_START
|
||||
beVerbose = true;
|
||||
break;
|
||||
// LCOV_EXCL_STOP
|
||||
case 'w':
|
||||
isWRAM0Mode = true;
|
||||
break;
|
||||
|
||||
@@ -228,7 +228,7 @@ static uint8_t parseHexDigit(int c) {
|
||||
} else if (c >= 'a' && c <= 'f') {
|
||||
return c - 'a' + 10;
|
||||
} else {
|
||||
unreachable_();
|
||||
unreachable_(); // LCOV_EXCL_LINE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -208,8 +208,10 @@ static void mergeSections(Section &target, std::unique_ptr<Section> &&other) {
|
||||
break;
|
||||
|
||||
case SECTION_NORMAL:
|
||||
// LCOV_EXCL_START
|
||||
unreachable_();
|
||||
}
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
// Note that the order in which fragments are stored in the `nextu` list does not
|
||||
// really matter, only that offsets were properly computed above
|
||||
|
||||
Reference in New Issue
Block a user