mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 02:02:06 +00:00
Add test for undefined __SCOPE__
This commit is contained in:
@@ -3,6 +3,11 @@ assert !DEF(@)
|
||||
println @
|
||||
println "{@}?"
|
||||
|
||||
; not inside a section
|
||||
assert !DEF(__SCOPE__)
|
||||
println __SCOPE__
|
||||
println "{__SCOPE__}?"
|
||||
|
||||
; not inside a global scope
|
||||
assert !DEF(.)
|
||||
println .
|
||||
@@ -23,6 +28,10 @@ assert DEF(@)
|
||||
println @
|
||||
println "{@}!"
|
||||
|
||||
assert DEF(__SCOPE__)
|
||||
println __SCOPE__
|
||||
println "{__SCOPE__}!"
|
||||
|
||||
GlobalScope:
|
||||
assert DEF(.)
|
||||
println .
|
||||
|
||||
@@ -2,16 +2,20 @@ error: PC has no value outside of a section
|
||||
at undefined-builtins.asm(3)
|
||||
error: Interpolated symbol `@` does not exist
|
||||
at undefined-builtins.asm(4)
|
||||
error: `.` has no value outside of a label scope
|
||||
error: `__SCOPE__` has no value outside of a section
|
||||
at undefined-builtins.asm(8)
|
||||
error: Interpolated symbol `.` does not exist
|
||||
error: Interpolated symbol `__SCOPE__` does not exist
|
||||
at undefined-builtins.asm(9)
|
||||
error: `..` has no value outside of a local label scope
|
||||
error: `.` has no value outside of a label scope
|
||||
at undefined-builtins.asm(13)
|
||||
error: Interpolated symbol `..` does not exist
|
||||
error: Interpolated symbol `.` does not exist
|
||||
at undefined-builtins.asm(14)
|
||||
error: `_NARG` has no value outside of a macro
|
||||
error: `..` has no value outside of a local label scope
|
||||
at undefined-builtins.asm(18)
|
||||
error: Interpolated symbol `_NARG` does not exist
|
||||
error: Interpolated symbol `..` does not exist
|
||||
at undefined-builtins.asm(19)
|
||||
Assembly aborted with 8 errors!
|
||||
error: `_NARG` has no value outside of a macro
|
||||
at undefined-builtins.asm(23)
|
||||
error: Interpolated symbol `_NARG` does not exist
|
||||
at undefined-builtins.asm(24)
|
||||
Assembly aborted with 10 errors!
|
||||
|
||||
@@ -3,11 +3,15 @@ $0
|
||||
|
||||
?
|
||||
|
||||
?
|
||||
|
||||
?
|
||||
$0
|
||||
?
|
||||
$42
|
||||
$42!
|
||||
|
||||
!
|
||||
$42
|
||||
GlobalScope!
|
||||
$42
|
||||
|
||||
Reference in New Issue
Block a user