x64: fix a test

pull/5408/head
Alexander Medvednikov 2020-06-17 20:24:39 +02:00
parent a602673adb
commit 60bbad4d86
3 changed files with 33 additions and 5 deletions

View File

@ -32,6 +32,9 @@ fn foo(a int) {
if a == 1 { if a == 1 {
println('a == 1') println('a == 1')
} }
if a == 7 {
println('a == 7')
}
a++ a++
if a == 2 { if a == 2 {
println('a == 2') println('a == 2')
@ -39,9 +42,6 @@ fn foo(a int) {
if a == 3 { if a == 3 {
println('a == 3') println('a == 3')
} }
if a == 7 {
println('a == 7')
}
} }

View File

@ -2,13 +2,38 @@ fn print_greeting(){
println('hello from x64') println('hello from x64')
} }
fn print_number() { fn print_123() {
println('123') println('123')
} }
fn print_number(n int) {
if n == 1 { println('1') }
if n == 2 { println('2') }
if n == 3 { println('3') }
if n == 4 { println('4') }
if n == 5 { println('5') }
if n == 6 { println('6') }
if n == 7 { println('7') }
if n == 8 { println('8') }
if n == 9 { println('9') }
}
fn test_add() {
println('test_add()')
x := 2
y := 3
//z := x + y
print_number(x)
print_number(y)
//print_number(z)
print_number(x)
}
fn main() { fn main() {
println('start') println('start')
print_greeting() print_greeting()
print_number() print_123()
test_add()
println('end') println('end')
} }

View File

@ -1,4 +1,7 @@
start start
hello from x64 hello from x64
123 123
2
3
2
end end