The tests are not exhaustive, there are some conditions that aren't
checked. The tests are based in the C standard rules about undefined
behaviour.
This is a compatibility break but, hopefully, all projects are using
sane values. If not, there is no guarantee that the projects will build
in any platform where RGBDS can be compiled, so it would be better to
fix them.
Even though, technically, the left shift of a negative value is always
undefined, some projects rely on its current behaviour. This is the
reason why this doesn't cause a fatal error.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
Small tests like the ones included in this repository are good to test
individual features, but it is also a good idea to test some real
projects.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
NULL error messages have been given a description.
Messages that weren't descriptive enough now also print the name of the
function that has failed.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This ensures that the test scripts are correctly run with the Bourne shell, regardless of the (potentially more exotic) shell that is used to invoke the script.
The error message shouldn't specify the name of the binary, that's
supposed to be known by the caller.
Update test reference outputs.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
Due to recent changes, lots of tests generated a slightly different
error output.
- bank-noexist : This test doesn't generate any error output now as
unknown labels are left for the linker to resolve.
- null-in-macro : This test used to crash. Now, the parser verifies that
a MACRO ends in ENDM, generating an error message if not.
Signed-off-by: AntonioND <antonio_nd@outlook.com>