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:
Jakob Stoklund Olesen
2016-09-15 15:27:37 -07:00
parent d221249e7f
commit 0b7f87b14c
13 changed files with 193 additions and 248 deletions

View 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: }