mrdudz
f0e4053a0d
added test related to issue #1178
2020-08-14 19:58:58 +02:00
acqn
1d28e8e3de
Improved test case for Issue #191 .
2020-08-14 18:33:54 +02:00
mrdudz
dc83eb15af
added test related to issue #1181
2020-08-14 16:12:17 +02:00
acqn
8b8561161c
Moved #1098 bug tests from test/misc to test/err as they are fixed now.
2020-08-12 15:02:43 +02:00
acqn
e3d913b81a
Fixed the reference output of test/misc/goto.c (test/misc/goto.ref).
2020-08-02 23:51:11 +02:00
Jesse Rosenstock
633cd17a3e
Add enum size test case for #1050
2020-08-02 01:18:28 +02:00
Jesse Rosenstock
847982c6bf
Handle bit-field test after shift/mask
...
Previously, bit-field tests were incorrectly combined with load in
`if (x.bitfield)`. Delay the test until after the shift/mask
is done. Still combine tests with load if no shift/mask is required.
Fixes #1139
2020-07-31 19:33:28 +02:00
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
Jesse Rosenstock
c72fa735b9
Add test for #1139
2020-07-30 19:13:19 +02:00
Jesse Rosenstock
2d5fd0fc63
Use char ops if possible for bit-field loads
...
Set CF_FORCECHAR and change type to char once we have
shifted into a char.
This saves some unnecessary ldx #0 instructions.
2020-07-30 14:59:23 +02:00
Jesse Rosenstock
aaa0cf5448
Add err tests for bitfield width errors
...
! ../../bin/cc65 -o ../../testwrk/err/bitfield-named-zero-width.s bitfield-named-zero-width.c
bitfield-named-zero-width.c(27): Error: Zero width for named bit-field
! ../../bin/cc65 -o ../../testwrk/err/bitfield-negative-width.s bitfield-negative-width.c
bitfield-negative-width.c(26): Error: Negative width in bit-field
! ../../bin/cc65 -o ../../testwrk/err/bitfield-too-wide.s bitfield-too-wide.c
bitfield-too-wide.c(26): Error: Width of bit-field exceeds its type
2020-07-30 08:10:38 +02:00
Jesse Rosenstock
74dda01919
Add test that plain int bitfields are unsigned
...
We want to make sure this doesn't change when #1095 is fixed;
unsigned is much more efficient.
2020-07-29 16:43:17 +02:00
acqn
35e1efc7f2
Moved misc/bug1048 as it is already correctly rejected by the compiler.
2020-07-28 23:26:25 +02:00
Jesse Rosenstock
c272c73686
Add err test for char bit-fields #1047
2020-07-28 22:03:01 +02:00
Jesse Rosenstock
c0f2b69bef
Add test case for sign extending < 1 byte
2020-07-28 22:01:22 +02:00
Jesse Rosenstock
04d16b3740
Make $WORKDIR for tests/err
...
Without this, if there is a test that can compile,
it will still fail because the WORKDIR does not exist:
```
pass.c(1): Fatal: Cannot open output file '../../testwrk/err/pass.s': No such file or directory
```
2020-07-28 21:59:12 +02:00
Oliver Schmidt
4316242d7e
Adjusted to 5df2de0629
(and slightly simplified).
2020-07-27 17:47:14 +02:00
mrdudz
ed3f281b9e
fix wording
2020-07-27 14:40:27 +02:00
mrdudz
afe455238c
added test related to issue #1113
2020-07-22 15:55:55 +02:00
mrdudz
98b2d43c2b
added tests related to pr #1110
2020-07-22 15:52:04 +02:00
mrdudz
ce06b20c6c
add some details to the readme
2020-07-22 15:31:39 +02:00
mrdudz
844f5a9d33
hook up test/todo in the toplevel test makefile
2020-07-22 15:12:29 +02:00
mrdudz
6abf24e25e
move test for issue #1077 to test/val
2020-07-22 15:12:02 +02:00
mrdudz
e22e9c403c
added testcase for issue #1098
2020-07-22 14:57:40 +02:00
mrdudz
eb094ecf6a
remove ifdef magic
2020-07-22 00:21:23 +02:00
mrdudz
4a9c5ff63b
use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day
2020-07-22 00:09:48 +02:00
mrdudz
6d518a61a5
Merge branch 'master' of https://github.com/cc65/cc65
2020-07-21 23:52:24 +02:00
mrdudz
df900e30b8
removed references to macros from common.h
2020-07-21 23:50:23 +02:00
Brad Smith
041f981960
rand() use XOR to break up unwanted pair correlation ( #1107 )
...
* rand() use XOR to break up unwanted pair correlation
This form of rand() cannot return the same value twice in a row.
Two additonal EOR instructions produce a more even distribution of successive pairs.
see comments on #951
* rand.s document purpose of XOR
* suggested srand() optimization: zero fill unnecessary
* test to validate implementation of rand()
* srand() improving behaviour and adding startup test
* srand() with a tail call to rand() for better initial shuffle
* srand() can fall through to rand() instead of tail call
2020-07-21 23:38:18 +02:00
mrdudz
7e1f4760e7
remove common.h from test/misc, its no more used
2020-07-21 23:31:58 +02:00
mrdudz
2bbea6779a
properly configure sitest so it could work, if we had the respective features :)
2020-07-21 23:04:03 +02:00
mrdudz
9e43c0a569
added a test related to pr#1102 - we can now return structs by value when they are max. 4 bytes
2020-07-21 21:04:41 +02:00
mrdudz
145084c41c
move test for issue #1075 to test/var
2020-07-21 20:02:51 +02:00
mrdudz
42c162c15e
rework test for issue #1075 to return an exit code
2020-07-21 19:58:36 +02:00
mrdudz
a0c80a8c72
move (now working) tests to test/val
2020-07-21 19:24:39 +02:00
mrdudz
b2d7998241
update makefile to use $(NOT) as discussed with Oliver
2020-07-21 19:15:41 +02:00
mrdudz
e4fc7a0fec
reworked pptest3 into an exectutable test and moved to test/val
2020-07-21 15:30:35 +02:00
mrdudz
010ed6d729
reworked pptest1/4/5 into executable tests and moved to test/val
2020-07-21 14:58:15 +02:00
mrdudz
638e254668
rework pptest2 into a runable test and move to test/misc (since it does not compile with cc65)
2020-07-21 14:48:49 +02:00
Greg King
517df130cc
Made a regression test increment a variable after, instead of before, using it.
...
That change allows the initial value of zero to be tested.
2020-07-20 17:16:11 -04:00
mrdudz
5a9d76ad52
added test for issue #1108
2020-07-20 15:50:11 +02:00
Jesse Rosenstock
bbcb39978c
Add test of signed bitfields for #1095
2020-07-19 11:05:27 +02:00
mrdudz
a4f1e37f0c
increase the maximum amount of cycles, else the shift test will fail
2020-07-13 21:26:31 +02:00
mrdudz
5ad365c5df
some tweaks to the moved tests to make them more suitable for automatic testing
2020-07-13 21:26:07 +02:00
mrdudz
882194c221
move a bunch of tests from testcode/lib to test/val (and a failing one to test/todo)
2020-07-13 21:25:13 +02:00
mrdudz
d940c9aa85
added a bit more precise description
2020-07-13 17:04:22 +02:00
mrdudz
390f972014
updated Makefile with exception rules for the added tests
2020-07-13 15:16:26 +02:00
mrdudz
5597b83d04
added testcase for issue #975
2020-07-13 15:13:38 +02:00
mrdudz
36ff372149
added testcase for issue #760
2020-07-13 15:13:22 +02:00
mrdudz
bec140143b
added testcase for issue #760
2020-07-13 15:13:06 +02:00