Convert parser tests to filetests.
Create a new directory hierarchy under 'filetests' for all the tests that are run by 'cton-util test'. Convert the parser tests under 'tests/parser' to use 'test cat' and filecheck directives.
This commit is contained in:
24
filetests/parser/call.cton
Normal file
24
filetests/parser/call.cton
Normal file
@@ -0,0 +1,24 @@
|
||||
; Parser tests for call and return syntax.
|
||||
test cat
|
||||
|
||||
function mini() {
|
||||
ebb1:
|
||||
return
|
||||
}
|
||||
; sameln: function mini() {
|
||||
; nextln: ebb0:
|
||||
; nextln: return
|
||||
; nextln: }
|
||||
|
||||
function r1() -> i32, f32 {
|
||||
ebb1:
|
||||
v1 = iconst.i32 3
|
||||
v2 = f32const 0.0
|
||||
return v1, v2
|
||||
}
|
||||
; sameln: function r1() -> i32, f32 {
|
||||
; nextln: ebb0:
|
||||
; nextln: v0 = iconst.i32 3
|
||||
; nextln: v1 = f32const 0.0
|
||||
; nextln: return v0, v1
|
||||
; nextln: }
|
||||
Reference in New Issue
Block a user