mirror of
https://github.com/cc65/cc65.git
synced 2026-04-21 09:17:52 +00:00
Added more tests.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.define debug(x) .out x
|
||||
@@ -0,0 +1,3 @@
|
||||
.repeat 10
|
||||
.byte $00
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
.import foo
|
||||
|
||||
foo = 3
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
foo = 3
|
||||
|
||||
|
||||
foo = 2
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
.macro mac
|
||||
|
||||
lda #$00
|
||||
.byte 3
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
.mac lda, val
|
||||
ldx #val
|
||||
txa
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
.macro mac
|
||||
.local .endmacro
|
||||
.endmacro
|
||||
mac
|
||||
@@ -0,0 +1,6 @@
|
||||
.macro mac val
|
||||
lda #val
|
||||
.endmacro
|
||||
.macro mac val
|
||||
lda #val
|
||||
.endmacro
|
||||
@@ -0,0 +1,5 @@
|
||||
.macro foo a1, a2
|
||||
.byte a1, a2
|
||||
.endmacro
|
||||
|
||||
foo 1, 2, 3
|
||||
@@ -0,0 +1,7 @@
|
||||
.macro mac1
|
||||
.delmac mac2
|
||||
.endmacro
|
||||
.macro mac2
|
||||
mac1
|
||||
.endmacro
|
||||
mac2
|
||||
@@ -0,0 +1,2 @@
|
||||
133-errormsg.s:3: Error: Expected '.ENDREPEAT' but found 'end-of-file'
|
||||
133-errormsg.s:1: Note: For this '.REPEAT' command
|
||||
@@ -0,0 +1,2 @@
|
||||
134-errormsg.s:3: Error: Symbol 'foo' is already an import
|
||||
134-errormsg.s:1: Note: The symbol was previously imported here
|
||||
@@ -0,0 +1,2 @@
|
||||
135-errormsg.s:4: Error: Symbol 'foo' is already defined
|
||||
135-errormsg.s:1: Note: The symbol was previously defined here
|
||||
@@ -0,0 +1,2 @@
|
||||
136-errormsg.s:5: Error: Missing '.ENDMACRO' for definition of macro 'mac'
|
||||
136-errormsg.s:1: Note: Macro definition started here
|
||||
@@ -0,0 +1,3 @@
|
||||
137-errormsg.s:1: Error: Cannot use an instruction as macro name
|
||||
137-errormsg.s:5: Error: Expected '.ENDMACRO' but found 'end-of-file'
|
||||
137-errormsg.s:1: Note: Macro definition started here
|
||||
@@ -0,0 +1,3 @@
|
||||
138-errormsg.s:2: Error: Expected an identifier but found '.ENDMACRO'
|
||||
138-errormsg.s:4: Error: Macro 'mac' contains errors and cannot be expanded
|
||||
138-errormsg.s:1: Note: Definition of macro 'mac' was here
|
||||
@@ -0,0 +1,2 @@
|
||||
139-errormsg.s:4: Error: A macro named 'mac' is already defined
|
||||
139-errormsg.s:1: Note: Previous definition of macro 'mac' was here
|
||||
@@ -0,0 +1,2 @@
|
||||
140-errormsg.s:5: Error: Too many parameters for macro 'foo'
|
||||
140-errormsg.s:1: Note: See definition of macro 'foo' which was here
|
||||
@@ -0,0 +1,3 @@
|
||||
141-errormsg.s:7: Error: Cannot delete macro 'mac2' which is currently expanded
|
||||
141-errormsg.s:5: Note: Expanded from macro here
|
||||
141-errormsg.s:2: Note: Expanded from macro here
|
||||
Reference in New Issue
Block a user