about summary refs log tree commit diff stats
path: root/tutorial/task9.mu
blob: 427c420b9310da25fb5974a57d93fac79df21c22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
fn f -> _/eax: int {
  return 2
}

fn g -> _/eax: int {
  return 3
}

fn add-f-and-g -> _/eax: int {
  var x/eax: int <- f
  var y/eax: int <- g
  x <- add y
  return x
}

fn test-add-f-and-g {
  var result/eax: int <- add-f-and-g
  check-ints-equal result, 5, "F - test-add-f-and-g\n"
}

fn main {
}