mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Increase parser test coverage
This commit is contained in:
@@ -3,10 +3,10 @@ SECTION "fixed", ROM0[0]
|
|||||||
FixedBase:
|
FixedBase:
|
||||||
assert FixedBase ; This should eval (and fail) at compile time
|
assert FixedBase ; This should eval (and fail) at compile time
|
||||||
|
|
||||||
ds 0
|
ds 1
|
||||||
static_assert @ == 0, "@ ain't 0 now? (Hint: it's {@})"
|
static_assert @ - FixedBase == 0, "@ ain't 0 now? (Hint: it's {@})"
|
||||||
|
|
||||||
ds 42
|
ds 41
|
||||||
assert WARN, @ - FixedBase != 42 ; This should also eval at compile time
|
assert WARN, @ - FixedBase != 42 ; This should also eval at compile time
|
||||||
|
|
||||||
SECTION "floating", ROM0
|
SECTION "floating", ROM0
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
error: assert.asm(4):
|
error: assert.asm(4):
|
||||||
Assertion failed
|
Assertion failed
|
||||||
|
error: assert.asm(7):
|
||||||
|
Assertion failed: @ ain't 0 now? (Hint: it's $1)
|
||||||
warning: assert.asm(10): [-Wassert]
|
warning: assert.asm(10): [-Wassert]
|
||||||
Assertion failed
|
Assertion failed
|
||||||
error: assert.asm(18):
|
error: assert.asm(18):
|
||||||
|
|||||||
1
test/asm/bad-precision.asm
Normal file
1
test/asm/bad-precision.asm
Normal file
@@ -0,0 +1 @@
|
|||||||
|
assert round(3.6, 42) == 4.0
|
||||||
3
test/asm/bad-precision.err
Normal file
3
test/asm/bad-precision.err
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
error: bad-precision.asm(1):
|
||||||
|
Fixed-point precision must be between 1 and 31, not 42
|
||||||
|
Assembly aborted with 1 error!
|
||||||
1
test/asm/elif-outside-if.asm
Normal file
1
test/asm/elif-outside-if.asm
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ELIF 1
|
||||||
2
test/asm/elif-outside-if.err
Normal file
2
test/asm/elif-outside-if.err
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
FATAL: elif-outside-if.asm(1):
|
||||||
|
Found ELIF outside of an IF construct
|
||||||
1
test/asm/else-outside-if.asm
Normal file
1
test/asm/else-outside-if.asm
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ELSE
|
||||||
2
test/asm/else-outside-if.err
Normal file
2
test/asm/else-outside-if.err
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
FATAL: else-outside-if.asm(1):
|
||||||
|
Found ELSE outside of an IF construct
|
||||||
Reference in New Issue
Block a user