1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-01 11:04:34 +00:00
cc65/test
Jesse Rosenstock 3df6c383c0 Add support for static_assert
Add C11's _Static_assert and static_assert macro.

This is like #error, but is handled at a later stage
of translation, so it is possible to check sizes of
types, values of enums, etc.

https://en.cppreference.com/w/c/language/_Static_assert
https://port70.net/~nsz/c/c11/n1570.html#6.7.10
2020-07-30 19:17:11 +02:00
..
asm Move .NOTPARALLEL closer to rule that needs it 2020-07-10 13:08:19 +02:00
dasm
err Add support for static_assert 2020-07-30 19:17:11 +02:00
misc Moved misc/bug1048 as it is already correctly rejected by the compiler. 2020-07-28 23:26:25 +02:00
ref removed references to macros from common.h 2020-07-21 23:50:23 +02:00
todo Add test for #1139 2020-07-30 19:13:19 +02:00
val Add support for static_assert 2020-07-30 19:17:11 +02:00
.gitignore
bdiff.c
CPYRIGHT.LCC Add test license description. 2020-06-27 02:23:40 +02:00
Makefile Adjusted to 5df2de0629 (and slightly simplified). 2020-07-27 17:47:14 +02:00
readme.txt fix wording 2020-07-27 14:40:27 +02:00

This directory contains test code for automatic regression testing of the CC65
compiler.


/val  - The bulk of tests are contained here, individual tests should exit with
        an exit code of EXIT_SUCCESS when they pass, or EXIT_FAILURE on error.

/ref  - These tests produce output that must be compared with reference output.

/err  - contains tests that MUST NOT compile

/todo - These tests fail due to open compiler issues.

        The makefile in this directory _expects_ the tests to fail, because of
        that when an issue was fixed it will break the CI. The test should get 
        moved to /var in the PR fixing the issue, which will make CI pass again.
        No changes to makefiles are required!

/asm  - contains the assembler regression tests

/dasm - contains the disassembler regression tests

/misc - a few tests that need special care of some sort

        Tests that (incorrectly) fail to compile and other tests that fail and
        do NOT return an exit code are collected here. The makefile _expects_
        those tests to fail, so when an issue is fixed it will break the CI.
        When this happens, the PR fixing the issue should also "invert" the
        failing condition in the makefile by adding a $(NOT) before the
        offending line (or removing it when it is already there), which will
        make the CI pass again. The test should then be moved elsewhere later,
        which will require additional changes to the makefile(s).


To run the tests use "make" in this (top) directory, the makefile should exit
with no error.

When a test failed you can use "make continue" to run further tests.

--------------------------------------------------------------------------------

TODO:

- reduce usage of "common.h" to a minimum
- convert more tests from using reference output to returning an exit code