mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use LCOV_EXCL comments to exclude some lines from test coverage (#1662)
This commit is contained in:
@@ -7,6 +7,17 @@ FOR V, 1, 100
|
||||
PRINTLN "cont"
|
||||
ENDR
|
||||
WARN "done {d:V}"
|
||||
rept 2
|
||||
break
|
||||
; skips nested code
|
||||
rept 3
|
||||
println "\tinner"
|
||||
endr
|
||||
if 1
|
||||
println "\tconditional"
|
||||
endc
|
||||
println "outer"
|
||||
endr
|
||||
rept 1
|
||||
break
|
||||
; skips invalid code
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
warning: break.asm(9): [-Wuser]
|
||||
done 5
|
||||
warning: break.asm(17): [-Wuser]
|
||||
warning: break.asm(28): [-Wuser]
|
||||
OK
|
||||
error: break.asm(18):
|
||||
error: break.asm(29):
|
||||
BREAK can only be used inside a REPT/FOR block
|
||||
FATAL: break.asm(19) -> break.asm::REPT~1(23):
|
||||
FATAL: break.asm(30) -> break.asm::REPT~1(34):
|
||||
Ended block with 1 unterminated IF construct
|
||||
|
||||
@@ -19,7 +19,7 @@ DEF copy EQUS STRSUB("{invalid}", 1)
|
||||
println "\"{#s:invalid}\" == \"{#s:copy}\" ({d:n})"
|
||||
|
||||
DEF mid1 EQUS STRSUB("{invalid}", 5, 2)
|
||||
DEF mid2 EQUS STRSUB("{invalid}", 9, 1)
|
||||
DEF mid2 EQUS STRSLICE("{invalid}", 8, 9)
|
||||
println "\"{#s:mid2}{#s:mid1}\""
|
||||
|
||||
; characters:
|
||||
@@ -53,3 +53,6 @@ println "\"{#s:invalid}\": {d:n} == {d:r}"
|
||||
|
||||
DEF final EQUS STRSUB("{invalid}", 4, 1)
|
||||
println "\"{#s:invalid}\" ends \"{#s:final}\""
|
||||
|
||||
REDEF final EQUS STRSLICE("{invalid}", 3, 4)
|
||||
println "\"{#s:invalid}\" ends \"{#s:final}\""
|
||||
|
||||
@@ -15,9 +15,9 @@ error: invalid-utf-8-strings.asm(17):
|
||||
error: invalid-utf-8-strings.asm(17):
|
||||
STRSUB: Invalid UTF-8 byte 0xA2
|
||||
error: invalid-utf-8-strings.asm(22):
|
||||
STRSUB: Invalid UTF-8 byte 0xA3
|
||||
STRSLICE: Invalid UTF-8 byte 0xA3
|
||||
error: invalid-utf-8-strings.asm(22):
|
||||
STRSUB: Invalid UTF-8 byte 0xA4
|
||||
STRSLICE: Invalid UTF-8 byte 0xA4
|
||||
error: invalid-utf-8-strings.asm(35):
|
||||
STRLEN: Invalid UTF-8 byte 0xFE
|
||||
error: invalid-utf-8-strings.asm(35):
|
||||
@@ -56,4 +56,6 @@ error: invalid-utf-8-strings.asm(50):
|
||||
STRLEN: Incomplete UTF-8 character
|
||||
error: invalid-utf-8-strings.asm(54):
|
||||
STRSUB: Incomplete UTF-8 character
|
||||
error: Assembly aborted (29 errors)!
|
||||
error: invalid-utf-8-strings.asm(57):
|
||||
STRSLICE: Incomplete UTF-8 character
|
||||
error: Assembly aborted (30 errors)!
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
"漢<>"
|
||||
"abc<62><63>": 4 == 4
|
||||
"abc<62><63>" ends "<22><>"
|
||||
"abc<62><63>" ends "<22><>"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
5
test/asm/macro-arg-illegal-escape.asm
Normal file
5
test/asm/macro-arg-illegal-escape.asm
Normal file
@@ -0,0 +1,5 @@
|
||||
MACRO mac
|
||||
DEF s EQUS "\#"
|
||||
println "{#s:s}"
|
||||
ENDM
|
||||
mac \\\"\t\r\0\n\{\}\,\(\)\w\
|
||||
@@ -1,5 +1,5 @@
|
||||
error: macro-arg-escape-chars.asm(5):
|
||||
error: macro-arg-illegal-escape.asm(5):
|
||||
Illegal character escape 'w'
|
||||
error: macro-arg-escape-chars.asm(5):
|
||||
error: macro-arg-illegal-escape.asm(5):
|
||||
Illegal character escape at end of input
|
||||
error: Assembly aborted (2 errors)!
|
||||
1
test/asm/macro-arg-illegal-escape.out
Normal file
1
test/asm/macro-arg-illegal-escape.out
Normal file
@@ -0,0 +1 @@
|
||||
\\\"\t\r\0\n\{},()w\\
|
||||
@@ -28,7 +28,10 @@ purge #name
|
||||
assert !def(name) && !def(#name) && def(hello)
|
||||
|
||||
section "test", rom0
|
||||
#label:
|
||||
|
||||
db #hello
|
||||
dw #hello
|
||||
dl #hello
|
||||
|
||||
#label:
|
||||
dw BANK(#label), #label
|
||||
|
||||
Binary file not shown.
2
test/asm/unterminated-if-eof.asm
Normal file
2
test/asm/unterminated-if-eof.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
if 0
|
||||
; no newline at end of file
|
||||
2
test/asm/unterminated-if-eof.err
Normal file
2
test/asm/unterminated-if-eof.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: unterminated-if-eof.asm(2):
|
||||
Ended block with 1 unterminated IF construct
|
||||
@@ -109,6 +109,10 @@ for f in *.[12]bpp; do
|
||||
runTest && tryCmp "$f" result.2bpp || failTest $?
|
||||
done
|
||||
|
||||
# Test writing to stdout
|
||||
newTest "$RGBGFX -m -o - write_stdout.bin > result.2bpp"
|
||||
runTest && tryCmp write_stdout.out.2bpp result.2bpp || failTest $?
|
||||
|
||||
if [[ "$failed" -eq 0 ]]; then
|
||||
echo "${bold}${green}All ${tests} tests passed!${rescolors}${resbold}"
|
||||
else
|
||||
|
||||
BIN
test/gfx/write_stdout.bin
Normal file
BIN
test/gfx/write_stdout.bin
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 127 B |
1
test/gfx/write_stdout.out.2bpp
Normal file
1
test/gfx/write_stdout.out.2bpp
Normal file
@@ -0,0 +1 @@
|
||||
? @@˙Ś˙’˙€˙€đ‚đŹxG~A? ˙ńâ~‚üřŕŕ
|
||||
Reference in New Issue
Block a user