mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-23 11:32:07 +00:00
Add more RGBLINK test coverage (#1637)
This commit is contained in:
@@ -83,7 +83,7 @@ void sect_CheckSizes() {
|
||||
if (uint32_t maxSize = sectionTypeInfo[sect.type].size; sect.size > maxSize) {
|
||||
error(
|
||||
"Section '%s' grew too big (max size = 0x%" PRIX32 " bytes, reached 0x%" PRIX32
|
||||
").\n",
|
||||
")\n",
|
||||
sect.name.c_str(),
|
||||
maxSize,
|
||||
sect.size
|
||||
@@ -239,7 +239,7 @@ static void mergeSections(
|
||||
}
|
||||
|
||||
if (sect.modifier != mod) {
|
||||
sectError("Section already declared as %s section\n", sectionModNames[sect.modifier]);
|
||||
sectError("Section already declared as SECTION %s\n", sectionModNames[sect.modifier]);
|
||||
} else {
|
||||
switch (mod) {
|
||||
case SECTION_UNION:
|
||||
@@ -850,8 +850,8 @@ void sect_PCRelByte(Expression &expr, uint32_t pcShift) {
|
||||
|
||||
if (offset < -128 || offset > 127) {
|
||||
error(
|
||||
"jr target must be between -128 and 127 bytes away, not %" PRId16
|
||||
"; use jp instead\n",
|
||||
"JR target must be between -128 and 127 bytes away, not %" PRId16
|
||||
"; use JP instead\n",
|
||||
offset
|
||||
);
|
||||
writeByte(0);
|
||||
|
||||
@@ -516,8 +516,8 @@ static void applyFilePatches(Section §ion, Section &dataSection) {
|
||||
error(
|
||||
patch.src,
|
||||
patch.lineNo,
|
||||
"jr target must be between -128 and 127 bytes away, not %" PRId16
|
||||
"; use jp instead\n",
|
||||
"JR target must be between -128 and 127 bytes away, not %" PRId16
|
||||
"; use JP instead",
|
||||
jumpOffset
|
||||
);
|
||||
}
|
||||
|
||||
@@ -133,12 +133,12 @@ static void mergeSections(Section &target, std::unique_ptr<Section> &&other) {
|
||||
if (target.modifier != other->modifier) {
|
||||
fprintf(
|
||||
stderr,
|
||||
"error: Section \"%s\" is defined as %s at ",
|
||||
"error: Section \"%s\" is defined as SECTION %s at ",
|
||||
target.name.c_str(),
|
||||
sectionModNames[target.modifier]
|
||||
);
|
||||
target.src->dump(target.lineNo);
|
||||
fprintf(stderr, ", but as %s at ", sectionModNames[other->modifier]);
|
||||
fprintf(stderr, ", but as SECTION %s at ", sectionModNames[other->modifier]);
|
||||
other->src->dump(other->lineNo);
|
||||
putc('\n', stderr);
|
||||
exit(1);
|
||||
|
||||
@@ -68,7 +68,7 @@ SectionTypeInfo sectionTypeInfo[SECTTYPE_INVALID] = {
|
||||
// clang-format on
|
||||
|
||||
char const * const sectionModNames[] = {
|
||||
"regular", // SECTION_NORMAL
|
||||
"union", // SECTION_UNION
|
||||
"fragment", // SECTION_FRAGMENT
|
||||
"(no modifier)", // SECTION_NORMAL
|
||||
"UNION", // SECTION_UNION
|
||||
"FRAGMENT", // SECTION_FRAGMENT
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user