mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Test more cases in label-diff test
This commit is contained in:
@@ -31,20 +31,20 @@ POPS ; Ensure we are in neither section
|
||||
; Diffing two labels in the same SECTION as well
|
||||
print_diff Known2, Known
|
||||
; Diffing a constant and a "floating" label cannot work
|
||||
; ...And that causes a fatal error print_diff Constant, Known
|
||||
print_diff Constant, Known
|
||||
; Diffing a constant and a ref cannot work
|
||||
; ...And that causes a fatal error print_diff Constant, Unknown
|
||||
print_diff Constant, Unknown
|
||||
; Diffing a floating label and a ref cannot work
|
||||
; ...And that causes a fatal error print_diff Known, Unknown
|
||||
print_diff Known, Unknown
|
||||
|
||||
; Now let's fiddle with PC
|
||||
SECTION "fixed PC", ROM0[420]
|
||||
; Diffing a constant and PC should work
|
||||
print_diff Constant, @
|
||||
; Diffing a floating label and PC cannot work
|
||||
; ...And that causes a fatal error print_diff Known, @
|
||||
print_diff Known, @
|
||||
; Diffinf a ref and PC cannot work
|
||||
; ...And that causes a fatal error print_diff Unknown, @
|
||||
print_diff Unknown, @
|
||||
; Diffing PC and PC should work
|
||||
print_diff @, @
|
||||
; Diffing PC and a label from here should work
|
||||
@@ -53,11 +53,11 @@ LocalFixed:
|
||||
|
||||
SECTION "Floating PC", ROM0
|
||||
; Diffing a constant and PC cannot work
|
||||
; ...And that causes a fatal error print_diff Constant, @
|
||||
print_diff Constant, @
|
||||
; Diffing a floating label and PC cannot work
|
||||
; ...And that causes a fatal error print_diff Known, @
|
||||
print_diff Known, @
|
||||
; Diffinf a ref and PC cannot work
|
||||
; ...And that causes a fatal error print_diff Unknown, @
|
||||
print_diff Unknown, @
|
||||
; Diffing PC and PC should work
|
||||
print_diff @, @
|
||||
; Diffing PC and a label from here should work
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
ERROR: label-diff.asm(34) -> label-diff.asm::print_diff(20):
|
||||
Expected constant expression: 'Known' is not constant at assembly time
|
||||
ERROR: label-diff.asm(34) -> label-diff.asm::print_diff(22):
|
||||
Expected constant expression: 'Known' is not constant at assembly time
|
||||
ERROR: label-diff.asm(36) -> label-diff.asm::print_diff(20):
|
||||
Expected constant expression: 'Unknown' is not constant at assembly time
|
||||
ERROR: label-diff.asm(36) -> label-diff.asm::print_diff(22):
|
||||
Expected constant expression: 'Unknown' is not constant at assembly time
|
||||
ERROR: label-diff.asm(38) -> label-diff.asm::print_diff(20):
|
||||
Expected constant expression: 'Known' is not constant at assembly time
|
||||
ERROR: label-diff.asm(38) -> label-diff.asm::print_diff(22):
|
||||
Expected constant expression: 'Unknown' is not constant at assembly time
|
||||
ERROR: label-diff.asm(45) -> label-diff.asm::print_diff(20):
|
||||
Expected constant expression: 'Known' is not constant at assembly time
|
||||
ERROR: label-diff.asm(45) -> label-diff.asm::print_diff(22):
|
||||
Expected constant expression: 'Known' is not constant at assembly time
|
||||
ERROR: label-diff.asm(47) -> label-diff.asm::print_diff(20):
|
||||
Expected constant expression: 'Unknown' is not constant at assembly time
|
||||
ERROR: label-diff.asm(47) -> label-diff.asm::print_diff(22):
|
||||
Expected constant expression: 'Unknown' is not constant at assembly time
|
||||
ERROR: label-diff.asm(56) -> label-diff.asm::print_diff(20):
|
||||
Expected constant expression: PC is not constant at assembly time
|
||||
ERROR: label-diff.asm(56) -> label-diff.asm::print_diff(22):
|
||||
Expected constant expression: PC is not constant at assembly time
|
||||
ERROR: label-diff.asm(58) -> label-diff.asm::print_diff(20):
|
||||
Expected constant expression: 'Known' is not constant at assembly time
|
||||
ERROR: label-diff.asm(58) -> label-diff.asm::print_diff(22):
|
||||
Expected constant expression: PC is not constant at assembly time
|
||||
ERROR: label-diff.asm(60) -> label-diff.asm::print_diff(20):
|
||||
Expected constant expression: 'Unknown' is not constant at assembly time
|
||||
ERROR: label-diff.asm(60) -> label-diff.asm::print_diff(22):
|
||||
Expected constant expression: PC is not constant at assembly time
|
||||
error: Assembly aborted (16 errors)!
|
||||
|
||||
@@ -2,6 +2,12 @@ $FFFFFFE5
|
||||
$1B
|
||||
$4
|
||||
$FFFFFFFC
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$FFFFFE86
|
||||
$17A
|
||||
$0
|
||||
@@ -12,3 +18,13 @@ $0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
$0
|
||||
|
||||
Reference in New Issue
Block a user