mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 22:37:50 +00:00
Add more tests for RGBASM coverage
This commit is contained in:
@@ -632,7 +632,8 @@ static void verboseOutputConfig() {
|
||||
fputs("\t]\n", stderr);
|
||||
}
|
||||
// -L/--slice
|
||||
if (options.inputSlice.specified()) {
|
||||
if (options.inputSlice.width || options.inputSlice.height || options.inputSlice.left
|
||||
|| options.inputSlice.top) {
|
||||
fprintf(
|
||||
stderr,
|
||||
"\tInput image slice: %" PRIu16 "x%" PRIu16 " pixels starting at (%" PRIu16 ", %" PRIu16
|
||||
|
||||
@@ -84,6 +84,8 @@ std::optional<uint64_t> parseNumber(char const *&str, NumberBase base) {
|
||||
// Identify the base if not specified
|
||||
// Does *not* support '+' or '-' sign prefix (unlike `strtoul` and `std::from_chars`)
|
||||
if (base == BASE_AUTO) {
|
||||
base = BASE_10;
|
||||
|
||||
// Skips leading blank space (like `strtoul`)
|
||||
str += strspn(str, " \t");
|
||||
|
||||
@@ -118,17 +120,10 @@ std::optional<uint64_t> parseNumber(char const *&str, NumberBase base) {
|
||||
base = BASE_16;
|
||||
str += 2;
|
||||
break;
|
||||
default:
|
||||
base = BASE_10;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
base = BASE_10;
|
||||
break;
|
||||
}
|
||||
}
|
||||
assume(base != BASE_AUTO);
|
||||
|
||||
// Get the digit-condition function corresponding to the base
|
||||
bool (*canParseDigit)(int c) = base == BASE_2 ? isBinDigit
|
||||
|
||||
Reference in New Issue
Block a user